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.49.tar.gz
/SQLAlchemy-1.4.50.tar.gz /SQLAlchemy-1.4.50.tar.gz
/SQLAlchemy-1.4.51.tar.gz /SQLAlchemy-1.4.51.tar.gz
/SQLAlchemy-2.0.25.tar.gz

View File

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

View File

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