## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 15; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Run slow tests? In this case, “slow” is just a few minutes. %bcond slow_tests 1 Name: python-py27hash Version: 1.1.0 Release: %autorelease Summary: Python 2.7 hashing and iteration in Python 3+ # SPDX License: MIT URL: https://github.com/neuml/py27hash # The GitHub tarball contains tests; the PyPI sdist does not. Source: %{url}/archive/v%{version}/py27hash-%{version}.tar.gz # Since the package previously had an arch-dependent failure, we build on all # platforms (the base package is not noarch) to flush out any similar issues. # However, we produce only a noarch binary package. Since there is no compiled # code, there is no debug package. %global debug_package %{nil} BuildRequires: python3-devel %global common_description %{expand: This package helps ease the migration from Python 2 to 3 for applications that depend on the old hash/iteration order of sets/dicts. Even when setting PYTHONHASHSEED=0, the hash (and default iteration order) will still be different as the hashing algorithm changed in Python 3. This package allows Python 2.7 hashing and set/dict iteration.} %description %{common_description} %package -n python3-py27hash Summary: %{summary} BuildArch: noarch %description -n python3-py27hash %{common_description} %prep %autosetup -n py27hash-%{version} %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l py27hash %check # See scripts/tests.sh, which we have here slightly modified for our purposes: SRC_DIR='%{buildroot}%{python3_sitelib}' TEST_DIR="${PWD}/test/python" # The %%{py3_test_envvars} macro adds to the PATH we set here. For PYTHONPATH, # when it finds it already set, it does not override or adjust it. export PYTHONPATH="${SRC_DIR}:${TEST_DIR}" export PATH="${TEST_DIR}:${PATH}" export SKIPSLOW='%{?!with_slow_tests:skipslow}' %{py3_test_envvars} %{python3} -m unittest discover -v -s "${TEST_DIR}" %files -n python3-py27hash -f %{pyproject_files} %doc README.md %changelog ## START: Generated by rpmautospec * Fri Jan 26 2024 Fedora Release Engineering - 1.1.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 1.1.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Dec 18 2023 Benjamin A. Beasley - 1.1.0-12 - Assert that %%pyproject_files contains a license file * Thu Oct 12 2023 Benjamin A. Beasley - 1.1.0-11 - F38+: Use %%{py3_test_envvars} when running tests * Fri Jul 21 2023 Fedora Release Engineering - 1.1.0-10 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Fri Jul 07 2023 Benjamin A. Beasley - 1.1.0-9 - Use new (rpm 4.17.1+) bcond style * Tue Jun 13 2023 Python Maint - 1.1.0-8 - Rebuilt for Python 3.12 * Fri Jan 20 2023 Fedora Release Engineering - 1.1.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Sun Nov 27 2022 Benjamin A. Beasley - 1.1.0-5 - Tidy up the spec file a little * Sun Nov 27 2022 Benjamin A. Beasley - 1.1.0-4 - Confirm license is SPDX MIT * Fri Jul 22 2022 Fedora Release Engineering - 1.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon Jun 13 2022 Python Maint - 1.1.0-2 - Rebuilt for Python 3.11 * Tue Mar 29 2022 Benjamin A. Beasley - 1.1.0-1 - Update to 1.1.0 * Thu Mar 24 2022 Benjamin A. Beasley - 1.0.2-1 - Initial package (close RHBZ#2067260) ## END: Generated by rpmautospec