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 \ %global python_pkg_extras \
asyncio \ asyncio \
mssql_pymssql \
mssql_pyodbc \ mssql_pyodbc \
mysql \
postgresql \ postgresql \
postgresql_pg8000 \ pymysql
postgresql_asyncpg \
pymysql \
aiomysql \
aiosqlite
Name: python-sqlalchemy Name: python-sqlalchemy
Version: 1.4.37 Version: 1.4.37
# 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: 2%{?dist} Release: 3%{?dist}
Summary: Modular and flexible ORM library for python Summary: Modular and flexible ORM library for Python
License: MIT License: MIT
URL: http://www.sqlalchemy.org/ URL: https://www.sqlalchemy.org/
Source0: https://files.pythonhosted.org/packages/source/S/%{srcname}/%{srcname}-%{srcversion}.tar.gz Source0: %{pypi_source %{srcname} %{srcversion}}
BuildRequires: gcc BuildRequires: gcc
BuildRequires: python3-devel >= 3.6 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 define the join conditions explicitly, to bridge the gap between database and
domain. 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 %package -n python3-sqlalchemy
Summary: Modular and flexible ORM library for python Summary: %{summary}
%{?python_provide:%python_provide python%{python3_pkgversion}-sqlalchemy}
Obsoletes: python2-sqlalchemy < 1.3.10-2
%description -n python3-sqlalchemy %description -n python3-sqlalchemy
SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible, 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 define the join conditions explicitly, to bridge the gap between database and
domain. domain.
This package includes the python 3 version of the module.
# 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} %{?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 %prep
%setup -q -n %{srcname}-%{srcversion} %setup -q -n %{srcname}-%{srcversion}
@ -90,7 +78,7 @@ This package includes the python 3 version of the module.
rm -rf doc/build rm -rf doc/build
%check %check
PYTHONPATH=. %{__python3} -m pytest test \ %pytest test \
%if %{with xdist} %if %{with xdist}
--numprocesses=auto --numprocesses=auto
%endif %endif
@ -102,9 +90,15 @@ PYTHONPATH=. %{__python3} -m pytest test \
%files -n python3-sqlalchemy %files -n python3-sqlalchemy
%license LICENSE %license LICENSE
%doc README.rst %doc README.rst
%{python3_sitearch}/* %{python3_sitearch}/SQLAlchemy-*.egg-info/
%{python3_sitearch}/sqlalchemy/
%changelog %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 * Fri Jun 17 2022 Sergio Correia <scorreia@redhat.com> - 1.4.37-2
- Add python-sqlalchemy to RHEL-9 - Add python-sqlalchemy to RHEL-9
Resolves: rhbz#2084556 Resolves: rhbz#2084556