## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; 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 Name: python-databases Summary: Async database support for Python Version: 0.9.0 Release: %autorelease License: BSD-3-Clause URL: https://www.encode.io/databases/ %global forgeurl https://github.com/encode/databases Source: %{forgeurl}/archive/%{version}/databases-%{version}.tar.gz BuildArch: noarch # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: python3-devel # Additional BR’s for testing, from requirements.txt only (therefore not # generated): # “Sync database drivers for standard tooling around # setup/teardown/migrations.” BuildRequires: python3dist(psycopg2) BuildRequires: python3dist(pymysql) # “Testing” # We have excluded formatters, linters, and analysis tools: autoflake, black, # codecov, isort, mypy, pytest-cov BuildRequires: python3dist(pytest) BuildRequires: python3dist(starlette) # Used only as a soft dependency of starlette BuildRequires: python3dist(requests) # Used only as a soft dependency of starlette.testclient BuildRequires: python3dist(httpx) %global common_description %{expand: Databases gives you simple asyncio support for a range of databases. It allows you to make queries using the powerful SQLAlchemy Core expression language, and provides support for PostgreSQL, MySQL, and SQLite. Databases is suitable for integrating against any async Web framework, such as Starlette, Sanic, Responder, Quart, aiohttp, Tornado, or FastAPI. Documentation: https://www.encode.io/databases/ Community: https://discuss.encode.io/c/databases} %description %{common_description} # README.md: # # Note that if you are using any synchronous SQLAlchemy functions such as # `engine.create_all()` or [alembic][alembic] migrations then you still have # to install a synchronous DB driver: [psycopg2][psycopg2] for PostgreSQL and # [pymysql][pymysql] for MySQL. # # Therefore we manually write out the extras metapackages for PostgreSQL and # MySQL backends so that we can add these drivers as weak dependencies # (Recommends). We can still handle the SQLite extras the easy way. %package -n python3-databases+postgresql Summary: Metapackage for python3-databases: postgresql extras Requires: python3-databases = %{version}-%{release} Recommends: python3dist(psycopg2) %description -n python3-databases+postgresql This is a metapackage bringing in postgresql extras requires for python3-databases. It makes sure the dependencies are installed. %files -n python3-databases+postgresql %ghost %{python3_sitelib}/*.dist-info %package -n python3-databases+asyncpg Summary: Metapackage for python3-databases: asyncpg extras Requires: python3-databases = %{version}-%{release} Recommends: python3dist(psycopg2) %description -n python3-databases+asyncpg This is a metapackage bringing in asyncpg extras requires for python3-databases. It makes sure the dependencies are installed. %files -n python3-databases+asyncpg %ghost %{python3_sitelib}/*.dist-info %package -n python3-databases+aiopg Summary: Metapackage for python3-databases: aiopg extras Requires: python3-databases = %{version}-%{release} Recommends: python3dist(psycopg2) # Provide upgrade/migration path for three releases: %if 0%{?fedora} && 0%{?fedora} < 40 Provides: python3-databases+postgresql_aiopg = %{version}-%{release} Obsoletes: python3-databases+postgresql_aiopg < 0.6.0-1 %endif %description -n python3-databases+aiopg This is a metapackage bringing in aiopg extras requires for python3-databases. It makes sure the dependencies are installed. %files -n python3-databases+aiopg %ghost %{python3_sitelib}/*.dist-info %package -n python3-databases+mysql Summary: Metapackage for python3-databases: mysql extras Requires: python3-databases = %{version}-%{release} Recommends: python3dist(pymysql) %description -n python3-databases+mysql This is a metapackage bringing in mysql extras requires for python3-databases. It makes sure the dependencies are installed. %files -n python3-databases+mysql %ghost %{python3_sitelib}/*.dist-info %package -n python3-databases+aiomysql Summary: Metapackage for python3-databases: aiomysql extras Requires: python3-databases = %{version}-%{release} Recommends: python3dist(pymysql) %description -n python3-databases+aiomysql This is a metapackage bringing in aiomysql extras requires for python3-databases. It makes sure the dependencies are installed. %files -n python3-databases+aiomysql %ghost %{python3_sitelib}/*.dist-info %package -n python3-databases+asyncmy Summary: Metapackage for python3-databases: asyncmy extras Recommends: python3dist(pymysql) Requires: python3-databases = %{version}-%{release} # Provide upgrade/migration path for three releases: %if 0%{?fedora} && 0%{?fedora} < 40 Provides: python3-databases+mysql_asyncmy = %{version}-%{release} Obsoletes: python3-databases+mysql_asyncmy < 0.6.0-1 %endif %description -n python3-databases+asyncmy This is a metapackage bringing in asyncmy extras requires for python3-databases. It makes sure the dependencies are installed. %files -n python3-databases+asyncmy %ghost %{python3_sitelib}/*.dist-info %pyproject_extras_subpkg -n python3-databases sqlite aiosqlite %package -n python3-databases Summary: %{summary} Obsoletes: python-databases-doc < 0.5.2-4 %description -n python3-databases %{common_description} %prep %autosetup -n databases-%{version} -p1 %generate_buildrequires %{pyproject_buildrequires \ -x postgresql \ -x asyncpg \ -x aiopg \ -x mysql \ -x aiomysql \ -x asyncmy \ -x sqlite \ -x aiosqlite} %build %pyproject_wheel %install %pyproject_install %pyproject_save_files -l databases %check # Since we won’t be able to test all of the backends, we start with an # import-only “smoke test” %pyproject_check_import # E ModuleNotFoundError: No module named 'tests' touch tests/__init__.py # We can only easily run the tests with SQLite; other databases require a # properly configured server, which we cannot in general provide as an # unprivileged user. However, see the MySQL support below. # # The following environment variable is a comma-separated list with (optional?) # whitespace. export TEST_DATABASE_URLS="sqlite:///testsuite, sqlite+aiosqlite:///testsuite" %pytest --verbose %files -n python3-databases -f %{pyproject_files} %doc CHANGELOG.md %doc README.md %changelog ## START: Generated by rpmautospec * Fri Jul 19 2024 Fedora Release Engineering - 0.9.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sat Jun 15 2024 Benjamin A. Beasley - 0.9.0-2 - Rebuilt for Python 3.13 (closes RHBZ#2291666) * Tue Apr 30 2024 Benjamin A. Beasley - 0.9.0-1 - Update to 0.9.0 (close RHBZ#2267340) * Tue Apr 30 2024 Benjamin A. Beasley - 0.8.0-9 - Remove bootstrap conditionals * Wed Jan 31 2024 Benjamin A. Beasley - 0.8.0-6 - Stop running mysql tests - Setting up the temporary mariadb test server has become impractical * Mon Jan 29 2024 Fedora Release Engineering - 0.8.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jan 26 2024 Fedora Release Engineering - 0.8.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Mon Jan 22 2024 Fedora Release Engineering - 0.8.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Dec 17 2023 Benjamin A. Beasley - 0.8.0-2 - Assert that %%pyproject_files contains a license file * Tue Aug 29 2023 Benjamin A. Beasley - 0.8.0-1 - Update to 0.8.0 (close RHBZ#2235410) * Fri Jul 21 2023 Fedora Release Engineering - 0.7.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Jul 05 2023 Benjamin A. Beasley - 0.7.0-7 - Rebuild for Python 3.12 (fix RHBZ#2220182) * Tue Jun 20 2023 Benjamin A. Beasley - 0.7.0-6 - Use new (rpm 4.17.1+) bcond style * Thu May 25 2023 Benjamin A. Beasley - 0.7.0-4 - Drop snapshot-versioning machinery from the spec file * Fri Jan 20 2023 Fedora Release Engineering - 0.7.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Wed Dec 21 2022 Benjamin A. Beasley - 0.7.0-2 - Leaf package: remove i686 support - We can do this because python-fastapi is now ExcludeArch: i686 - The package is now noarch without conditional dependencies * Sun Dec 18 2022 Benjamin A. Beasley - 0.7.0-1 - Update to 0.7.0 (close RHBZ#2154645) * Sat Dec 17 2022 Benjamin A. Beasley - 0.6.2^20221217git81cc6fd-1 - Package a post-release snapshot of 0.6.2 (fix RHBZ#2116709) * Wed Nov 30 2022 Benjamin A. Beasley - 0.6.1-5 - Patch for sqlalchemy >=1.42 * Wed Nov 30 2022 Benjamin A. Beasley - 0.6.1-4 - Fix MySQL server startup for tests * Sat Oct 22 2022 Benjamin A. Beasley - 0.6.1-3 - Add BR on httpx, for starlette.testclient * Fri Oct 21 2022 Benjamin A. Beasley - 0.6.1-2 - Better conditional for 32-bit architectures * Fri Aug 12 2022 Benjamin A. Beasley - 0.6.1-1 - Update to 0.6.1 (close RHBZ#2116709) * Fri Aug 12 2022 Benjamin A. Beasley - 0.6.0-5 - Update License to SPDX * Fri Jul 22 2022 Fedora Release Engineering - 0.6.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jun 14 2022 Python Maint - 0.6.0-3 - Rebuilt for Python 3.11 * Tue Jun 14 2022 Python Maint - 0.6.0-2 - Bootstrap for Python 3.11 * Tue May 31 2022 Benjamin A. Beasley - 0.6.0-1 - Update to 0.6.0 (close RHBZ#2091657) * Tue Apr 12 2022 Benjamin A. Beasley - 0.5.5-4 - Stop using “private” macro %%%%_pyproject_ghost_distinfo * Fri Mar 04 2022 Benjamin A. Beasley - 0.5.5-3 - Work around asyncmy 32-bit ExcludeArch * Fri Mar 04 2022 Benjamin A. Beasley - 0.5.5-2 - Do not patch in sqlalchemy[asyncio] extra dependency * Thu Mar 03 2022 Benjamin A. Beasley - 0.5.5-1 - Update to 0.5.5 (close RHBZ#2040765) - Add extras metapackage for “mysql+asyncmy” - Drop and obsolete extras metapackage for “mysql” backend, unsupported upstream for Python 3.10 and later, in favor of “mysql+asyncmy” - Run the tests for supported MySQL backends at RPM build time * Fri Jan 21 2022 Fedora Release Engineering - 0.5.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Sun Oct 10 2021 Benjamin A. Beasley - 0.5.3-2 - Work around RHBZ#2012590: depend on greenlet * Sun Oct 10 2021 Benjamin A. Beasley - 0.5.3-1 - Update to 0.5.3 (close RHBZ#2012577) * Fri Oct 01 2021 Benjamin A. Beasley - 0.5.2-4 - Drop the documentation subpackage entirely. * Mon Sep 13 2021 Benjamin A. Beasley - 0.5.2-3 - Let pyproject-rpm-macros handle the license file * Sun Sep 12 2021 Benjamin A. Beasley - 0.5.2-2 - Drop BR on pyproject-rpm-macros, now implied by python3-devel * Fri Sep 10 2021 Benjamin A. Beasley - 0.5.2-1 - Update to 0.5.2 (close RHBZ#2003094) * Wed Sep 08 2021 Benjamin A. Beasley - 0.5.1-2 - Reduce macro indirection in spec file * Thu Sep 02 2021 Benjamin A. Beasley - 0.5.1-1 - Update to 0.5.1 (close RHBZ#2000532) * Fri Aug 27 2021 Benjamin A. Beasley - 0.5.0-1 - Update to 0.5.0 (close RHBZ#1998268) * Wed Aug 11 2021 Benjamin A. Beasley - 0.4.3-10 - Add a build conditional for mkdocs; disable it since it is orphaned * Tue Jul 27 2021 Benjamin A. Beasley - 0.4.3-9 - Move %%generate_buildrequires after %%prep to make the spec file easier to follow * Tue Jun 08 2021 Python Maint - 0.4.3-5 - Rebuilt for Python 3.10 * Fri Jun 04 2021 Python Maint - 0.4.3-4 - Bootstrap for Python 3.10 * Fri May 28 2021 Benjamin A. Beasley - 0.4.3-3 - Build documentation without the mkdocs-material theme * Fri May 14 2021 Benjamin A. Beasley - 0.4.3-2 - Patch in SQLAlchemy 1.4 support from upstream PR#299 on Fedora 35 - Reimplement databases-0.4.3-wayward-license-file.patch using sed in %%prep * Tue Apr 27 2021 Benjamin A. Beasley - 0.4.3-1 - Initial package ## END: Generated by rpmautospec