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
|
||||
|
||||
|
@@ -72,13 +72,13 @@ Documentation and examples for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -q -n networkx-%{version}
|
||||
sed -i "s|#!/usr/bin/env python|#!%__python3|" examples/drawing/unix_email.py
|
||||
|
||||
%build
|
||||
%python_build
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
# Move docs into correct directory if necessary
|
||||
if [ "%{_docdir}" != "%{_datadir}/doc" ] ; then
|
||||
@@ -86,9 +86,24 @@ if [ "%{_docdir}" != "%{_datadir}/doc" ] ; then
|
||||
mv %{buildroot}%{_datadir}/doc/networkx-%{version} %{buildroot}%{_docdir}/
|
||||
fi
|
||||
|
||||
%fdupes %{buildroot}%{_docdir}
|
||||
|
||||
# Installation instructions shouldn't be packaged
|
||||
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}
|
||||
%defattr(-,root,root)
|
||||
%doc README.rst LICENSE.txt
|
||||
|
Reference in New Issue
Block a user