Vedran Miletić fc659b5
Name:           python-pygraphviz
8b5d68f
Version:        1.5
29e8c81
Release:        3%{?dist}
cc9084a
Summary:        Create and Manipulate Graphs and Networks
Vedran Miletić fc659b5
License:        BSD
Vedran Miletić fc659b5
URL:            http://networkx.lanl.gov/pygraphviz/
8b5d68f
Source0:        https://github.com/pygraphviz/pygraphviz/archive/pygraphviz-%{version}.tar.gz
8b5d68f
# Fix a few types in the swig interface
8b5d68f
# https://github.com/pygraphviz/pygraphviz
8b5d68f
Patch0:         pygraphviz-swig.patch
Vedran Miletić fc659b5
07e5317
BuildRequires:  gcc
eac4b12
BuildRequires:  python3-devel
8b5d68f
BuildRequires:  python3dist(setuptools)
8b5d68f
BuildRequires:  python3dist(sphinx)
Vedran Miletić fc659b5
BuildRequires:  graphviz-devel
8b5d68f
BuildRequires:  swig
Vedran Miletić fc659b5
584c301
%global _description                                                  \
584c301
PyGraphviz is a Python interface to the Graphviz graph layout and     \
584c301
visualization package. With PyGraphviz you can create, edit, read,    \
584c301
write, and draw graphs using Python to access the Graphviz graph data \
584c301
structure and layout algorithms. PyGraphviz is independent from       \
cc9084a
NetworkX but provides a similar programming interface.
cc9084a
584c301
%description %_description
584c301
cc9084a
%package -n python3-pygraphviz
584c301
Summary:        %{summary}
584c301
%{?python_provide:%python_provide python3-pygraphviz}
cc9084a
584c301
%description -n python3-pygraphviz %_description
Vedran Miletić fc659b5
cc9084a
This package contains the version for Python 3.
Vedran Miletić fc659b5
Vedran Miletić fc659b5
%package doc
Vedran Miletić fc659b5
Summary:        Documentation for pygraphviz
a838e7b
Provides:       bundled(jquery)
cc9084a
BuildArch:      noarch
Vedran Miletić fc659b5
Vedran Miletić fc659b5
%description doc
584c301
Documentation for PyGraphViz.
Vedran Miletić fc659b5
Vedran Miletić fc659b5
%prep
8b5d68f
%autosetup -p0 -n pygraphviz-pygraphviz-%{version}
8b5d68f
8b5d68f
# Regenerate the swig-generated files
8b5d68f
swig -python pygraphviz/graphviz.i
8b5d68f
8b5d68f
# Fix the shebangs in the examples
8b5d68f
for fil in examples/*.py; do
8b5d68f
  sed -i.orig 's,%{_bindir}/env python,%{__python3},' $fil
8b5d68f
  touch -r $fil.orig $fil
8b5d68f
  rm $fil.orig
8b5d68f
done
Vedran Miletić fc659b5
Vedran Miletić fc659b5
%build
584c301
%py3_build
584c301
cc9084a
# docs
95a166f
%make_build -C doc html PYTHONPATH=$(pwd)/build/lib.%{python3_platform}-%{python3_version}
Vedran Miletić fc659b5
Vedran Miletić fc659b5
%install
584c301
%py3_install
20a4b11
mv %{buildroot}%{_docdir}/pygraphviz-* %{buildroot}%{_pkgdocdir}
cc9084a
rm %{buildroot}%{_pkgdocdir}/INSTALL.txt
8b5d68f
cp -p README.rst %{buildroot}%{_pkgdocdir}
584c301
rm doc/build/html/.buildinfo
cc9084a
cp -av doc/build/html %{buildroot}%{_pkgdocdir}/
eac4b12
chmod g-w %{buildroot}%{python3_sitearch}/pygraphviz/_graphviz.*.so
Vedran Miletić fc659b5
584c301
%global _docdir_fmt %{name}
584c301
cc9084a
%files -n python3-pygraphviz
8b5d68f
%{python3_sitearch}/pygraphviz*
8b5d68f
%exclude %{python3_sitearch}/pygraphviz/graphviz_wrap.c
2969349
%doc %dir %{_pkgdocdir}
8b5d68f
%doc %{_pkgdocdir}/README.rst
8b5d68f
%license LICENSE
Vedran Miletić fc659b5
cc9084a
%files doc
2969349
%doc %dir %{_pkgdocdir}
cc9084a
%doc %{_pkgdocdir}/html
cc9084a
%doc %{_pkgdocdir}/examples
8b5d68f
%license LICENSE
Vedran Miletić fc659b5
Vedran Miletić fc659b5
%changelog
29e8c81
* Sun Feb 17 2019 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.5-3
29e8c81
- Restore the tests subpackage (#1677978)
29e8c81
4095d30
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.5-2
4095d30
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
4095d30
8b5d68f
* Thu Oct 11 2018 Jerry James <loganjerry@gmail.com> - 1.5-1
8b5d68f
- Update to latest version
8b5d68f
- Drop nose requirement; only needed to run tests, not to use the package
8b5d68f
- Add swig patch to fix type-related compiler warnings
8b5d68f
- Regenerate the swig files
8b5d68f
- Do not ship the test code or the swig-generated C file
8b5d68f
- Build sphinx docs with python3 instead of python2
8b5d68f
- Ship LICENSE file with all packages
8b5d68f
- Fix shebang in example code
eac4b12
34b8199
* Tue Jul 17 2018 Miro Hrončok <mhroncok@redhat.com> - 1.3-3.rc2.11
34b8199
- Update Python macros to new packaging standards
34b8199
  (See https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package)
34b8199
4ac0ffe
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-3.rc2.10
4ac0ffe
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
4ac0ffe
dbfe3f0
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.3-3.rc2.9
dbfe3f0
- Rebuilt for Python 3.7
dbfe3f0
71b65bc
* Fri Feb 09 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.3-3.rc2.8
71b65bc
- Update Python 2 dependency declarations to new packaging standards
71b65bc
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
71b65bc
e07ed96
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-3.rc2.7
e07ed96
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e07ed96
d797851
* Fri Feb 09 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.3-3.rc2.6
d797851
- Escape macros in %%changelog
d797851
f6280fb
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-3.rc2.5
f6280fb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
f6280fb
3820b8c
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-3.rc2.4
3820b8c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
3820b8c
ce3e158
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-3.rc2.3
ce3e158
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
ce3e158
4283d70
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.3-3.rc2.2
4283d70
- Rebuild for Python 3.6
4283d70
81dcabd
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-3.rc2.1
81dcabd
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
81dcabd
584c301
* Tue Apr  5 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.3-3.rc2
584c301
- Rename python2 subpackage to python2-pygraphviz
584c301
- Fix Requires (#1324237)
584c301
16dec54
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-2.rc2.3
16dec54
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
16dec54
3993d90
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-2.rc2.2
3993d90
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
3993d90
cc1cbdd
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-2.rc2.1
cc1cbdd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
cc1cbdd
20a4b11
* Sun Nov 30 2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.3-2rc2
20a4b11
- Reformat version string to follow guidelines for pre-release versions
20a4b11
c5a60ae
* Sat Nov 29 2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.3rc2-2
d797851
- Fixed after review: use more macros, include directories in %%files,
c5a60ae
  add provides for bundled jquery, remove empty file.
c5a60ae
cc9084a
* Mon Nov 24 2014 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.3rc2-1
cc9084a
- Update to latest version, build sphinx docs, add python3 subpackage.
cc9084a
cc9084a
* Wed Oct 26 2011 Vedran Miletić <rivanvx@gmail.com> - 1.1-1
Vedran Miletić fc659b5
- Initial package.