From 1c897299663e0c7ad0268395a418b09eb455d29a Mon Sep 17 00:00:00 2001 From: rdobuilder Date: May 23 2024 11:21:47 +0000 Subject: Update to 2.0.29 Related-to: https://review.rdoproject.org/r/q/I9a91528718365b55048e817ffe1913320c4aa71a --- diff --git a/.python-sqlalchemy.metadata b/.python-sqlalchemy.metadata index f031733..dd0cf66 100644 --- a/.python-sqlalchemy.metadata +++ b/.python-sqlalchemy.metadata @@ -1 +1 @@ -343aa9ade5fc6b01933f5d2d8fc97c75005ac9fa SOURCES/SQLAlchemy-1.2.7.tar.gz +25f560700f60e3d217ba43ca499a95a92aee24b2 SOURCES/SQLAlchemy-2.0.29.tar.gz diff --git a/SPECS/python-sqlalchemy.spec b/SPECS/python-sqlalchemy.spec index 941064c..4331e70 100644 --- a/SPECS/python-sqlalchemy.spec +++ b/SPECS/python-sqlalchemy.spec @@ -1,47 +1,60 @@ -%if 0%{?fedora} || 0%{?rhel} > 7 -%global with_python3 1 -%endif +# Mypy plugin is deprecated in 2.0. mypy is not in RHEL. +%bcond mypy %{undefined rhel} -%if 0%{?rhel} > 7 -# Disable python2 build by default -%bcond_with python2 +# The asyncmy Python package isn’t available in x86 (32bit) +%ifnarch %ix86 +%bcond asyncmy %{undefined rhel} %else -%bcond_without python2 +%bcond asyncmy 0 %endif +# Tests crash when being run by pytest-xdist +%bcond xdist 0 + %global srcname SQLAlchemy +%global canonicalname %{py_dist_name %{srcname}} + +%if %{undefined rhel} +%global python_pkg_extras \ + asyncio \ + mssql_pymssql \ + mssql_pyodbc \ + mysql \ + mysql_connector \ + %{?with_mypy:mypy} \ + postgresql \ + postgresql_pg8000 \ + postgresql_asyncpg \ + pymysql \ + aiomysql \ + aioodbc \ + aiosqlite \ + %{?with_asyncmy:asyncmy} +%endif -Name: python-sqlalchemy -Version: 1.2.7 -Release: 3%{?dist} -Summary: Modular and flexible ORM library for python +Name: python-%{canonicalname} +Version: 2.0.29 +# cope with pre-release versions containing tildes +%global srcversion %{lua: srcversion, num = rpm.expand("%{version}"):gsub("~", ""); print(srcversion);} +Release: 1%{?dist} +Summary: Modular and flexible ORM library for Python -Group: Development/Libraries License: MIT -URL: http://www.sqlalchemy.org/ -Source0: https://files.pythonhosted.org/packages/source/S/%{srcname}/%{srcname}-%{version}.tar.gz - -# Fix tests for sqlite 3.24 -# https://github.com/zzzeek/sqlalchemy/pull/452 -Patch1: python-sqlalchemy-1.2.8-sqlite-3.24.patch +URL: https://www.sqlalchemy.org/ +Source0: %{pypi_source %{srcname} %{srcversion}} +BuildRequires: coreutils +BuildRequires: findutils BuildRequires: gcc - -%if %{with python2} -BuildRequires: python2-devel >= 2.6 -BuildRequires: python2-setuptools -BuildRequires: python2-mock -BuildRequires: python2-pytest -%endif # with python2 - -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pytest +BuildRequires: python3-devel >= 3.7 +# The dependencies needed for testing don’t get auto-generated. +BuildRequires: python3dist(pytest) +%if %{with xdist} +BuildRequires: python3dist(pytest-xdist) %endif %description -SQLAlchemy is an Object Relational Mappper (ORM) that provides a flexible, +SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible, high-level interface to SQL databases. Database and domain concepts are decoupled, allowing both sides maximum flexibility and power. SQLAlchemy provides a powerful mapping layer that can work as automatically or as manually @@ -49,21 +62,14 @@ as you choose, determining relationships based on foreign keys or letting you define the join conditions explicitly, to bridge the gap between database and domain. -%package doc -Summary: Documentation for SQLAlchemy -BuildArch: noarch - -%description doc -Documentation for SQLAlchemy - -%if %{with python2} -%package -n python2-sqlalchemy -Summary: Modular and flexible ORM library for python -Group: Development/Libraries -%{?python_provide:%python_provide python2-sqlalchemy} +%package -n python3-sqlalchemy +Summary: %{summary} +%if %{without asyncmy} +Obsoletes: python3-sqlalchemy+asyncmy < %{version}-%{release} +%endif -%description -n python2-sqlalchemy -SQLAlchemy is an Object Relational Mappper (ORM) that provides a flexible, +%description -n python3-sqlalchemy +SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible, high-level interface to SQL databases. Database and domain concepts are decoupled, allowing both sides maximum flexibility and power. SQLAlchemy provides a powerful mapping layer that can work as automatically or as manually @@ -71,89 +77,379 @@ as you choose, determining relationships based on foreign keys or letting you define the join conditions explicitly, to bridge the gap between database and domain. -This package includes the python 2 version of the module. -%endif # with python2 +%if %{undefined rhel} +# Subpackages to ensure dependencies enabling extra functionality +%pyproject_extras_subpkg -n python3-sqlalchemy %python_pkg_extras +%endif -%if 0%{?with_python3} -%package -n python3-sqlalchemy -Summary: Modular and flexible ORM library for python -Group: Development/Libraries -%{?python_provide:%python_provide python%{python3_pkgversion}-sqlalchemy} +%package doc +Summary: Documentation for SQLAlchemy +BuildArch: noarch -%description -n python3-sqlalchemy -SQLAlchemy is an Object Relational Mappper (ORM) that provides a flexible, -high-level interface to SQL databases. Database and domain concepts are -decoupled, allowing both sides maximum flexibility and power. SQLAlchemy -provides a powerful mapping layer that can work as automatically or as manually -as you choose, determining relationships based on foreign keys or letting you -define the join conditions explicitly, to bridge the gap between database and -domain. +%description doc +Documentation for SQLAlchemy. -This package includes the python 3 version of the module. -%endif # with_python3 -# Filter unnecessary dependencies -%global __provides_exclude_from ^(%{python2_sitearch}|%{python3_sitearch})/.*\\.so$ +%generate_buildrequires +%pyproject_buildrequires %{!?rhel:-x %{gsub %{quote:%python_pkg_extras} %%s+ ,}} -%prep -%setup -q -n %{srcname}-%{version} -%patch1 -p1 -b .sqlite-3.24 +%prep +%autosetup -n %{srcname}-%{version} -p1 +# CentOS Strem 9 has cython 0.29.22 +sed -i 's/cython>=0.29.24/cython>=0.29/g' pyproject.toml %build -%if %{with python2} -%py2_build -%endif # with python2 - -%if 0%{?with_python3} -%py3_build -%endif +%pyproject_wheel %install -%if %{with python2} -%py2_install -%endif # with python2 - -%if 0%{?with_python3} -%py3_install -%endif +%pyproject_install +%pyproject_save_files %{canonicalname} +# Work around poetry not listing license files as such in package metadata. +sed -i -e 's|^\(.*/LICENSE\)|%%license \1|g' %{pyproject_files} +install -d %{buildroot}%{_pkgdocdir} +cp -a doc examples %{buildroot}%{_pkgdocdir}/ # remove unnecessary scripts for building documentation -rm -rf doc/build +rm -rf %{buildroot}%{_pkgdocdir}/doc/build +find %{buildroot}%{_pkgdocdir} | while read long; do + short="${long#%{buildroot}}" + if [ -d "$long" ]; then + echo "%%doc %%dir $short" + else + if [ "$short" != "${short/copyright/}" ]; then + echo "%%license $short" + else + echo "%%doc $short" + fi + fi +done > doc-files.txt -%check -%if %{with python2} -PYTHONPATH=. %{__python2} -m pytest test -%endif # with python2 -%if 0%{?with_python3} -PYTHONPATH=. %{__python3} -m pytest test +%check +%pytest test \ +%if %{without mypy} + -k 'not Mypy' \ +%endif +%if %{with xdist} +--numprocesses=auto %endif -%files doc -%doc doc examples +%files doc -f doc-files.txt -%if %{with python2} -%files -n python2-sqlalchemy -%license LICENSE +%files -n python3-sqlalchemy -f %{pyproject_files} %doc README.rst -%{python2_sitearch}/* -%endif # with python2 - -%if 0%{?with_python3} -%files -n python3-sqlalchemy -%license LICENSE -%doc README.rst -%{python3_sitearch}/* -%endif # with_python3 %changelog -* Wed Aug 01 2018 Petr Viktorin - 1.2.7-3 -- Fix tests with SQLite 3.24+ +* Sun Mar 24 2024 Nils Philippsen - 2.0.29-1 +- Update to 2.0.29 + +* Mon Mar 04 2024 Nils Philippsen - 2.0.28-1 +- Update to 2.0.28 + +* Mon Feb 19 2024 Nils Philippsen - 2.0.27-1 +- Update to 2.0.27 + +* Mon Feb 12 2024 Yaakov Selkowitz - 2.0.26-3 +- Disable all extras in RHEL builds + +* Sun Feb 11 2024 Nils Philippsen - 2.0.26-2 +- Don’t build asyncmy extra package on x86 (32bit) + +* Sun Feb 11 2024 Nils Philippsen - 2.0.26-1 +- Update to 2.0.26 + +* Sun Feb 11 2024 Nils Philippsen - 2.0.25-3 +- Generate build requirements for extra packages + +* Sun Feb 04 2024 Yaakov Selkowitz - 2.0.25-2 +- Avoid mypy dependency in RHEL builds + +* Thu Feb 01 2024 Nils Philippsen - 2.0.25-1 +- Upgrade to 2.0.25 + +* Fri Jan 26 2024 Fedora Release Engineering - 1.4.51-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Nils Philippsen - 1.4.51-1 +- Update to 1.4.51 + +* Thu Jan 18 2024 Nils Philippsen - 1.4.50-3 +- Reintroduce aiomysql version requirement + +* Thu Nov 16 2023 Nils Philippsen - 1.4.50-2 +- Patch to accept “too low” aiomysql version + +* Thu Nov 02 2023 Nils Philippsen - 1.4.50-1 +- Version 1.4.50 + +* Fri Jul 21 2023 Fedora Release Engineering - 1.4.49-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Thu Jul 06 2023 Nils Philippsen - 1.4.49-1 +- Version 1.4.49 + +* Mon Jul 03 2023 Miro Hrončok - 1.4.49~~20230703cd56e87-1 +- Update to a git snapshot (future 1.4.49) for Python 3.12 support + +* Thu Jun 15 2023 Python Maint - 1.4.48-2 +- Rebuilt for Python 3.12 + +* Sun May 21 2023 Nils Philippsen - 1.4.48-1 +- Version 1.4.48 + +* Fri Jan 20 2023 Fedora Release Engineering - 1.4.46-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Wed Jan 04 2023 Nils Philippsen - 1.4.46-1 +- Version 1.4.46 + +* Mon Dec 12 2022 Nils Philippsen - 1.4.45-3 +- Disable xdist across the board + +* Mon Dec 12 2022 Nils Philippsen - 1.4.45-2 +- Remove obsolete patch + +* Mon Dec 12 2022 Nils Philippsen - 1.4.45-1 +- Version 1.4.45 + +* Wed Dec 07 2022 Troy Dawson - 1.4.44-4 +- Fix typo + +* Tue Dec 06 2022 Yaakov Selkowitz +- Disable xdist in ELN builds + +* Mon Nov 14 2022 Nils Philippsen - 1.4.44-2 +- Fix test failing on 32bit + +* Mon Nov 14 2022 Nils Philippsen - 1.4.44-1 +- Version 1.4.44 + +* Wed Nov 09 2022 Nils Philippsen - 1.4.43-2 +- Test without pytest-xdist on Fedora 38 + +* Mon Nov 07 2022 Nils Philippsen - 1.4.43-1 +- Version 1.4.43 + +* Wed Oct 26 2022 Nils Philippsen - 1.4.42-1 +- Version 1.4.42 -* Thu Jun 14 2018 Charalampos Stratakis - 1.2.7-2 -- Conditionalize the python2 subpackage +* Wed Sep 07 2022 Nils Philippsen - 1.4.41-1 +- Version 1.4.41 + +* Tue Aug 09 2022 Nils Philippsen - 1.4.40-1 +- Version 1.4.40 + +* Mon Jul 25 2022 Miro Hrončok +- Remove obsolete cruft from the specfile, follow the packaging guidelines + +* Fri Jul 22 2022 Fedora Release Engineering - 1.4.39-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jun 24 2022 Nils Philippsen - 1.4.39-1 +- version 1.4.39 + +* Fri Jun 24 2022 Nils Philippsen - 1.4.38-1 +- version 1.4.38 + +* Tue Jun 14 2022 Python Maint - 1.4.37-2 +- Rebuilt for Python 3.11 + +* Wed Jun 08 2022 Nils Philippsen +- Generally BR: python3-pytest-xdist, also on EL9 + +* Wed Jun 01 2022 Nils Philippsen - 1.4.37-1 +- version 1.4.37 + +* Wed Apr 27 2022 Nils Philippsen - 1.4.36-1 +- version 1.4.36 + +* Thu Apr 07 2022 Nils Philippsen - 1.4.35-1 +- version 1.4.35 + +* Fri Apr 01 2022 Nils Philippsen - 1.4.34-1 +- version 1.4.34 + +* Tue Mar 08 2022 Nils Philippsen - 1.4.32-1 +- version 1.4.32 +- don't BR: python3-pytest-xdist on EL9 +- remove obsolete (no-op) tweak of setup.cfg + +* Fri Jan 21 2022 Nils Philippsen - 1.4.31-1 +- version 1.4.31 + +* Thu Dec 23 2021 Nils Philippsen - 1.4.29-1 +- version 1.4.29 + +* Wed Dec 15 2021 Nils Philippsen - 1.4.28-1 +- version 1.4.28 +- remove build dependency on python3-mock + +* Fri Nov 12 2021 Nils Philippsen - 1.4.27-1 +- version 1.4.27 + +* Tue Oct 26 2021 Joel Capitao - 1.4.26-1 +- Update to 1.4.26. Fixes rhbz#2015705 + +* Sun Sep 26 2021 Kevin Fenzi - 1.4.25-1 +- Update to 1.4.25. Fixes rhbz#1995262 + +* Wed Aug 25 2021 Nils Philippsen - 1.4.23-1 +- version 1.4.23 + +* Sun Aug 08 2021 Kevin Fenzi - 1.4.22-1 +- Update to 1.4.22. Fixes rhbz#1975029 + +* Fri Jul 23 2021 Fedora Release Engineering - 1.4.18-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Sun Jun 13 2021 Nils Philippsen - 1.4.18-1 +- version 1.4.18 + +* Thu Jun 03 2021 Python Maint - 1.4.15-2 +- Rebuilt for Python 3.10 + +* Fri May 14 2021 Nils Philippsen - 1.4.15-1 +- version 1.4.15 + +* Mon May 10 2021 Nils Philippsen - 1.4.14-1 +- version 1.4.14 +- drop Python 2.x support +- define extras subpackages + +* Fri Apr 30 2021 Tomas Hrnciar - 1.3.22-3 +- Disabled failing test test_pyodbc_extra_connect_azure + +* Wed Jan 27 2021 Fedora Release Engineering - 1.3.22-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Dec 21 2020 Nils Philippsen - 1.3.22-1 +- version 1.3.22 + +* Sun Nov 01 2020 Nils Philippsen - 1.3.20-1 +- version 1.3.20 + +* Tue Aug 18 2020 Nils Philippsen - 1.3.19-1 +- version 1.3.19 + +* Wed Jul 29 2020 Fedora Release Engineering - 1.3.18-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 10 2020 Nils Philippsen - 1.3.18-1 +- version 1.3.18 + +* Sun May 24 2020 Miro Hrončok - 1.3.17-3 +- Rebuilt for Python 3.9 + +* Fri May 22 2020 Miro Hrončok - 1.3.17-2 +- Bootstrap for Python 3.9 + +* Sat May 16 2020 Nils Philippsen - 1.3.17-1 +- version 1.3.17 + +* Thu Mar 26 2020 Nils Philippsen - 1.3.15-1 +- version 1.3.15 +- quieten %%setup + +* Thu Jan 30 2020 Fedora Release Engineering - 1.3.13-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Sun Jan 26 2020 Nils Philippsen - 1.3.13-1 +- version 1.3.13 + +* Wed Dec 18 2019 Nils Philippsen - 1.3.12-1 +- version 1.3.12 + +* Tue Nov 19 2019 Randy Barlow - 1.3.11-1 +- Update to 1.3.11 (#1771196). +- https://docs.sqlalchemy.org/en/13/changelog/changelog_13.html#change-1.3.11 + +* Wed Nov 13 2019 Nils Philippsen - 1.3.10-2 +- drop python2-sqlalchemy from F32 on + +* Fri Oct 18 2019 Nils Philippsen - 1.3.10-1 +- fix/skip tests that are broken on SQLite 3.30 + +* Wed Oct 16 2019 Nils Philippsen - 1.3.10-1 +- version 1.3.10 + +* Tue Sep 17 2019 Randy Barlow - 1.3.8-1 +- Update to 1.3.8 (#1747080). +- https://docs.sqlalchemy.org/en/13/changelog/changelog_13.html#change-1.3.8 + +* Sun Aug 25 2019 Nils Philippsen - 1.3.7-1 +- version 1.3.7 +- require python3-mock for building + +* Thu Aug 15 2019 Miro Hrončok - 1.3.6-2 +- Rebuilt for Python 3.8 + +* Sat Jul 27 2019 Nils Philippsen - 1.3.6-1 +- version 1.3.6 + +* Fri Jul 26 2019 Fedora Release Engineering - 1.3.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Jul 22 2019 Petr Viktorin - 1.3.5-2 +- Remove dependency on python2-xdist +- Enable multi-process testing using python3-xdist + +* Tue Jun 18 2019 Randy Barlow - 1.3.5-1 +- Update to 1.3.5 (#1721271). +- https://docs.sqlalchemy.org/en/13/changelog/changelog_13.html#change-1.3.5 + +* Mon Jun 03 2019 Nils Philippsen - 1.3.4-1 +- version 1.3.4 + +* Thu Apr 18 2019 Nils Philippsen - 1.3.3-1 +- version 1.3.3 + +* Wed Apr 10 2019 Nils Philippsen - 1.3.2-1 +- version 1.3.2 + +* Wed Mar 13 2019 Nils Philippsen - 1.3.1-1 +- version 1.3.1 + +* Tue Mar 05 2019 Nils Philippsen - 1.3.0-1 +- version 1.3.0 + +* Fri Mar 01 2019 Nils Philippsen - 1.3.0~b3-1 +- version 1.3.0b3 + +* Wed Feb 20 2019 Nils Philippsen - 1.2.18-1 +- version 1.2.18 + +* Sat Feb 02 2019 Fedora Release Engineering - 1.2.17-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Wed Jan 30 2019 Nils Philippsen - 1.2.17-1 +- version 1.2.17 + +* Sat Jan 12 2019 Nils Philippsen - 1.2.16-1 +- version 1.2.16 + +* Tue Oct 30 2018 Nils Philippsen - 1.2.12-1 +- version 1.2.12 + +* Tue Aug 21 2018 Nils Philippsen - 1.2.11-1 +- version 1.2.11 + +* Sun Jul 22 2018 Nils Philippsen - 1.2.10-1 +- version 1.2.10 + +* Sat Jul 14 2018 Fedora Release Engineering - 1.2.8-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Sun Jun 17 2018 Nils Philippsen - 1.2.8-3 +- rename patch, apply with backups +- fix failing test for sqlite 3.24 instead of skipping it + +* Thu Jun 14 2018 Miro Hrončok - 1.2.8-2 +- Rebuilt for Python 3.7 + +* Tue Jun 05 2018 Nils Philippsen - 1.2.8-1 +- version 1.2.8 * Sun Apr 22 2018 Nils Philippsen - 1.2.7-1 - version 1.2.7 @@ -573,3 +869,4 @@ PYTHONPATH=. %{__python3} -m pytest test * Wed May 31 2006 Shahms E. King 0.2.1-1 - Update to new upstream version +