forked from pool/python-networkx
Accepting request 514815 from devel:languages:python
1 OBS-URL: https://build.opensuse.org/request/show/514815 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-networkx?expand=0&rev=12
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Aug 6 04:46:44 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
- Fix shebangs
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu May 11 03:12:50 UTC 2017 - toddrme2178@gmail.com
|
Thu May 11 03:12:50 UTC 2017 - toddrme2178@gmail.com
|
||||||
|
|
||||||
|
@@ -72,13 +72,13 @@ Documentation and examples for %{name}.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n networkx-%{version}
|
%setup -q -n networkx-%{version}
|
||||||
|
sed -i "s|#!/usr/bin/env python|#!%__python3|" examples/drawing/unix_email.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%python_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
||||||
|
|
||||||
# Move docs into correct directory if necessary
|
# Move docs into correct directory if necessary
|
||||||
if [ "%{_docdir}" != "%{_datadir}/doc" ] ; then
|
if [ "%{_docdir}" != "%{_datadir}/doc" ] ; then
|
||||||
@@ -86,9 +86,24 @@ if [ "%{_docdir}" != "%{_datadir}/doc" ] ; then
|
|||||||
mv %{buildroot}%{_datadir}/doc/networkx-%{version} %{buildroot}%{_docdir}/
|
mv %{buildroot}%{_datadir}/doc/networkx-%{version} %{buildroot}%{_docdir}/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
%fdupes %{buildroot}%{_docdir}
|
||||||
|
|
||||||
# Installation instructions shouldn't be packaged
|
# Installation instructions shouldn't be packaged
|
||||||
rm %{buildroot}%{_docdir}/networkx-%{version}/INSTALL.txt
|
rm %{buildroot}%{_docdir}/networkx-%{version}/INSTALL.txt
|
||||||
|
|
||||||
|
%{python_expand pushd %{buildroot}%{$python_sitelib}
|
||||||
|
# Fix wrong-script-interpreter
|
||||||
|
find networkx -name '*test*.py' -exec sed -i "s|#!/usr/bin/env python|#!%__$python|" {} \;
|
||||||
|
find networkx -name '*test*.py' -exec grep -q '#!%__$python' {} \; -exec chmod a+x {} \;
|
||||||
|
# Deduplicating files can generate a RPMLINT warning for pyc mtime
|
||||||
|
find networkx -name '*test*.py' -exec $python -m compileall -d %{$python_sitelib} {} \;
|
||||||
|
find networkx -name '*test*.py' -exec $python -O -m compileall -d %{$python_sitelib} {} \;
|
||||||
|
rm -f _current_flavor
|
||||||
|
%fdupes .
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%doc README.rst LICENSE.txt
|
%doc README.rst LICENSE.txt
|
||||||
|
Reference in New Issue
Block a user