diff --git a/python-pygraphviz.spec b/python-pygraphviz.spec index a0b1b41..d68ad5b 100644 --- a/python-pygraphviz.spec +++ b/python-pygraphviz.spec @@ -1,100 +1,87 @@ Name: python-pygraphviz -Version: 1.2 +Version: 1.3rc2 Release: 1%{?dist} -Summary: Creates and Manipulates Graphs and Networks +Summary: Create and Manipulate Graphs and Networks License: BSD +# https://github.com/pygraphviz/pygraphviz/issues/39 URL: http://networkx.lanl.gov/pygraphviz/ Source0: http://pypi.python.org/packages/source/p/pygraphviz/pygraphviz-%{version}.tar.gz -#BuildArch: noarch -BuildRequires: python-devel +BuildRequires: python2-devel python3-devel +BuildRequires: python-sphinx BuildRequires: graphviz-devel Requires: graphviz-python -Requires: python - %description -PyGraphviz is a Python interface to the Graphviz graph layout and visualization package. With PyGraphviz you can create, edit, read, write, and draw graphs using Python to access the Graphviz graph data structure and layout algorithms. PyGraphviz is independent from NetworkX but provides a similar programming interface. +PyGraphviz is a Python interface to the Graphviz graph layout and +visualization package. With PyGraphviz you can create, edit, read, +write, and draw graphs using Python to access the Graphviz graph data +structure and layout algorithms. PyGraphviz is independent from +NetworkX but provides a similar programming interface. + +This package contains the version for Python 2. + +%package -n python3-pygraphviz +Summary: Create and Manipulate Graphs and Networks +Requires: graphviz-python + +%description -n python3-pygraphviz +PyGraphviz is a Python interface to the Graphviz graph layout and +visualization package. With PyGraphviz you can create, edit, read, +write, and draw graphs using Python to access the Graphviz graph data +structure and layout algorithms. PyGraphviz is independent from +NetworkX but provides a similar programming interface. +This package contains the version for Python 3. %package doc Summary: Documentation for pygraphviz Group: Documentation -#BuildRequires: python-sphinx Requires: %{name} = %{version}-%{release} - +BuildArch: noarch %description doc Documentation for pygraphviz - %prep %setup -q -n pygraphviz-%{version} - -# Fix permissions -#find examples -type f -perm /0111 | xargs chmod a-x - -# Fix line endings -#sed -e 's/\r//' examples/algorithms/hartford_drug.edgelist > hartford -#touch -r examples/algorithms/hartford_drug.edgelist hartford -#mv -f hartford examples/algorithms/hartford_drug.edgelist - +# remove she-bang line +sed -i '1d' pygraphviz/tests/test.py %build -python setup.py build -#PYTHONPATH=`pwd`/build/lib make -C doc html - -# Setup for python3 -#mv build build2 -#mv networkx/*.pyc build2 - -# Build for python3 -#python3 setup.py build +python2 setup.py build +python3 setup.py build +# docs +python2 setup.py build_ext -i +make -C doc html PYTHONPATH=.. %install -# Install the python3 version -#python3 setup.py install -O1 --skip-build --root %{buildroot} - -# Setup for python2 -#mv build build3 -#mv build2 build -#mv -f build/*.pyc pygrapvhiz - -# Install the python2 version -python setup.py install -O1 --skip-build --root %{buildroot} -rm -f %{buildroot}%{_docdir}/pygraphviz-%{version}/INSTALL.txt - -# Fix permissions -#grep -FRl /usr/bin/env %{buildroot}%{python_sitelib} | xargs chmod a+x -#grep -FRl /usr/bin/env %{buildroot}%{python3_sitelib} | xargs chmod a+x - -# Except unfix the one where the shebang was muffed -#chmod a-x %{buildroot}%{python_sitelib}/networkx/algorithms/link_analysis/hits_alg.py -#chmod a-x %{buildroot}%{python3_sitelib}/networkx/algorithms/link_analysis/hits_alg.py - - -#%check -#mkdir site-packages -#mv pygraphviz site-packages -#PYTHONPATH=`pwd`/site-packages python -c "import pygraphviz; pygraphviz.test()" - +python2 setup.py install -O1 --skip-build --root %{buildroot} +python3 setup.py install -O1 --skip-build --root %{buildroot} +mv %{buildroot}%{_docdir}/pygraphviz-%{version} %{buildroot}%{_pkgdocdir} +rm %{buildroot}%{_pkgdocdir}/INSTALL.txt +rm -r doc/build/html/.buildinfo +cp -av doc/build/html %{buildroot}%{_pkgdocdir}/ +chmod g-w %{buildroot}%{python_sitearch}/pygraphviz/_graphviz.so \ + %{buildroot}%{python3_sitearch}/pygraphviz/_graphviz.*.so %files -%doc %{_docdir}/pygraphviz-%{version}/* -%doc %{_docdir}/pygraphviz-%{version}/examples/* %{python_sitearch}/* +%doc %dir %{_pkgdocdir} +%doc %{_pkgdocdir}/README.txt +%files -n python3-pygraphviz +%{python3_sitearch}/* +%doc %{_pkgdocdir}/README.txt -#files -n python3-networkx -#doc installed-docs/* -#{python3_sitelib}/* - - -#%files doc -#%doc doc/build/html/* - +%files doc +%doc %{_pkgdocdir}/html +%doc %{_pkgdocdir}/examples %changelog -* Wed Oct 23 2011 Vedran Miletić - 1.1-1 +* Mon Nov 24 2014 Zbigniew Jędrzejewski-Szmek - 1.3rc2-1 +- Update to latest version, build sphinx docs, add python3 subpackage. + +* Wed Oct 26 2011 Vedran Miletić - 1.1-1 - Initial package. diff --git a/sources b/sources index e69de29..8598bc8 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +dbe3fa55e59a5d7e3bd924511b3275c4 pygraphviz-1.2.tar.gz