Compare commits

...

10 Commits

Author SHA1 Message Date
Karel Srot
564d535ff8 [ci] Configure CI tests and gating.yaml
Resolves: RHEL-38911

Signed-off-by: Karel Srot <ksrot@redhat.com>
2024-05-29 13:33:10 +02:00
Yaakov Selkowitz
9354f348b3 Disable all extras in RHEL builds
The vast majority of these extras require dependencies not available in
RHEL.  Disabling them does not affect the ability to use the packages
with those dependencies installed from a different source, but it does
avoid the unwanted build dependencies.
2024-02-12 09:26:53 -05:00
Nils Philippsen
71b1cf9e3b Don’t build asyncmy extra package on x86 (32bit)
Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-02-11 18:41:45 +01:00
Nils Philippsen
201a78975d Update to 2.0.26
Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-02-11 17:53:54 +01:00
Nils Philippsen
0b4cf94834 Generate build requirements for extra packages
Thanks to Miro Hrončok for the hint!

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-02-11 17:53:29 +01:00
Yaakov Selkowitz
8a0ad755ca Avoid mypy dependency in RHEL builds
RHEL does not include mypy, and the plugin is deprecated in 2.0:

https://docs.sqlalchemy.org/en/20/orm/extensions/mypy.html
2024-02-03 23:55:02 -05:00
Nils Philippsen
4cdab0416c Upgrade to 2.0.25
Modernize the spec file in the process.

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-02-01 20:02:37 +01:00
Fedora Release Engineering
86ed0d5d84 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-26 11:09:43 +00:00
Nils Philippsen
4d5eec2968 Update to 1.4.51
Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-01-19 13:13:46 +01:00
Nils Philippsen
53802d36cc Tag copyright page as %license in documentation
[skip changelog]

Signed-off-by: Nils Philippsen <nils@tiptoe.de>
2024-01-19 13:13:46 +01:00
6 changed files with 91 additions and 21 deletions

1
.fmf/version Normal file
View File

@ -0,0 +1 @@
1

3
.gitignore vendored
View File

@ -115,3 +115,6 @@ SQLAlchemy-0.6.1.tar.gz
/sqlalchemy-cd56e873e1db4e6c8bee9e035627beba80251bea.tar.gz /sqlalchemy-cd56e873e1db4e6c8bee9e035627beba80251bea.tar.gz
/SQLAlchemy-1.4.49.tar.gz /SQLAlchemy-1.4.49.tar.gz
/SQLAlchemy-1.4.50.tar.gz /SQLAlchemy-1.4.50.tar.gz
/SQLAlchemy-1.4.51.tar.gz
/SQLAlchemy-2.0.25.tar.gz
/SQLAlchemy-2.0.26.tar.gz

16
ci.fmf Normal file
View File

@ -0,0 +1,16 @@
/keylime-e2e:
plan:
import:
url: https://github.com/RedHat-SP-Security/keylime-plans.git
name: /generic/minimal-e2e
/internal-sanity:
enabled: false
adjust:
- when: distro == rhel
enabled: true
plan:
import:
url: https://gitlab.cee.redhat.com/special-projects/tests/python-sqlalchemy.git
name: /Plans/sanity

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-10
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

View File

@ -1,22 +1,39 @@
# Mypy plugin is deprecated in 2.0. mypy is not in RHEL.
%bcond mypy %{undefined rhel}
# The asyncmy Python package isnt available in x86 (32bit)
%ifnarch %ix86
%bcond asyncmy %{undefined rhel}
%else
%bcond asyncmy 0
%endif
# Tests crash when being run by pytest-xdist # Tests crash when being run by pytest-xdist
%bcond_with xdist %bcond xdist 0
%global srcname SQLAlchemy %global srcname SQLAlchemy
%global canonicalname %{py_dist_name %{srcname}}
%if %{undefined rhel}
%global python_pkg_extras \ %global python_pkg_extras \
asyncio \ asyncio \
mssql_pymssql \ mssql_pymssql \
mssql_pyodbc \ mssql_pyodbc \
mysql \ mysql \
mysql_connector \
%{?with_mypy:mypy} \
postgresql \ postgresql \
postgresql_pg8000 \ postgresql_pg8000 \
postgresql_asyncpg \ postgresql_asyncpg \
pymysql \ pymysql \
aiomysql \ aiomysql \
aiosqlite aioodbc \
aiosqlite \
%{?with_asyncmy:asyncmy}
%endif
Name: python-sqlalchemy Name: python-%{canonicalname}
Version: 1.4.50 Version: 2.0.26
# 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: %autorelease Release: %autorelease
@ -26,13 +43,14 @@ License: MIT
URL: https://www.sqlalchemy.org/ URL: https://www.sqlalchemy.org/
Source0: %{pypi_source %{srcname} %{srcversion}} Source0: %{pypi_source %{srcname} %{srcversion}}
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: gcc BuildRequires: gcc
BuildRequires: python3-devel >= 3.6 BuildRequires: python3-devel >= 3.7
BuildRequires: python3-greenlet >= 1.0 # The dependencies needed for testing dont get auto-generated.
BuildRequires: python3-setuptools BuildRequires: python3dist(pytest)
BuildRequires: python3-pytest
%if %{with xdist} %if %{with xdist}
BuildRequires: python3-pytest-xdist BuildRequires: python3dist(pytest-xdist)
%endif %endif
%description %description
@ -46,6 +64,9 @@ domain.
%package -n python3-sqlalchemy %package -n python3-sqlalchemy
Summary: %{summary} Summary: %{summary}
%if %{without asyncmy}
Obsoletes: python3-sqlalchemy+asyncmy < %{version}-%{release}
%endif
%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,
@ -56,8 +77,10 @@ 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.
%if %{undefined rhel}
# 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} %pyproject_extras_subpkg -n python3-sqlalchemy %python_pkg_extras
%endif
%package doc %package doc
Summary: Documentation for SQLAlchemy Summary: Documentation for SQLAlchemy
@ -67,33 +90,54 @@ BuildArch: noarch
Documentation for SQLAlchemy. Documentation for SQLAlchemy.
%generate_buildrequires
%pyproject_buildrequires %{!?rhel:-x %{gsub %{quote:%python_pkg_extras} %%s+ ,}}
%prep %prep
%autosetup -n %{srcname}-%{srcversion} -p1 %autosetup -n %{srcname}-%{version} -p1
%build %build
%py3_build %pyproject_wheel
%install %install
%py3_install %pyproject_install
%pyproject_save_files %{canonicalname}
# Work around poetry not listing license files as such in package metadata.
sed -i -e 's|^\(.*/LICENSE\)|%%license \1|g' %{pyproject_files}
install -d %{buildroot}%{_pkgdocdir}
cp -a doc examples %{buildroot}%{_pkgdocdir}/
# remove unnecessary scripts for building documentation # remove unnecessary scripts for building documentation
rm -rf doc/build rm -rf %{buildroot}%{_pkgdocdir}/doc/build
find %{buildroot}%{_pkgdocdir} | 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
%check %check
%pytest test \ %pytest test \
%if %{without mypy}
-k 'not Mypy' \
%endif
%if %{with xdist} %if %{with xdist}
--numprocesses=auto --numprocesses=auto
%endif %endif
%files doc %files doc -f doc-files.txt
%doc doc examples
%files -n python3-sqlalchemy %files -n python3-sqlalchemy -f %{pyproject_files}
%license LICENSE
%doc README.rst %doc README.rst
%{python3_sitearch}/SQLAlchemy-*.egg-info/
%{python3_sitearch}/sqlalchemy/
%changelog %changelog
%autochangelog %autochangelog

View File

@ -1 +1 @@
SHA512 (SQLAlchemy-1.4.50.tar.gz) = d484c2673e67b0c45f05d2af20f930f274ea8e83ca41e2bd1c08723f564af58424b78be2ee507612fec6fc095dc215f75f52dfad68a98bcbf1774e150d956a29 SHA512 (SQLAlchemy-2.0.26.tar.gz) = 62532253ba6dee0c8e5c89487459ce783eb3d00cdcaf645efa5b68a03b62cc92ab7b447c791ac05bd552910edd223a390ab930a16b6234afb5dbe6d9c05b997a