%global srcname random2 Name: python-%{srcname} Version: 1.0.1 Release: 24%{?dist} Summary: Python 2 compatible random module License: Python URL: http://pypi.python.org/pypi/%{srcname} Source0: %{pypi_source %srcname %version zip} BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %global common_desc %{expand: This package provides a Python 3 ported version of Python 2.7's random module. It has also been back-ported to work in Python 2.6. In Python 3, the implementation of randrange() was changed, so that even with the same seed you get different sequences in Python 2 and 3. Note that several high-level functions such as randint() and choice() use randrange(). In my testing code I heavily rely on stable random generator results and it makes porting code to Python 3 a lot harder, if all those tests have to be adjusted. This package fixes that.} %description %{common_desc} %package -n python%{python3_pkgversion}-%{srcname} Summary: Python 2 compatible random module for Python 3 %description -n python%{python3_pkgversion}-%{srcname} %{common_desc} %prep %autosetup -n %{srcname}-%{version} # Remove a test that is invalid as of python 3.9 sed -i '/self\.gen\.getrandbits, 0/d' src/tests.py %build %py3_build %install %py3_install %check %{python3} setup.py test %files -n python%{python3_pkgversion}-%{srcname} %doc CHANGES.txt README.txt %{python3_sitelib}/%{srcname}* %{python3_sitelib}/__pycache__/%{srcname}* %changelog * Fri Jul 23 2021 Fedora Release Engineering - 1.0.1-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Thu Jun 03 2021 Python Maint - 1.0.1-23 - Rebuilt for Python 3.10 * Wed Jan 27 2021 Fedora Release Engineering - 1.0.1-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Wed Jul 29 2020 Fedora Release Engineering - 1.0.1-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Tue May 26 2020 Miro Hrončok - 1.0.1-20 - Rebuilt for Python 3.9 * Sat May 9 2020 Jerry James - 1.0.1-19 - Remove test that is invalid for python 3.9 (bz 1830960) * Thu Jan 30 2020 Fedora Release Engineering - 1.0.1-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Oct 03 2019 Miro Hrončok - 1.0.1-17 - Rebuilt for Python 3.8.0rc1 (#1748018) * Mon Aug 19 2019 Miro Hrončok - 1.0.1-16 - Rebuilt for Python 3.8 * Fri Jul 26 2019 Fedora Release Engineering - 1.0.1-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Sat May 11 2019 Sérgio Basto - 1.0.1-14 - Allow build on EPEL7 * Sat Feb 02 2019 Fedora Release Engineering - 1.0.1-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Sat Nov 17 2018 Jerry James - 1.0.1-12 - Drop the python2 subpackage * Sat Jul 14 2018 Fedora Release Engineering - 1.0.1-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 1.0.1-10 - Rebuilt for Python 3.7 * Fri Feb 09 2018 Fedora Release Engineering - 1.0.1-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 1.0.1-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 1.0.1-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 1.0.1-6 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 1.0.1-5 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 1.0.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Mon Feb 1 2016 Jerry James - 1.0.1-3 - Comply with latest python packaging guidelines * Tue Nov 10 2015 Fedora Release Engineering - 1.0.1-3 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Thu Jun 18 2015 Fedora Release Engineering - 1.0.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Mon Jun 9 2014 Jerry James - 1.0.1-1 - Initial RPM