diff --git a/README.md b/README.md index 7865cd7..a4a63fd 100644 --- a/README.md +++ b/README.md @@ -245,9 +245,6 @@ These arguments are still required: * Positional arguments: the extra name(s). Multiple subpackages are generated when multiple names are provided. -The macro does nothing on Fedora 32 and lower, as automation around -extras was only added in f33. - Limitations ----------- diff --git a/tests/python-django.spec b/tests/python-django.spec index b702fce..bb5da10 100644 --- a/tests/python-django.spec +++ b/tests/python-django.spec @@ -26,12 +26,6 @@ Summary: %{summary} %autosetup -p1 -n Django-%{version} %py3_shebang_fix django/conf/project_template/manage.py-tpl django/bin/django-admin.py -%if 0%{?fedora} < 32 && 0%{?rhel} < 9 -# Python RPM dependency generator doesn't support ~= yet -# https://bugzilla.redhat.com/show_bug.cgi?id=1758141 -sed -i 's/asgiref ~= /asgiref >= /' setup.py -%endif - %generate_buildrequires %pyproject_buildrequires diff --git a/tests/python-dns-lexicon.spec b/tests/python-dns-lexicon.spec index c64f863..fb6026d 100644 --- a/tests/python-dns-lexicon.spec +++ b/tests/python-dns-lexicon.spec @@ -49,14 +49,9 @@ sed -i \ %generate_buildrequires -%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 # We use the "light" toxenv because the default one installs the [full] extra and we don't have all the deps. # Note that [full] contains [plesk] and [route53] but we specify them manually instead: %pyproject_buildrequires -e light -x plesk -x route53 -%else -# older Fedoras don't have the required runtime dependencies, so we don't test it there -%pyproject_buildrequires -%endif %build @@ -68,12 +63,10 @@ sed -i \ %pyproject_save_files lexicon -%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 %check # we cannot use %%tox here, because the configured commands call poetry directly :/ # we use %%pytest instead, running a subset of tests not to waste CI time %pytest -k "test_route53 or test_plesk" -%endif %files -n python3-dns-lexicon -f %{pyproject_files} diff --git a/tests/python-flit-core.spec b/tests/python-flit-core.spec index 02cb80a..45df12b 100644 --- a/tests/python-flit-core.spec +++ b/tests/python-flit-core.spec @@ -32,10 +32,6 @@ Summary: %{summary} %build -%if 0%{?fedora} < 33 && 0%{?rhel} < 9 -# the old pip version cannot handle backend-path properly, let's help it: -export PYTHONPATH=$PWD -%endif %pyproject_wheel diff --git a/tests/python-httpbin.spec b/tests/python-httpbin.spec index 9467689..fde9d5b 100644 --- a/tests/python-httpbin.spec +++ b/tests/python-httpbin.spec @@ -17,14 +17,6 @@ This package buildrequires a package with extra: raven[flask]. %package -n python3-httpbin Summary: %{summary} -%if 0%{?fedora} < 33 && 0%{?rhel} < 9 -# Old Fedoras don't understand Python extras yet -# This package needs raven[flask] -# So we add the transitive dependencies manually: -BuildRequires: %{py3_dist blinker flask} -Requires: %{py3_dist blinker flask} -%endif - %description -n python3-httpbin %{summary}. diff --git a/tests/python-poetry-core.spec b/tests/python-poetry-core.spec index a5844a8..5a5af4d 100644 --- a/tests/python-poetry-core.spec +++ b/tests/python-poetry-core.spec @@ -32,10 +32,6 @@ Summary: %{summary} %build -%if 0%{?fedora} < 33 && 0%{?rhel} < 9 -# the old pip version cannot handle backend-path properly, let's help it: -export PYTHONPATH=$PWD -%endif %pyproject_wheel diff --git a/tests/python-requests.spec b/tests/python-requests.spec deleted file mode 100644 index 4e42a62..0000000 --- a/tests/python-requests.spec +++ /dev/null @@ -1,56 +0,0 @@ -Name: python-requests -Version: 2.25.1 -Release: 0%{?dist} -Summary: Requests is an elegant and simple HTTP library for Python - -License: ASL 2.0 -URL: https://requests.readthedocs.io/ -Source0: %{pypi_source requests} -BuildArch: noarch - -BuildRequires: python3-devel -BuildRequires: pyproject-rpm-macros - -%description -This package uses multiple extras in %%pyproject_extras_subpkg and in -%%pyproject_buildrequires. -This test is mostly obsoleted by python-dns-lexicon.spec on Fedora 33+, -but we keep it around until Fedora 32 EOL. - - -%package -n python3-requests -Summary: %{summary} - -%description -n python3-requests -%{summary}. - - -%pyproject_extras_subpkg -n python3-requests security socks - - -%prep -%autosetup -n requests-%{version} - - -%generate_buildrequires -%pyproject_buildrequires -x security,socks - - -%build -%pyproject_wheel - - -%install -%pyproject_install -%pyproject_save_files requests - - -%check -# Internal check for our macros -# making sure that %%pyproject_buildrequires pulled in deps for both extras -%{python3} -c 'import cryptography, socks' - - -%files -n python3-requests -f %{pyproject_files} -%doc README.* -%license LICENSE diff --git a/tests/python-setuptools_scm.spec b/tests/python-setuptools_scm.spec index dfa30e0..1602a49 100644 --- a/tests/python-setuptools_scm.spec +++ b/tests/python-setuptools_scm.spec @@ -1,13 +1,5 @@ Name: python-setuptools_scm - -# For testing purposes, we package different versions on different Fedoras, -# because otherwise we would miss some dependencies. -# Please, don't write spec files like this in Fedora, it is forbidden. -%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 Version: 5.0.1 -%else -Version: 3.5.0 -%endif Release: 0%{?dist} Summary: The blessed package to manage your versions by SCM tags @@ -25,8 +17,6 @@ BuildRequires: /usr/bin/hg Here we test that %%pyproject_extras_subpkg works and generates setuptools_scm[toml] extra subpackage. -Note that it only works on Fedora 33+. - We also check passing multiple -e flags to %%pyproject_buildrequires. The tox environments also have a dependency on an extra ("toml"). @@ -45,15 +35,9 @@ Summary: %{summary} %generate_buildrequires -%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 # Note that you should not run flake8-like linters in Fedora spec files, # here we do it solely to check the *ability* to use multiple toxenvs. %pyproject_buildrequires -e %{default_toxenv}-test -e flake8 -%else -# older Fedoras don't have the required runtime dependencies, so we don't test it there -%pyproject_buildrequires -%endif - %build @@ -66,7 +50,6 @@ Summary: %{summary} %check -%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9 # This tox should run all the toxenvs specified via -e in %%pyproject_buildrequires # We only run some of the tests (running all of them requires network connection and is slow) %tox -- -- -k test_version | tee toxlog @@ -74,7 +57,6 @@ Summary: %{summary} # Internal check for our macros: Assert both toxenvs were executed. grep -F 'py%{python3_version_nodots}-test: commands succeeded' toxlog grep -F 'flake8: commands succeeded' toxlog -%endif # Internal check for our macros # making sure that %%{pyproject_ghost_distinfo} has the right content diff --git a/tests/tests.yml b/tests/tests.yml index 5441de8..70c6d70 100644 --- a/tests/tests.yml +++ b/tests/tests.yml @@ -49,9 +49,6 @@ - setuptools_scm: dir: . run: ./mocktest.sh python-setuptools_scm - - requests: - dir: . - run: ./mocktest.sh python-requests - ipykernel: dir: . run: ./mocktest.sh python-ipykernel