Cleanup the tests (and docs) for Fedora 32 EOL

Related: rhbz#1950291
This commit is contained in:
Miro Hrončok 2021-05-27 19:27:39 +00:00
parent 9eb47b5d06
commit 18de094680
9 changed files with 0 additions and 109 deletions

View File

@ -245,9 +245,6 @@ These arguments are still required:
* Positional arguments: the extra name(s). * Positional arguments: the extra name(s).
Multiple subpackages are generated when multiple names are provided. 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 Limitations
----------- -----------

View File

@ -26,12 +26,6 @@ Summary: %{summary}
%autosetup -p1 -n Django-%{version} %autosetup -p1 -n Django-%{version}
%py3_shebang_fix django/conf/project_template/manage.py-tpl django/bin/django-admin.py %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 %generate_buildrequires
%pyproject_buildrequires %pyproject_buildrequires

View File

@ -49,14 +49,9 @@ sed -i \
%generate_buildrequires %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. # 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: # Note that [full] contains [plesk] and [route53] but we specify them manually instead:
%pyproject_buildrequires -e light -x plesk -x route53 %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 %build
@ -68,12 +63,10 @@ sed -i \
%pyproject_save_files lexicon %pyproject_save_files lexicon
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
%check %check
# we cannot use %%tox here, because the configured commands call poetry directly :/ # 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 # we use %%pytest instead, running a subset of tests not to waste CI time
%pytest -k "test_route53 or test_plesk" %pytest -k "test_route53 or test_plesk"
%endif
%files -n python3-dns-lexicon -f %{pyproject_files} %files -n python3-dns-lexicon -f %{pyproject_files}

View File

@ -32,10 +32,6 @@ Summary: %{summary}
%build %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 %pyproject_wheel

View File

@ -17,14 +17,6 @@ This package buildrequires a package with extra: raven[flask].
%package -n python3-httpbin %package -n python3-httpbin
Summary: %{summary} 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 %description -n python3-httpbin
%{summary}. %{summary}.

View File

@ -32,10 +32,6 @@ Summary: %{summary}
%build %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 %pyproject_wheel

View File

@ -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

View File

@ -1,13 +1,5 @@
Name: python-setuptools_scm 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 Version: 5.0.1
%else
Version: 3.5.0
%endif
Release: 0%{?dist} Release: 0%{?dist}
Summary: The blessed package to manage your versions by SCM tags 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 Here we test that %%pyproject_extras_subpkg works and generates
setuptools_scm[toml] extra subpackage. setuptools_scm[toml] extra subpackage.
Note that it only works on Fedora 33+.
We also check passing multiple -e flags to %%pyproject_buildrequires. We also check passing multiple -e flags to %%pyproject_buildrequires.
The tox environments also have a dependency on an extra ("toml"). The tox environments also have a dependency on an extra ("toml").
@ -45,15 +35,9 @@ Summary: %{summary}
%generate_buildrequires %generate_buildrequires
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
# Note that you should not run flake8-like linters in Fedora spec files, # 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. # here we do it solely to check the *ability* to use multiple toxenvs.
%pyproject_buildrequires -e %{default_toxenv}-test -e flake8 %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 %build
@ -66,7 +50,6 @@ Summary: %{summary}
%check %check
%if 0%{?fedora} >= 33 || 0%{?rhel} >= 9
# This tox should run all the toxenvs specified via -e in %%pyproject_buildrequires # 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) # We only run some of the tests (running all of them requires network connection and is slow)
%tox -- -- -k test_version | tee toxlog %tox -- -- -k test_version | tee toxlog
@ -74,7 +57,6 @@ Summary: %{summary}
# Internal check for our macros: Assert both toxenvs were executed. # Internal check for our macros: Assert both toxenvs were executed.
grep -F 'py%{python3_version_nodots}-test: commands succeeded' toxlog grep -F 'py%{python3_version_nodots}-test: commands succeeded' toxlog
grep -F 'flake8: commands succeeded' toxlog grep -F 'flake8: commands succeeded' toxlog
%endif
# Internal check for our macros # Internal check for our macros
# making sure that %%{pyproject_ghost_distinfo} has the right content # making sure that %%{pyproject_ghost_distinfo} has the right content

View File

@ -49,9 +49,6 @@
- setuptools_scm: - setuptools_scm:
dir: . dir: .
run: ./mocktest.sh python-setuptools_scm run: ./mocktest.sh python-setuptools_scm
- requests:
dir: .
run: ./mocktest.sh python-requests
- ipykernel: - ipykernel:
dir: . dir: .
run: ./mocktest.sh python-ipykernel run: ./mocktest.sh python-ipykernel