From 597abac0f94774cf1537f00a6f4e0540505f38aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Sat, 18 Jun 2022 11:40:00 +0200 Subject: [PATCH] Remove obsolete cruft from the specfile, follow the packaging guidelines - spell Python in summary with capital P - use HTTPS URL - use %pypi_source - remove a note about Python 2 from the description, there is no Python 2 - %python_provide is redundant and deprecated - the Obsoletes for python2-sqlalchemy is not needed - %pytest is shorter and tests the installed module - listing %{python3_sitearch}/* in %files is forbidden - move python3-sqlalchemy %package above python-doc to be able to reuse %{summary} --- python-sqlalchemy.spec | 33 ++++++++++++++------------------- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/python-sqlalchemy.spec b/python-sqlalchemy.spec index 646c45a..2d55d3f 100644 --- a/python-sqlalchemy.spec +++ b/python-sqlalchemy.spec @@ -20,11 +20,11 @@ Version: 1.4.39 # 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 +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 @@ -44,19 +44,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, @@ -67,11 +56,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} @@ -86,7 +80,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 @@ -98,7 +92,8 @@ 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 * Fri Jul 22 2022 Fedora Release Engineering - 1.4.39-2