diff --git a/python-sortedcontainers.spec b/python-sortedcontainers.spec index e545b9e..4bee6c1 100644 --- a/python-sortedcontainers.spec +++ b/python-sortedcontainers.spec @@ -1,11 +1,12 @@ +%bcond_without python2 %global _empty_manifest_terminate_build 0 Name: python-sortedcontainers -Version: 2.1.0 +Version: 2.4.0 Release: 1 Summary: Sorted Containers -- Sorted List, Sorted Dict, Sorted Set License: Apache 2.0 -URL: http://www.grantjenks.com/docs/sortedcontainers/ -Source0: https://files.pythonhosted.org/packages/29/e0/135df2e733790a3d3bcda970fd080617be8cea3bd98f411e76e6847c17ef/sortedcontainers-2.1.0.tar.gz +URL: https://github.com/grantjenks/python-sortedcontainers +Source0: https://github.com/grantjenks/python-sortedcontainers/archive/refs/tags/v%{version}.tar.gz BuildArch: noarch @@ -13,6 +14,17 @@ BuildArch: noarch `Sorted Containers`_ is an Apache2 licensed `sorted collections library`_, written in pure-Python, and fast as C-extensions. +%if %{with python2} +%package -n python2-sortedcontainers +Summary: Sorted Containers -- Sorted List, Sorted Dict, Sorted Set +BuildRequires: python2-devel +BuildRequires: python2-setuptools + +%description -n python2-sortedcontainers +`Sorted Containers`_ is an Apache2 licensed `sorted collections library`_, +written in pure-Python, and fast as C-extensions. +%endif + %package -n python3-sortedcontainers Summary: Sorted Containers -- Sorted List, Sorted Dict, Sorted Set Provides: python-sortedcontainers @@ -32,12 +44,19 @@ Provides: python3-sortedcontainers-doc written in pure-Python, and fast as C-extensions. %prep -%autosetup -n sortedcontainers-2.1.0 +%autosetup -n %{name}-%{version} %build +%if %{with python2} +%py2_build +%endif %py3_build %install +%if %{with python2} +%py2_install +%endif + %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi @@ -65,6 +84,11 @@ popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . +%if %{with python2} +%files -n python2-sortedcontainers +%{python2_sitelib}/* +%endif + %files -n python3-sortedcontainers -f filelist.lst %dir %{python3_sitelib}/* @@ -72,6 +96,10 @@ mv %{buildroot}/doclist.lst . %{_pkgdocdir} %changelog +* Tue Jul 27 2021 liyanan - 2.4.0-1 +- update to 2.4.0 +- add python2 sub-package + * Sat Aug 8 2020 tianwei - 2.1.0.-1 - Package Init diff --git a/sortedcontainers-2.1.0.tar.gz b/sortedcontainers-2.1.0.tar.gz deleted file mode 100644 index 96368a9..0000000 Binary files a/sortedcontainers-2.1.0.tar.gz and /dev/null differ diff --git a/v2.4.0.tar.gz b/v2.4.0.tar.gz new file mode 100644 index 0000000..b66c7fb Binary files /dev/null and b/v2.4.0.tar.gz differ