diff --git a/docdir.patch b/docdir.patch new file mode 100644 index 0000000..586f1a1 --- /dev/null +++ b/docdir.patch @@ -0,0 +1,13 @@ +Index: setup.py +=================================================================== +--- setup.py.orig ++++ setup.py +@@ -135,7 +135,7 @@ else: + execfile(os.path.join('pygraphviz','release.py')) + + packages = ["pygraphviz","pygraphviz.tests"] +-docdirbase = 'share/doc/pygraphviz-%s' % version ++docdirbase = 'share/doc/packages/pygraphviz-%s' % version + data = [(docdirbase, glob("*.txt")), + (os.path.join(docdirbase, 'examples'),glob("examples/*.py")), + (os.path.join(docdirbase, 'examples'),glob("examples/*.dat")), diff --git a/fix_examples.patch b/fix_examples.patch deleted file mode 100644 index 73e9295..0000000 --- a/fix_examples.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Naurh ./setup.py pygraphviz-0.99.1/setup.py ---- ./setup.py 2009-11-09 23:27:18.774229415 -0200 -+++ pygraphviz-0.99.1/setup.py 2009-11-09 23:29:06.699354414 -0200 -@@ -165,7 +165,7 @@ - url = url, - download_url = download_url, - packages = packages, -- data_files = data, -+ #data_files = data, - classifiers = classifiers, - ext_modules = extension, - package_data = package_data, diff --git a/pygraphviz-0.99.1.tar.bz2 b/pygraphviz-0.99.1.tar.bz2 new file mode 100644 index 0000000..48897c6 --- /dev/null +++ b/pygraphviz-0.99.1.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:168c5fa9ed101002b9c1308dfe584817d0c1ea936f69dcf9b79f01d994ab0ed1 +size 80089 diff --git a/pygraphviz-0.99.1.tar.gz b/pygraphviz-0.99.1.tar.gz deleted file mode 100644 index cbe2cee..0000000 --- a/pygraphviz-0.99.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c4218a8fae6f8b7627c322b328940e90b6afc6c10a5efc4f63ad7c5b4964002 -size 85220 diff --git a/python-pygraphviz.changes b/python-pygraphviz.changes index 24de755..c3cf54e 100644 --- a/python-pygraphviz.changes +++ b/python-pygraphviz.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Mar 26 03:45:26 UTC 2011 - alexandre@exatati.com.br + +- Regenerate spec file with py2pack; +- Bzip2 source code; +- Add docdir.patch to fix documentation path. + ------------------------------------------------------------------- Fri Oct 9 01:03:40 UTC 2009 - alexandre@exatati.com.br diff --git a/python-pygraphviz.spec b/python-pygraphviz.spec index d9a7d76..e0f06c6 100644 --- a/python-pygraphviz.spec +++ b/python-pygraphviz.spec @@ -1,44 +1,68 @@ +# +# spec file for package python-pygraphviz +# +# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + # norootforbuild +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} -Name: python-pygraphviz +%define mod_name pygraphviz + +Name: python-%{mod_name} Version: 0.99.1 -Release: 1 +Release: 0 +Url: http://networkx.lanl.gov/pygraphviz Summary: Python interface to Graphviz -License: BSD License -Group: Development/Libraries/Python -Source: pygraphviz-%{version}.tar.gz -Patch: fix_examples.patch -URL: http://networkx.lanl.gov/pygraphviz -BuildRequires: python-devel, python-setuptools, pkg-config, graphviz-devel +License: BSD +Group: Development/Languages/Python +Source: %{mod_name}-%{version}.tar.bz2 +# PATCH-FIX-UPSTREAM docdir.patch +Patch: docdir.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build -%{py_requires} -%if %{?suse_version: %{suse_version} > 1110} %{!?suse_version:1} -BuildArch: noarch +BuildRequires: graphviz-devel +BuildRequires: pkg-config +BuildRequires: python-devel +%if 0%{?suse_version} +%py_requires %endif - %description A Python wrapper for the Graphviz Agraph data structure. -pygraphviz can be used to create and draw networks and graphs with Graphviz. - -Author: --------- - Aric Hagberg - +PyGraphviz can be used to create and draw networks and graphs with Graphviz. %prep -%setup -q -n pygraphviz-%{version} +%setup -q -n %{mod_name}-%{version} %patch - %build -%{__python} setup.py build - +export CFLAGS="%{optflags}" +python setup.py build %install -%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=INSTALLED_FILES +python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%clean +rm -rf %{buildroot} -%files -f INSTALLED_FILES -%defattr(-,root,root) -%doc doc examples \ No newline at end of file +%files +%defattr(-,root,root,-) +# You may have to add additional files here (documentation and binaries mostly) +%python_sitearch/%{mod_name}* +%python_sitearch/*.egg-info +%doc doc +%{_docdir}/%{mod_name}-%{version} + +%changelog