2022-06-08 13:09:12 +00:00
|
|
|
# when bootstrapping Python, pytest-xdist is not yet available
|
2022-11-09 08:51:37 +00:00
|
|
|
|
2022-12-06 04:16:42 +00:00
|
|
|
%if 0%{?fedora} >= 38 || 0%{?rhel} > 9
|
2022-11-09 08:51:37 +00:00
|
|
|
# on Fedora 38, tests crash when being run by xdist right now
|
|
|
|
%bcond_with xdist
|
2022-12-06 04:16:42 +00:00
|
|
|
%else
|
|
|
|
%bcond_without xdist
|
2022-12-07 17:25:47 +00:00
|
|
|
%endif
|
2019-08-15 15:59:33 +00:00
|
|
|
|
2019-11-13 13:48:46 +00:00
|
|
|
%global srcname SQLAlchemy
|
|
|
|
|
2021-05-10 12:47:19 +00:00
|
|
|
%global python_pkg_extras \
|
|
|
|
asyncio \
|
|
|
|
mssql_pymssql \
|
|
|
|
mssql_pyodbc \
|
|
|
|
mysql \
|
|
|
|
postgresql \
|
|
|
|
postgresql_pg8000 \
|
|
|
|
postgresql_asyncpg \
|
|
|
|
pymysql \
|
|
|
|
aiomysql \
|
|
|
|
aiosqlite
|
|
|
|
|
2006-05-23 14:57:51 +00:00
|
|
|
Name: python-sqlalchemy
|
2022-11-14 14:08:46 +00:00
|
|
|
Version: 1.4.44
|
2019-03-01 14:50:36 +00:00
|
|
|
# cope with pre-release versions containing tildes
|
|
|
|
%global srcversion %{lua: srcversion, num = rpm.expand("%{version}"):gsub("~", ""); print(srcversion);}
|
2022-09-07 11:21:14 +00:00
|
|
|
Release: %autorelease
|
2022-06-18 09:40:00 +00:00
|
|
|
Summary: Modular and flexible ORM library for Python
|
2006-05-23 14:57:51 +00:00
|
|
|
|
|
|
|
License: MIT
|
2022-06-18 09:40:00 +00:00
|
|
|
URL: https://www.sqlalchemy.org/
|
|
|
|
Source0: %{pypi_source %{srcname} %{srcversion}}
|
2022-11-14 14:45:22 +00:00
|
|
|
# Upstream fix for failing test
|
|
|
|
Patch0: 0001-Repair-test-in-32bit-python-builds.patch
|
2006-05-23 14:57:51 +00:00
|
|
|
|
2018-02-20 20:48:54 +00:00
|
|
|
BuildRequires: gcc
|
2021-05-10 12:45:13 +00:00
|
|
|
BuildRequires: python3-devel >= 3.6
|
|
|
|
BuildRequires: python3-greenlet >= 1.0
|
2011-06-06 16:06:41 +00:00
|
|
|
BuildRequires: python3-setuptools
|
2016-12-13 20:17:04 +00:00
|
|
|
BuildRequires: python3-pytest
|
2019-08-15 15:59:33 +00:00
|
|
|
%if %{with xdist}
|
2019-06-19 14:50:28 +00:00
|
|
|
BuildRequires: python3-pytest-xdist
|
2010-03-07 19:37:05 +00:00
|
|
|
%endif
|
|
|
|
|
2006-05-23 14:57:51 +00:00
|
|
|
%description
|
2019-02-23 00:10:57 +00:00
|
|
|
SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible,
|
2006-05-23 14:57:51 +00:00
|
|
|
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.
|
|
|
|
|
2010-03-07 19:37:05 +00:00
|
|
|
%package -n python3-sqlalchemy
|
2022-06-18 09:40:00 +00:00
|
|
|
Summary: %{summary}
|
2010-03-07 19:37:05 +00:00
|
|
|
|
|
|
|
%description -n python3-sqlalchemy
|
2019-02-23 00:10:57 +00:00
|
|
|
SQLAlchemy is an Object Relational Mapper (ORM) that provides a flexible,
|
2010-03-07 19:37:05 +00:00
|
|
|
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.
|
|
|
|
|
2021-05-10 12:47:19 +00:00
|
|
|
# Subpackages to ensure dependencies enabling extra functionality
|
2021-05-18 12:59:35 +00:00
|
|
|
%{?python_extras_subpkg:%python_extras_subpkg -n python3-sqlalchemy -i %{python3_sitearch}/*.egg-info %python_pkg_extras}
|
2021-05-10 12:47:19 +00:00
|
|
|
|
2022-06-18 09:40:00 +00:00
|
|
|
%package doc
|
|
|
|
Summary: Documentation for SQLAlchemy
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
Documentation for SQLAlchemy.
|
|
|
|
|
2010-09-29 18:21:06 +00:00
|
|
|
|
2006-05-23 14:57:51 +00:00
|
|
|
%prep
|
2022-11-14 14:45:22 +00:00
|
|
|
%autosetup -n %{srcname}-%{srcversion} -p1
|
2018-06-17 22:36:45 +00:00
|
|
|
|
2010-03-07 19:37:05 +00:00
|
|
|
%build
|
2016-11-08 18:13:59 +00:00
|
|
|
%py3_build
|
2010-03-07 19:37:05 +00:00
|
|
|
|
2006-05-23 14:57:51 +00:00
|
|
|
%install
|
2016-11-08 18:13:59 +00:00
|
|
|
%py3_install
|
2007-09-01 04:55:09 +00:00
|
|
|
|
2006-05-23 14:57:51 +00:00
|
|
|
# remove unnecessary scripts for building documentation
|
|
|
|
rm -rf doc/build
|
|
|
|
|
2007-10-19 04:22:29 +00:00
|
|
|
%check
|
2022-06-18 09:40:00 +00:00
|
|
|
%pytest test \
|
2019-08-15 15:59:33 +00:00
|
|
|
%if %{with xdist}
|
|
|
|
--numprocesses=auto
|
|
|
|
%endif
|
2010-03-07 19:37:05 +00:00
|
|
|
|
|
|
|
|
2016-11-08 18:13:59 +00:00
|
|
|
%files doc
|
|
|
|
%doc doc examples
|
|
|
|
|
2010-03-07 19:37:05 +00:00
|
|
|
%files -n python3-sqlalchemy
|
2016-11-08 18:13:59 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc README.rst
|
2022-06-18 09:40:00 +00:00
|
|
|
%{python3_sitearch}/SQLAlchemy-*.egg-info/
|
|
|
|
%{python3_sitearch}/sqlalchemy/
|
2010-03-07 19:37:05 +00:00
|
|
|
|
2006-05-23 14:57:51 +00:00
|
|
|
%changelog
|
2022-09-07 11:21:14 +00:00
|
|
|
%autochangelog
|