[pygtkchart] Initial import

Fabian Affolter fab at fedoraproject.org
Mon Jun 6 18:49:38 UTC 2011


commit df20b9402e7ba9f332bc06c700d3877d60af24cb
Author: Fabian Affolter <fabian at bernewireless.net>
Date:   Mon Jun 6 20:49:27 2011 +0200

    Initial import

 .gitignore            |    1 +
 pygtkchart-path.patch |   46 +++++++++++++++++++++++++++++
 pygtkchart.spec       |   77 +++++++++++++++++++++++++++++++++++++++++++++++++
 sources               |    1 +
 4 files changed, 125 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..f247235 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/notmyname-pygtkChart-beta-0-g8a56364.tar.gz
diff --git a/pygtkchart-path.patch b/pygtkchart-path.patch
new file mode 100644
index 0000000..a8816fd
--- /dev/null
+++ b/pygtkchart-path.patch
@@ -0,0 +1,46 @@
+diff -Nur notmyname-pygtkChart-cb24da7.orig/setup.py notmyname-pygtkChart-cb24da7/setup.py
+--- notmyname-pygtkChart-cb24da7.orig/setup.py	2009-07-11 13:33:17.000000000 +0200
++++ notmyname-pygtkChart-cb24da7/setup.py	2011-03-31 23:29:41.520352878 +0200
+@@ -30,5 +30,5 @@
+       packages=['pygtk_chart'],
+       package_dir={"pygtk_chart":"src/pygtk_chart"},
+       package_data={'pygtk_chart':['data/tango.color']},
+-      data_files=[('data', ['src/pygtk_chart/data/tango.color'])]
++      data_files=[('/usr/share/pygtkchart', ['src/pygtk_chart/data/tango.color'])]
+      )
+diff -Nur notmyname-pygtkChart-cb24da7.orig/src/pygtk_chart/bar_chart.py notmyname-pygtkChart-cb24da7/src/pygtk_chart/bar_chart.py
+--- notmyname-pygtkChart-cb24da7.orig/src/pygtk_chart/bar_chart.py	2009-07-11 13:33:17.000000000 +0200
++++ notmyname-pygtkChart-cb24da7/src/pygtk_chart/bar_chart.py	2011-03-31 23:18:24.552632139 +0200
+@@ -16,7 +16,7 @@
+ 
+ COLOR_AUTO = 0
+ 
+-COLORS = color_list_from_file(os.path.dirname(__file__) + "/data/tango.color")
++COLORS = color_list_from_file(os.path.dirname(__file__) + "/share/pygtkchart/tango.color")
+ 
+ class Bar(chart.ChartObject):
+     __gproperties__ = {"name": (gobject.TYPE_STRING, "bar name",
+diff -Nur notmyname-pygtkChart-cb24da7.orig/src/pygtk_chart/line_chart.py notmyname-pygtkChart-cb24da7/src/pygtk_chart/line_chart.py
+--- notmyname-pygtkChart-cb24da7.orig/src/pygtk_chart/line_chart.py	2009-07-11 13:33:17.000000000 +0200
++++ notmyname-pygtkChart-cb24da7/src/pygtk_chart/line_chart.py	2011-03-31 23:19:02.029395514 +0200
+@@ -47,7 +47,7 @@
+ POSITION_TOP = 7
+ 
+ #load default color palette
+-COLORS = color_list_from_file(os.path.dirname(__file__) + "/data/tango.color")
++COLORS = color_list_from_file(os.path.dirname(__file__) + "/share/pygtkchart/tango.color")
+ 
+ 
+ class RangeCalculator:
+diff -Nur notmyname-pygtkChart-cb24da7.orig/src/pygtk_chart/pie_chart.py notmyname-pygtkChart-cb24da7/src/pygtk_chart/pie_chart.py
+--- notmyname-pygtkChart-cb24da7.orig/src/pygtk_chart/pie_chart.py	2009-07-11 13:33:17.000000000 +0200
++++ notmyname-pygtkChart-cb24da7/src/pygtk_chart/pie_chart.py	2011-03-31 23:19:41.617145525 +0200
+@@ -36,7 +36,7 @@
+ COLOR_AUTO = 0
+ 
+ #load default color palette
+-COLORS = color_list_from_file(os.path.dirname(__file__) + "/data/tango.color")
++COLORS = color_list_from_file(os.path.dirname(__file__) + "/share/pygtkchart/tango.color")
+ 
+ 
+ class PieArea(chart.ChartObject):
diff --git a/pygtkchart.spec b/pygtkchart.spec
new file mode 100644
index 0000000..21e6525
--- /dev/null
+++ b/pygtkchart.spec
@@ -0,0 +1,77 @@
+%if ! (0%{?fedora} > 12 || 0%{?rhel} > 5)
+%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
+%endif
+
+%global git g8a56364
+
+Name:           pygtkchart
+Version:        0
+Release:        0.2.git%{git}%{?dist}
+Summary:        A GTK chart widget written in Python
+
+Group:          Applications/System
+License:        GPLv2+
+URL:            http://notmyname.github.com/pygtkChart/
+Source0:        https://github.com/notmyname/pygtkChart/tarball/beta/notmyname-pygtkChart-beta-0-%{git}.tar.gz
+# This patch fixes some paths for Fedora
+Patch0:         %{name}-path.patch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildArch:      noarch
+
+BuildRequires:  python2-devel
+BuildRequires:  python-setuptools
+
+Requires:       pygtk2
+
+
+%description
+pygtkChart is a Python package that provides PyGTK widgets to simply
+integrate charts into a GTK application. Currently pygtkChart comes
+with four widgets:
+
+- BarChart - shows a bar chart (see example on the right)
+- MultiBarChart - like BarChart, but shows groups of bars
+- PieChart - shows simple pie charts
+
+The appearance of the widgets is highly customable. All bars, graphs,
+or titles on a chart can be accessed and modified separately.
+Colors, backgrounds and many more properties can be modified for each
+object. 
+
+
+%prep
+%setup -q -n notmyname-pygtkChart-cb24da7
+%patch0 -p1 -b .path 
+sed -i -e '/^#!\//, 1d' src/pygtk_chart/*.py
+chmod -x examples/*.py
+
+
+%build
+%{__python} setup.py build
+
+
+%install
+rm -rf %{buildroot}
+%{__python} setup.py install -O1 --skip-build --root=%{buildroot}
+
+
+%clean
+rm -rf %{buildroot}
+
+
+%files
+%defattr(-,root,root,-)
+%doc doc/ examples/
+%{python_sitelib}/pygtk_chart/
+%{python_sitelib}/pygtkChart-beta*.egg-info
+%{_datadir}/%{name}/
+
+
+%changelog
+* Sat May 21 2011 Fabian Affolter <fabian at bernewireless.net> - 0-0.2.gitg8a56364
+- Fixed naming
+- Fixed directory ownership
+- Patch renamed and comment added
+
+* Sun Mar 27 2011 Fabian Affolter <fabian at bernewireless.net> - 0-0.gitg8a56364
+- Initial package for Fedora
diff --git a/sources b/sources
index e69de29..52db727 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+f051c43ed7de533043644fc935d9d8d0  notmyname-pygtkChart-beta-0-g8a56364.tar.gz


More information about the scm-commits mailing list