Compare commits
21 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a9e42edd0c | ||
|
3596a67278 | ||
|
97a5870d81 | ||
|
18324ee470 | ||
|
d06e65a1d3 | ||
|
42b4f94a10 | ||
|
82d532c5b7 | ||
|
bce862644f | ||
|
d9aa18b336 | ||
|
bcb75373f9 | ||
|
7668bb5bf6 | ||
|
2711206e84 | ||
|
a164a1fcf2 | ||
|
4de1171d27 | ||
|
f2b52f2fb1 | ||
|
f601e08377 | ||
|
45505bf515 | ||
|
9b58e3ee91 | ||
|
bd7d872fcf | ||
|
a3eed45d74 | ||
|
15dc3fa708 |
12
.gitignore
vendored
12
.gitignore
vendored
@ -1,2 +1,14 @@
|
|||||||
/3.0.11.tar.gz
|
/3.0.11.tar.gz
|
||||||
/3.0.16.tar.gz
|
/3.0.16.tar.gz
|
||||||
|
/3.1.7.tar.gz
|
||||||
|
/3.1.8.tar.gz
|
||||||
|
/3.1.9.tar.gz
|
||||||
|
/3.1.10.tar.gz
|
||||||
|
/3.1.12.tar.gz
|
||||||
|
/3.1.13.tar.gz
|
||||||
|
/3.1.17.tar.gz
|
||||||
|
/3.1.18.tar.gz
|
||||||
|
/pool-3.2.1.tar.gz
|
||||||
|
/3.1.19.tar.gz
|
||||||
|
/pool-3.2.2.tar.gz
|
||||||
|
/3.2.1.tar.gz
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
diff -ur 3.0.16_original/psycopg-3.0.16/psycopg/setup.py 3.0.16/psycopg-3.0.16/psycopg/setup.py
|
|
||||||
--- 3.0.16_original/psycopg-3.0.16/psycopg/setup.py 2022-08-04 09:58:06.504188489 +0200
|
|
||||||
+++ 3.0.16/psycopg-3.0.16/psycopg/setup.py 2022-08-04 09:58:18.283216078 +0200
|
|
||||||
@@ -38,20 +38,17 @@
|
|
||||||
# Requirements to run the test suite
|
|
||||||
"test": [
|
|
||||||
"mypy >= 0.920, != 0.930, != 0.931",
|
|
||||||
- "pproxy >= 2.7",
|
|
||||||
- "pytest >= 6.2.5",
|
|
||||||
+ "pytest",
|
|
||||||
# 0.16 is still needed to support Python 3.6.
|
|
||||||
# Only pinned in Psycopg 3.0.x as Psycopg 3.1.x is Py >= 3.7 only.
|
|
||||||
# - 0.17 requires asyncio_mode in config or it fails with a warning.
|
|
||||||
# - 0.16 fails if asyncio_mode is in the config.
|
|
||||||
- "pytest-asyncio >= 0.16, < 0.17",
|
|
||||||
- "pytest-cov >= 3.0",
|
|
||||||
- "pytest-randomly >= 3.10",
|
|
||||||
+ "pytest-asyncio",
|
|
||||||
+ "pytest-randomly",
|
|
||||||
],
|
|
||||||
# Requirements needed for development
|
|
||||||
"dev": [
|
|
||||||
"black >= 22.3.0",
|
|
||||||
- "dnspython >= 2.1",
|
|
||||||
"flake8 >= 4.0",
|
|
||||||
"mypy >= 0.920, != 0.930, != 0.931",
|
|
||||||
"types-setuptools >= 57.4",
|
|
@ -1,8 +0,0 @@
|
|||||||
diff -ur 3.0.16_original/psycopg-3.0.16/psycopg/pyproject.toml 3.0.16/psycopg-3.0.16/psycopg/pyproject.toml
|
|
||||||
--- 3.0.16_original/psycopg-3.0.16/psycopg/pyproject.toml 2022-07-28 13:20:04.000000000 +0200
|
|
||||||
+++ 3.0.16/psycopg-3.0.16/psycopg/pyproject.toml 2022-08-04 09:56:33.390970426 +0200
|
|
||||||
@@ -1,3 +1,3 @@
|
|
||||||
[build-system]
|
|
||||||
-requires = ["setuptools>=49.2.0", "wheel>=0.37"]
|
|
||||||
+requires = ["setuptools>=49.2.0", "wheel"]
|
|
||||||
build-backend = "setuptools.build_meta"
|
|
@ -1,87 +1,258 @@
|
|||||||
%global package_name psycopg
|
%global package_name psycopg
|
||||||
%global src_name %{package_name}3
|
%global src_name %{package_name}3
|
||||||
%global _description %{expand:
|
|
||||||
|
%global pool_version 3.2.2
|
||||||
|
%global pool_name pool-%{pool_version}
|
||||||
|
|
||||||
|
%if 0%{?fedora}
|
||||||
|
%bcond_without cython
|
||||||
|
%bcond_without pypy
|
||||||
|
%bcond_without tests
|
||||||
|
%else
|
||||||
|
# EL9 does not have pypy, and cython build failed
|
||||||
|
%bcond_with cython
|
||||||
|
%bcond_with pypy
|
||||||
|
# postgresql-test-rpm-macros built but not published in CRB
|
||||||
|
# https://kojihub.stream.centos.org/koji/buildinfo?buildID=59955
|
||||||
|
# requested in https://issues.redhat.com/browse/RHEL-32610
|
||||||
|
%bcond_with tests
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: python-%{src_name}
|
||||||
|
Version: 3.2.1
|
||||||
|
Release: 3%{?dist}
|
||||||
|
Summary: Psycopg 3 is a modern implementation of a PostgreSQL adapter for Python
|
||||||
|
|
||||||
|
License: LGPL-3.0-only
|
||||||
|
URL: https://www.psycopg.org/%{src_name}/
|
||||||
|
Source0: https://github.com/%{package_name}/%{package_name}/archive/refs/tags/%{version}.tar.gz
|
||||||
|
Source1: https://github.com/%{package_name}/%{package_name}/archive/refs/tags/%{pool_name}.tar.gz
|
||||||
|
|
||||||
|
%if %{without cython}
|
||||||
|
BuildArch: noarch
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
||||||
|
ExcludeArch: %{ix86}
|
||||||
|
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: libpq openssl
|
||||||
|
BuildRequires: postgresql-static postgresql-server-devel
|
||||||
|
BuildRequires: python3-pip python3-wheel python3-tomli
|
||||||
|
%if %{with pypy}
|
||||||
|
BuildRequires: pypy
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with tests}
|
||||||
|
# Required for running tests
|
||||||
|
BuildRequires: postgresql-test-rpm-macros
|
||||||
|
BuildRequires: python3-anyio python3-mypy pytest python3-pytest-cov python3-pytest-randomly
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with cython}
|
||||||
|
# Required for Cython
|
||||||
|
BuildRequires: cython gcc
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Runtime dependency
|
||||||
|
# https://github.com/psycopg/psycopg/blob/master/README.rst
|
||||||
|
Requires: libpq
|
||||||
|
|
||||||
|
%description
|
||||||
Psycopg 3 is a PostgreSQL database adapter for the Python programming language.
|
Psycopg 3 is a PostgreSQL database adapter for the Python programming language.
|
||||||
Psycopg 3 presents a familiar interface for everyone who has used Psycopg 2 or
|
Psycopg 3 presents a familiar interface for everyone who has used Psycopg 2 or
|
||||||
any other DB-API 2.0 database adapter, but allows to use more modern PostgreSQL
|
any other DB-API 2.0 database adapter, but allows to use more modern PostgreSQL
|
||||||
and Python features.}
|
and Python features.
|
||||||
|
|
||||||
Name: python-%{src_name}
|
|
||||||
Version: 3.0.16
|
|
||||||
Release: 2%{?dist}
|
|
||||||
Summary: Psycopg 3 is a modern implementation of a PostgreSQL adapter for Python
|
|
||||||
|
|
||||||
License: LGPLv3
|
|
||||||
URL: https://www.psycopg.org/%{src_name}/
|
|
||||||
Source0: https://github.com/%{package_name}/%{package_name}/archive/refs/tags/%{version}.tar.gz
|
|
||||||
|
|
||||||
# Patch remove packages not availible in Fedora (pproxy)
|
|
||||||
# and removes specific version and code coverage
|
|
||||||
# Remove specific version to ensure build on
|
|
||||||
# Fedora 35 (pytest, pytest-randomly) + toml
|
|
||||||
Patch0: python-psycopg3-3.0.16-setup.patch
|
|
||||||
Patch1: python-psycopg3-3.0.16-toml.patch
|
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
|
||||||
|
|
||||||
# Required for running tests
|
|
||||||
BuildRequires: libpq
|
|
||||||
|
|
||||||
BuildArch: noarch
|
|
||||||
|
|
||||||
%description %_description
|
|
||||||
|
|
||||||
%package -n python3-%{src_name}
|
%package -n python3-%{src_name}
|
||||||
Requires: libpq
|
|
||||||
Summary: %{SUMMARY}
|
|
||||||
|
|
||||||
%description -n python3-%{src_name} %_description
|
Summary: %{Summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires: libpq
|
||||||
|
|
||||||
|
%description -n python3-%{src_name}
|
||||||
|
%{description}
|
||||||
|
|
||||||
|
%package -n python3-%{src_name}_pool
|
||||||
|
Summary: Connection pooling for Psycopg 3
|
||||||
|
Requires: python-%{src_name}
|
||||||
|
BuildArch: noarch
|
||||||
|
Requires: libpq
|
||||||
|
|
||||||
|
%description -n python3-%{src_name}_pool
|
||||||
|
This package contains the pooling functionality for Psycopg 3.
|
||||||
|
|
||||||
|
%if %{with cython}
|
||||||
|
%package -n python3-%{src_name}_c
|
||||||
|
Summary: C extensions for Psycopg 3
|
||||||
|
Requires: libpq
|
||||||
|
|
||||||
|
%description -n python3-%{src_name}_c
|
||||||
|
This package contains the C extensions for enhanced performance in Psycopg 3.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p3 -n %{package_name}-%{version}/%{package_name}
|
%autosetup -p1 -n %{package_name}-%{version}
|
||||||
|
|
||||||
%generate_buildrequires
|
# Remove old psycopg_pool folder
|
||||||
%pyproject_buildrequires -x test
|
rm -rf psycopg_pool/*
|
||||||
|
|
||||||
|
# Unpack upstream psycopg_pool
|
||||||
|
tar -xzf %{SOURCE1} -C psycopg_pool/ --strip-components=2 %{package_name}-%{pool_name}/psycopg_pool/
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
pushd psycopg
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
|
||||||
%install
|
|
||||||
%pyproject_install
|
|
||||||
%pyproject_save_files %{package_name}
|
|
||||||
|
|
||||||
# Prepare the test folder for pytest
|
|
||||||
pushd ../tests/
|
|
||||||
|
|
||||||
# Remove failing tests
|
|
||||||
# The DNS package is not installed and therefore the test
|
|
||||||
# will not run. This is intented as there is no network in mock
|
|
||||||
rm test_typing.py test_module.py
|
|
||||||
# Remove all files in pool/ folder except the fix_pool.py.
|
|
||||||
# The pool/fix_pool.py is in conftest.py as plugin
|
|
||||||
find pool/ ! -name 'fix_pool.py' -type f -exec rm -f {} +
|
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%check
|
pushd psycopg_pool
|
||||||
|
%pyproject_wheel
|
||||||
|
popd
|
||||||
|
|
||||||
%if 0%{?fedora} > 36
|
%if %{with cython}
|
||||||
# Launchs tests with correctly set pytest-asyncio which
|
pushd psycopg_c
|
||||||
# corrects the breaking change caused by the version
|
%pyproject_wheel
|
||||||
%pytest ../tests/ --asyncio-mode=auto
|
popd
|
||||||
%else
|
%endif
|
||||||
# Python 36 and lower do not have the version which breaks
|
|
||||||
# the process available yet
|
%install
|
||||||
%pytest ../tests/
|
pushd psycopg
|
||||||
|
%pyproject_install
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd psycopg_pool
|
||||||
|
%pyproject_install
|
||||||
|
popd
|
||||||
|
|
||||||
|
%if %{with cython}
|
||||||
|
pushd psycopg_c
|
||||||
|
%pyproject_install
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with tests}
|
||||||
|
%check
|
||||||
|
export PGTESTS_LOCALE=C.UTF-8
|
||||||
|
%postgresql_tests_run
|
||||||
|
|
||||||
|
export PSYCOPG_TEST_DSN="host=$PGHOST port=$PGPORT dbname=${PGTESTS_DATABASES##*:} sslmode=disable"
|
||||||
|
|
||||||
|
# Remove tests that need to use internet or specific settings
|
||||||
|
%pytest tests/ -k "not (\
|
||||||
|
test_typing or \
|
||||||
|
test_module or \
|
||||||
|
test_conninfo_attempts_async or \
|
||||||
|
test_connection_async or \
|
||||||
|
test_connection or \
|
||||||
|
test_conninfo_attempts or \
|
||||||
|
test_pool_async or \
|
||||||
|
test_null_pool_async or \
|
||||||
|
test_pool or \
|
||||||
|
test_null_pool or \
|
||||||
|
test_client_cursor_async or \
|
||||||
|
test_cursor_async or \
|
||||||
|
sched_async or \
|
||||||
|
test_pipeline_async or \
|
||||||
|
test_copy_async or \
|
||||||
|
test_pipeline or \
|
||||||
|
test_multirange or \
|
||||||
|
test_datetime or \
|
||||||
|
test_range or \
|
||||||
|
test_string or \
|
||||||
|
test_notify or \
|
||||||
|
test_waiting\
|
||||||
|
)"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files -n python3-%{src_name} -f %{pyproject_files}
|
%files -n python3-%{src_name}
|
||||||
%doc ../README.rst
|
%{python3_sitelib}/psycopg/
|
||||||
%license LICENSE.txt
|
%{python3_sitelib}/psycopg-%{version}.dist-info/
|
||||||
|
%license psycopg/LICENSE.txt
|
||||||
|
%doc psycopg/README.rst
|
||||||
|
|
||||||
|
%files -n python3-%{src_name}_pool
|
||||||
|
%{python3_sitelib}/psycopg_pool/
|
||||||
|
%{python3_sitelib}/psycopg_pool-%{pool_version}.dist-info/
|
||||||
|
%license psycopg_pool/LICENSE.txt
|
||||||
|
%doc psycopg_pool/README.rst
|
||||||
|
|
||||||
|
%if %{with cython}
|
||||||
|
%files -n python3-%{src_name}_c
|
||||||
|
%{python3_sitearch}/psycopg_c/
|
||||||
|
%{python3_sitearch}/psycopg_c-%{version}.dist-info/
|
||||||
|
%license psycopg_c/LICENSE.txt
|
||||||
|
%doc psycopg_c/README.rst
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Jul 30 2024 Ondrej Sloup <osloup@redhat.com> - 3.2.1-3
|
||||||
|
- Added specific tests to skip (test_pipeline) as it fails on s390x (rhbz#2301198)
|
||||||
|
|
||||||
|
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jul 10 2024 Ondrej Sloup <osloup@redhat.com> - 3.2.1-1
|
||||||
|
- Rebase to the latest upstream version (rhbz#2295550)
|
||||||
|
- Added specific tests to skip (test_pipeline, test_multirange, test_datetime, test_range, test_string, test_notify)
|
||||||
|
|
||||||
|
* Tue Jun 11 2024 Python Maint <python-maint@redhat.com> - 3.1.19-2
|
||||||
|
- Rebuilt for Python 3.13
|
||||||
|
|
||||||
|
* Mon Jun 10 2024 Ondrej Sloup <osloup@redhat.com> - 3.1.19-1
|
||||||
|
- Rebase to the latest upstream version
|
||||||
|
|
||||||
|
* Mon Jun 10 2024 Ondrej Sloup <osloup@redhat.com> - 3.1.18-6
|
||||||
|
- Correct Requires libpq everywhere (rhbz#2266555)
|
||||||
|
|
||||||
|
* Sun Jun 09 2024 Python Maint <python-maint@redhat.com> - 3.1.18-5
|
||||||
|
- Rebuilt for Python 3.13
|
||||||
|
|
||||||
|
* Wed Apr 17 2024 Michel Lind <salimma@fedoraproject.org> - 3.1.18-4
|
||||||
|
- Make Cython and PyPy conditional, and only enable on Fedora for now
|
||||||
|
- Disable tests on non-Fedora builds due to missing dependencies
|
||||||
|
|
||||||
|
* Wed Apr 03 2024 Ondrej Sloup <osloup@redhat.com> - 3.1.18-3
|
||||||
|
- Confirm libpq require for (rhbz#2266555)
|
||||||
|
- Fix architectures for specific subpackages (rhbz#2268354)
|
||||||
|
|
||||||
|
* Tue Apr 02 2024 Sandro Mani <manisandro@gmail.com> - 3.1.18-2
|
||||||
|
- Add Requires: libpq (#2266555)
|
||||||
|
|
||||||
|
* Wed Jan 31 2024 Ondrej Sloup <osloup@redhat.com> - 3.1.18-1
|
||||||
|
- Add Cython version of psycopg and psycopg_pool as subpackages
|
||||||
|
- Rebase to the latest upstream version (rhbz#2250316)
|
||||||
|
- Update license tag to the SPDX format (LGPL-3.0-only)
|
||||||
|
|
||||||
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.12-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.12-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Sep 27 2023 Ondrej Sloup <osloup@redhat.com> - 3.1.12-1
|
||||||
|
- Rebase to the latest upstream version (rhbz#2240358)
|
||||||
|
|
||||||
|
* Mon Aug 07 2023 Ondrej Sloup <osloup@redhat.com> - 3.1.10-1
|
||||||
|
- Rebase to the latest upstream version (rhbz#2229392)
|
||||||
|
|
||||||
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.9-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jul 03 2023 Python Maint <python-maint@redhat.com> - 3.1.9-2
|
||||||
|
- Rebuilt for Python 3.12
|
||||||
|
|
||||||
|
* Fri May 05 2023 Ondrej Sloup <osloup@redhat.com> - 3.1.9-1
|
||||||
|
- Rebase to the latest upstream version (rhbz#2192620)
|
||||||
|
- Remove the version for anyio from setup.py
|
||||||
|
|
||||||
|
* Fri Jan 20 2023 Ondrej Sloup <osloup@redhat.com> - 3.1.8-1
|
||||||
|
- Rebase to the latest upstream version (rhbz#2161450)
|
||||||
|
|
||||||
|
* Wed Dec 21 2022 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 3.1.7-1
|
||||||
|
- Release bump rhbz#2155285
|
||||||
|
- Enable postgresql server for tests
|
||||||
|
|
||||||
* Fri Oct 14 2022 Ondrej Sloup <osloup@redhat.com> - 3.0.16-2
|
* Fri Oct 14 2022 Ondrej Sloup <osloup@redhat.com> - 3.0.16-2
|
||||||
- Release bump
|
- Release bump
|
||||||
|
|
||||||
@ -102,4 +273,4 @@ popd
|
|||||||
- Pray that Friday 13 will not break anything
|
- Pray that Friday 13 will not break anything
|
||||||
|
|
||||||
* Thu Apr 28 2022 Ondrej Sloup <osloup@redhat.com> - 3.0.11-1
|
* Thu Apr 28 2022 Ondrej Sloup <osloup@redhat.com> - 3.0.11-1
|
||||||
- Create package from git source (#2079251)
|
- Create package from git source (#2079251)
|
||||||
|
3
sources
3
sources
@ -1 +1,2 @@
|
|||||||
SHA512 (3.0.16.tar.gz) = 655e01bb00972dacae590f2e8ce5948226acb827b55099e7f362fdee9210f07b755f4da10d2fadd468aa95eaa3f72e7658a1ab26870d4ac159ee266ce1f8140c
|
SHA512 (3.2.1.tar.gz) = ecaeee67493ce849a2d7477d0373061ab3b329d228e3c0dd482d7ee8c7eea07c59127db2e6afc0233a78f073306d4adef915aba5f3fc6378c0335c3155350294
|
||||||
|
SHA512 (pool-3.2.2.tar.gz) = 165188a6da33266bac6277f5dfa86cf60f3de5d5173b6c45905b469ebf2835dd1a6e0f1513b156a8337f725316bcc946e8235693d3c133191b0ca6c7683b4ded
|
||||||
|
Loading…
Reference in New Issue
Block a user