Remove obsolete cruft from the specfile, follow the packaging guidelines

Remove also extra packages we have no runtime dependencies for

Related: rhbz#2084556
This commit is contained in:
Sergio Correia 2022-06-18 08:15:04 -03:00
parent 2a8b96be86
commit 7a3a264775
1 changed files with 21 additions and 27 deletions

View File

@ -9,26 +9,20 @@
%global python_pkg_extras \
asyncio \
mssql_pymssql \
mssql_pyodbc \
mysql \
postgresql \
postgresql_pg8000 \
postgresql_asyncpg \
pymysql \
aiomysql \
aiosqlite
pymysql
Name: python-sqlalchemy
Version: 1.4.37
# cope with pre-release versions containing tildes
%global srcversion %{lua: srcversion, num = rpm.expand("%{version}"):gsub("~", ""); print(srcversion);}
Release: 2%{?dist}
Summary: Modular and flexible ORM library for python
Release: 3%{?dist}
Summary: Modular and flexible ORM library for Python
License: MIT
URL: http://www.sqlalchemy.org/
Source0: https://files.pythonhosted.org/packages/source/S/%{srcname}/%{srcname}-%{srcversion}.tar.gz
URL: https://www.sqlalchemy.org/
Source0: %{pypi_source %{srcname} %{srcversion}}
BuildRequires: gcc
BuildRequires: python3-devel >= 3.6
@ -48,19 +42,8 @@ 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.
%package doc
Summary: Documentation for SQLAlchemy
BuildArch: noarch
%description doc
Documentation for SQLAlchemy
%package -n python3-sqlalchemy
Summary: Modular and flexible ORM library for python
%{?python_provide:%python_provide python%{python3_pkgversion}-sqlalchemy}
Obsoletes: python2-sqlalchemy < 1.3.10-2
Summary: %{summary}
%description -n python3-sqlalchemy
SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible,
@ -71,11 +54,16 @@ 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 3 version of the module.
# Subpackages to ensure dependencies enabling extra functionality
%{?python_extras_subpkg:%python_extras_subpkg -n python3-sqlalchemy -i %{python3_sitearch}/*.egg-info %python_pkg_extras}
%package doc
Summary: Documentation for SQLAlchemy
BuildArch: noarch
%description doc
Documentation for SQLAlchemy.
%prep
%setup -q -n %{srcname}-%{srcversion}
@ -90,7 +78,7 @@ This package includes the python 3 version of the module.
rm -rf doc/build
%check
PYTHONPATH=. %{__python3} -m pytest test \
%pytest test \
%if %{with xdist}
--numprocesses=auto
%endif
@ -102,9 +90,15 @@ PYTHONPATH=. %{__python3} -m pytest test \
%files -n python3-sqlalchemy
%license LICENSE
%doc README.rst
%{python3_sitearch}/*
%{python3_sitearch}/SQLAlchemy-*.egg-info/
%{python3_sitearch}/sqlalchemy/
%changelog
* Sat Jun 18 2022 Sergio Correia <scorreia@redhat.com> - 1.4.37-3
- Remove obsolete cruft from the specfile, follow the packaging guidelines
- Remove also extra packages we have no runtime dependencies for
Related: rhbz#2084556
* Fri Jun 17 2022 Sergio Correia <scorreia@redhat.com> - 1.4.37-2
- Add python-sqlalchemy to RHEL-9
Resolves: rhbz#2084556