diff --git a/python-sqlalchemy.spec b/python-sqlalchemy.spec index 63e0776..8d32b8a 100644 --- a/python-sqlalchemy.spec +++ b/python-sqlalchemy.spec @@ -1,17 +1,3 @@ -# Don't build Python 3 package on all EL <= 7 -%if !0%{?rhel} || 0%{?rhel} > 7 -%bcond_without python3 -%else -%bcond_with python3 -%endif - -# Build Python 2 package on all Fedora < 32, EL < 9 -%if !0%{?fedora}%{?rhel} || 0%{?fedora} >= 32 || 0%{?rhel} >= 9 -%bcond_with python2 -%else -%bcond_without python2 -%endif - # when bootstrapping Python, pytest-xdist is not yet available %bcond_without xdist @@ -29,14 +15,6 @@ URL: http://www.sqlalchemy.org/ Source0: https://files.pythonhosted.org/packages/source/S/%{srcname}/%{srcname}-%{srcversion}.tar.gz BuildRequires: gcc -%if %{with python2} -BuildRequires: python2-devel >= 2.6 -BuildRequires: python2-setuptools -BuildRequires: python2-mock -BuildRequires: python2-pytest -%endif - -%if %{with python3} BuildRequires: python3-devel >= 3.6 BuildRequires: python3-greenlet >= 1.0 BuildRequires: python3-setuptools @@ -45,7 +23,6 @@ BuildRequires: python3-pytest %if %{with xdist} BuildRequires: python3-pytest-xdist %endif -%endif %description SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible, @@ -65,31 +42,10 @@ BuildArch: noarch %description doc Documentation for SQLAlchemy -%if %{with python2} -%package -n python2-sqlalchemy -Summary: Modular and flexible ORM library for python -%{?python_provide:%python_provide python2-sqlalchemy} - -%description -n python2-sqlalchemy -SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible, -high-level interface to SQL databases. Database and domain concepts are -decoupled, allowing both sides maximum flexibility and power. SQLAlchemy -provides a powerful mapping layer that can work as automatically or as manually -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. -%endif -# with python2 - -%if %{with python3} %package -n python3-sqlalchemy Summary: Modular and flexible ORM library for python %{?python_provide:%python_provide python%{python3_pkgversion}-sqlalchemy} -%if ! %{with python2} Obsoletes: python2-sqlalchemy < 1.3.10-2 -%endif %description -n python3-sqlalchemy SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible, @@ -101,8 +57,6 @@ define the join conditions explicitly, to bridge the gap between database and domain. This package includes the python 3 version of the module. -%endif -# with python3 %prep @@ -113,61 +67,33 @@ This package includes the python 3 version of the module. sed -i -e's/\(addopts = .*\) --max-worker-restart=5/\1/' setup.cfg %build -%if %{with python2} -%py2_build -%endif - -%if %{with python3} %py3_build -%endif %install -%if %{with python2} -%py2_install -%endif - -%if %{with python3} %py3_install -%endif # remove unnecessary scripts for building documentation rm -rf doc/build %check -%if %{with python2} -PYTHONPATH=. %{__python2} -m pytest test -%endif - -%if %{with python3} PYTHONPATH=. %{__python3} -m pytest test \ %if %{with xdist} --numprocesses=auto %endif -%endif %files doc %doc doc examples -%if %{with python2} -%files -n python2-sqlalchemy -%license LICENSE -%doc README.rst -%{python2_sitearch}/* -%endif -# with python2 - -%if %{with python3} %files -n python3-sqlalchemy %license LICENSE %doc README.rst %{python3_sitearch}/* -%endif -# with python3 %changelog * Mon May 10 2021 Nils Philippsen - 1.4.14-1 - version 1.4.14 +- drop Python 2.x support * Fri Apr 30 2021 Tomas Hrnciar - 1.3.22-3 - Disabled failing test test_pyodbc_extra_connect_azure