diff --git a/python-psycopg3.spec b/python-psycopg3.spec index 74a078b..18119c1 100644 --- a/python-psycopg3.spec +++ b/python-psycopg3.spec @@ -41,12 +41,21 @@ sed -i '/pproxy/d' setup.py # to be tested sed -i '/pytest-cov/d' setup.py -# This line removes the version, since it is not supported +# This line removes the version since it is not supported # in Fedora, introduces breaking changes in package sed -i -r 's/(pytest-asyncio).*",/\1",/' setup.py -# Tests fail when installed since DNS configuration is not -# available +# Remove versions to ensure build on Fedora 35 +# These versions should not be needed as always in +# upstream, there are versions with no breaking changes +%if 0%{?fedora} < 36 +sed -i -r 's/(wheel).*/\1"\]/' pyproject.toml +sed -i -r 's/(pytest) >=.*",/\1",/' setup.py +sed -i -r 's/(pytest-randomly).*",/\1",/' setup.py +%endif + +# Tests fail when installed since DNS configuration is not +# available sed -i '/dnspython/d' setup.py %generate_buildrequires @@ -65,15 +74,22 @@ pushd ../tests/ # Remove failing tests rm test_typing.py test_module.py # Remove all files in pool/ folder except the fix_pool.py. -# The pool/fix_pool.py is in conftest.py as plugin +# The pool/fix_pool.py is in conftest.py as plugin find pool/ ! -name 'fix_pool.py' -type f -exec rm -f {} + popd %check -# Launchs tests with correctly set pytest-asyncio which -# corrects the breaking change caused by the version -%pytest ../tests/ --asyncio-mode=auto + +%if 0%{?fedora} > 36 + # Launchs tests with correctly set pytest-asyncio which + # corrects the breaking change caused by the version + %pytest ../tests/ --asyncio-mode=auto +%else + # Python 36 and lower do not have the version which breaks + # the process available yet + %pytest ../tests/ +%endif %files -n python3-%{src_name} -f %{pyproject_files} @@ -82,5 +98,10 @@ popd %changelog +* Fri May 13 2022 Ondrej Sloup - 3.0.11-2 +- Add support for Fedora 35 and 36 +- Remove spaces at the end of the file +- Pray that Friday 13 will not break anything + * Thu Apr 28 2022 Ondrej Sloup - 3.0.11-1 -- Create package from git source (#2079251) +- Create package from git source (#2079251) \ No newline at end of file