python-sqlalchemy/python-sqlalchemy.spec

117 lines
3.2 KiB
RPMSpec
Raw Normal View History

# Tests crash when being run by pytest-xdist
%bcond_with xdist
2019-11-13 13:48:46 +00:00
%global srcname SQLAlchemy
%global python_pkg_extras \
asyncio \
mssql_pymssql \
mssql_pyodbc \
mysql \
postgresql \
postgresql_pg8000 \
postgresql_asyncpg \
pymysql \
aiomysql \
aiosqlite
Name: python-sqlalchemy
Version: 1.4.51
# cope with pre-release versions containing tildes
%global srcversion %{lua: srcversion, num = rpm.expand("%{version}"):gsub("~", ""); print(srcversion);}
Release: %autorelease
Summary: Modular and flexible ORM library for Python
License: MIT
URL: https://www.sqlalchemy.org/
Source0: %{pypi_source %{srcname} %{srcversion}}
BuildRequires: coreutils
BuildRequires: findutils
2018-02-20 20:48:54 +00:00
BuildRequires: gcc
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
%if %{with xdist}
BuildRequires: python3-pytest-xdist
2010-03-07 19:37:05 +00:00
%endif
%description
2019-02-23 00:10:57 +00:00
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.
2010-03-07 19:37:05 +00:00
%package -n python3-sqlalchemy
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.
# 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
%autosetup -n %{srcname}-%{srcversion} -p1
2018-06-17 22:36:45 +00:00
2010-03-07 19:37:05 +00:00
%build
%py3_build
2010-03-07 19:37:05 +00:00
%install
%py3_install
install -d %{buildroot}%{_pkgdocdir}
cp -a doc %{buildroot}%{_pkgdocdir}/
# remove unnecessary scripts for building documentation
rm -rf %{buildroot}%{_pkgdocdir}/doc/build
find %{buildroot}%{_pkgdocdir}/doc | while read long; do
short="${long#%{buildroot}}"
if [ -d "$long" ]; then
echo "%%doc %%dir $short"
else
if [ "$short" != "${short/copyright/}" ]; then
echo "%%license $short"
else
echo "%%doc $short"
fi
fi
done > doc-files.txt
2007-10-19 04:22:29 +00:00
%check
%pytest test \
%if %{with xdist}
--numprocesses=auto
%endif
2010-03-07 19:37:05 +00:00
%files doc -f doc-files.txt
%doc examples
2010-03-07 19:37:05 +00:00
%files -n python3-sqlalchemy
%license LICENSE
%doc README.rst
%{python3_sitearch}/SQLAlchemy-*.egg-info/
%{python3_sitearch}/sqlalchemy/
2010-03-07 19:37:05 +00:00
%changelog
%autochangelog