Upgrade to 2.0.25

Modernize the spec file in the process.

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
This commit is contained in:
Nils Philippsen 2024-02-01 20:02:37 +01:00
parent 86ed0d5d84
commit 4cdab0416c
3 changed files with 29 additions and 20 deletions

1
.gitignore vendored
View File

@ -116,3 +116,4 @@ SQLAlchemy-0.6.1.tar.gz
/SQLAlchemy-1.4.49.tar.gz
/SQLAlchemy-1.4.50.tar.gz
/SQLAlchemy-1.4.51.tar.gz
/SQLAlchemy-2.0.25.tar.gz

View File

@ -2,21 +2,26 @@
%bcond_with xdist
%global srcname SQLAlchemy
%global canonicalname %{py_dist_name %{srcname}}
%global python_pkg_extras \
asyncio \
mssql_pymssql \
mssql_pyodbc \
mysql \
mysql_connector \
mypy \
postgresql \
postgresql_pg8000 \
postgresql_asyncpg \
pymysql \
aiomysql \
aiosqlite
aioodbc \
aiosqlite \
asyncmy
Name: python-sqlalchemy
Version: 1.4.51
Name: python-%{canonicalname}
Version: 2.0.25
# cope with pre-release versions containing tildes
%global srcversion %{lua: srcversion, num = rpm.expand("%{version}"):gsub("~", ""); print(srcversion);}
Release: %autorelease
@ -29,12 +34,12 @@ Source0: %{pypi_source %{srcname} %{srcversion}}
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: gcc
BuildRequires: python3-devel >= 3.6
BuildRequires: python3-greenlet >= 1.0
BuildRequires: python3-setuptools
BuildRequires: python3-pytest
BuildRequires: python3-devel >= 3.7
# The dependencies needed for testing dont get auto-generated.
BuildRequires: python3dist(mypy)
BuildRequires: python3dist(pytest)
%if %{with xdist}
BuildRequires: python3-pytest-xdist
BuildRequires: python3dist(pytest-xdist)
%endif
%description
@ -59,7 +64,7 @@ define the join conditions explicitly, to bridge the gap between database and
domain.
# Subpackages to ensure dependencies enabling extra functionality
%{?python_extras_subpkg:%python_extras_subpkg -n python3-sqlalchemy -i %{python3_sitearch}/*.egg-info %python_pkg_extras}
%pyproject_extras_subpkg -n python3-sqlalchemy %python_pkg_extras
%package doc
Summary: Documentation for SQLAlchemy
@ -69,20 +74,27 @@ BuildArch: noarch
Documentation for SQLAlchemy.
%generate_buildrequires
%pyproject_buildrequires
%prep
%autosetup -n %{srcname}-%{srcversion} -p1
%autosetup -n %{srcname}-%{version} -p1
%build
%py3_build
%pyproject_wheel
%install
%py3_install
%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 %{buildroot}%{_pkgdocdir}/
cp -a doc examples %{buildroot}%{_pkgdocdir}/
# remove unnecessary scripts for building documentation
rm -rf %{buildroot}%{_pkgdocdir}/doc/build
find %{buildroot}%{_pkgdocdir}/doc | while read long; do
find %{buildroot}%{_pkgdocdir} | while read long; do
short="${long#%{buildroot}}"
if [ -d "$long" ]; then
echo "%%doc %%dir $short"
@ -104,13 +116,9 @@ done > doc-files.txt
%files doc -f doc-files.txt
%doc examples
%files -n python3-sqlalchemy
%license LICENSE
%files -n python3-sqlalchemy -f %{pyproject_files}
%doc README.rst
%{python3_sitearch}/SQLAlchemy-*.egg-info/
%{python3_sitearch}/sqlalchemy/
%changelog
%autochangelog

View File

@ -1 +1 @@
SHA512 (SQLAlchemy-1.4.51.tar.gz) = be27a41f442428cdb5cc6a20af2de9424384457475d16a7d7167b718256e208766e2ba8d53bef2b314aafe87b3d9b0c5f9af6e4c03f53fb194671cfaca6e50b5
SHA512 (SQLAlchemy-2.0.25.tar.gz) = 60b31a167f46a623f76e349f6a3f5a1696e1a04aee8dec2750396c715831a242a96e281ee7fcbfa26f82e6318573ab58e97d21bd93d02bbe3ff962777d809146