[packages/python-networkx] - up to 2.5 - drop python2 support, not supported and no users

baggins baggins at pld-linux.org
Tue Mar 9 09:28:58 CET 2021


commit a571dedc8b64f1c09bf436c90ae3e32ab8c18127
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Tue Mar 9 09:28:20 2021 +0100

    - up to 2.5
    - drop python2 support, not supported and no users

 python-networkx.spec | 50 +++++---------------------------------------------
 1 file changed, 5 insertions(+), 45 deletions(-)
---
diff --git a/python-networkx.spec b/python-networkx.spec
index 12dda00..6daaa01 100644
--- a/python-networkx.spec
+++ b/python-networkx.spec
@@ -1,31 +1,23 @@
 #
 # Conditional build:
 %bcond_with	doc	# Sphinx documentation, TODO: fix this
-%bcond_without	python2 # CPython 2.x module
-%bcond_without	python3 # CPython 3.x module
 
 %define		module	networkx
 Summary:	High-productivity software for complex networks
 Summary(pl.UTF-8):	Efektywne operacje na skompliwkoanych grafach.
 Name:		python-%{module}
-Version:	1.8.1
-Release:	7
+Version:	2.5
+Release:	1
 License:	BSD
 Group:		Libraries/Python
 Source0:	https://pypi.python.org/packages/source/n/networkx/%{module}-%{version}.tar.gz
-# Source0-md5:	b4a9e68ecd1b0164446ee432d2e20bd0
+# Source0-md5:	21f25be1f4373e19153a9beca63346e7
 URL:		http://networkx.github.io/index.html
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.710
-%if %{with python2}
-BuildRequires:	python-distribute
-%endif
-%if %{with python3}
 BuildRequires:	python3-modules
 BuildRequires:	python3-setuptools
-%endif
-%{?with_doc:BuildRequires:	python-matplotlib}
-Requires:	python-modules
+%{?with_doc:BuildRequires:	python3-matplotlib}
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -66,13 +58,7 @@ Dokumentacja API modułu Pythona %{module}.
 %setup -q -n %{module}-%{version}
 
 %build
-%if %{with python2}
-%py_build
-%endif
-
-%if %{with python3}
 %py3_build
-%endif
 
 %if %{with doc}
 cd doc
@@ -83,50 +69,24 @@ rm -rf _build/html/_sources
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
-%py_install
-
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
-%py_postclean
-
-install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
-cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
-find $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version} -name '*.py' \
-	| xargs sed -i '1s|^#!.*python\b|#!%{__python}|'
-%endif
-
-%if %{with python3}
 %py3_install
 
 install -d $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version}
 find $RPM_BUILD_ROOT%{_examplesdir}/python3-%{module}-%{version} -name '*.py' \
 	| xargs sed -i '1s|^#!.*python\b|#!%{__python3}|'
-%endif
 
 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{module}-%{version}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc README.txt
-%{py_sitescriptdir}/%{module}
-%{py_sitescriptdir}/%{module}-*.egg-info
-%{_examplesdir}/python-%{module}-%{version}
-%endif
-
-%if %{with python3}
 %files -n python3-%{module}
 %defattr(644,root,root,755)
-%doc README.txt
+%doc README.rst
 %{py3_sitescriptdir}/%{module}
 %{py3_sitescriptdir}/%{module}-*.egg-info
 %{_examplesdir}/python3-%{module}-%{version}
-%endif
 
 %if %{with doc}
 %files apidocs
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-networkx.git/commitdiff/a571dedc8b64f1c09bf436c90ae3e32ab8c18127



More information about the pld-cvs-commit mailing list