2022-05-11 08:20:47 +00:00
|
|
|
%global package_name psycopg
|
|
|
|
%global src_name %{package_name}3
|
|
|
|
%global _description %{expand:
|
|
|
|
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
|
|
|
|
any other DB-API 2.0 database adapter, but allows to use more modern PostgreSQL
|
|
|
|
and Python features.}
|
|
|
|
|
|
|
|
Name: python-%{src_name}
|
2023-09-27 22:04:18 +00:00
|
|
|
Version: 3.1.12
|
2024-01-26 08:14:57 +00:00
|
|
|
Release: 3%{?dist}
|
2022-05-11 08:20:47 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
|
|
|
# Required for running tests
|
|
|
|
BuildRequires: libpq
|
2022-12-21 22:35:36 +00:00
|
|
|
BuildRequires: postgresql-test-rpm-macros
|
2022-05-11 08:20:47 +00:00
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description %_description
|
|
|
|
|
|
|
|
%package -n python3-%{src_name}
|
|
|
|
Requires: libpq
|
|
|
|
Summary: %{SUMMARY}
|
|
|
|
|
|
|
|
%description -n python3-%{src_name} %_description
|
|
|
|
|
|
|
|
%prep
|
2022-08-04 08:30:16 +00:00
|
|
|
%autosetup -p3 -n %{package_name}-%{version}/%{package_name}
|
2022-05-11 08:20:47 +00:00
|
|
|
|
2022-12-21 22:35:36 +00:00
|
|
|
# disable remove deps for typechecking and linting
|
|
|
|
sed -r -i 's/("(black|flake8|pytest-cov)\b.*",)/# \1/' setup.py
|
|
|
|
# remove pproxy dep, only used for tests
|
|
|
|
sed -r -i 's/("(pproxy)\b.*",)/# \1/' setup.py
|
|
|
|
|
2023-05-05 00:09:28 +00:00
|
|
|
# remove version for anyio
|
|
|
|
sed -i 's/\(anyio\).*$/\1",/' setup.py
|
|
|
|
|
2022-05-11 08:20:47 +00:00
|
|
|
%generate_buildrequires
|
|
|
|
%pyproject_buildrequires -x test
|
|
|
|
|
|
|
|
%build
|
|
|
|
%pyproject_wheel
|
|
|
|
|
|
|
|
%install
|
|
|
|
%pyproject_install
|
|
|
|
%pyproject_save_files %{package_name}
|
|
|
|
|
|
|
|
# Prepare the test folder for pytest
|
|
|
|
pushd ../tests/
|
|
|
|
|
|
|
|
# Remove all files in pool/ folder except the fix_pool.py.
|
2022-05-13 09:23:05 +00:00
|
|
|
# The pool/fix_pool.py is in conftest.py as plugin
|
2022-05-11 08:20:47 +00:00
|
|
|
find pool/ ! -name 'fix_pool.py' -type f -exec rm -f {} +
|
|
|
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
%check
|
2022-12-21 22:35:36 +00:00
|
|
|
export PGTESTS_LOCALE=C.UTF-8
|
|
|
|
%postgresql_tests_run
|
|
|
|
export PSYCOPG_TEST_DSN="host=$PGHOST port=$PGPORT dbname=${PGTESTS_DATABASES##*:}"
|
2022-05-13 09:23:05 +00:00
|
|
|
|
2022-12-21 22:35:36 +00:00
|
|
|
%pytest ../tests/ -k "not test_typing and not test_module"
|
2022-05-11 08:20:47 +00:00
|
|
|
|
|
|
|
%files -n python3-%{src_name} -f %{pyproject_files}
|
|
|
|
%doc ../README.rst
|
|
|
|
%license LICENSE.txt
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2024-01-26 08:14:57 +00:00
|
|
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.12-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
2024-01-22 05:15:36 +00:00
|
|
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.12-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
|
|
|
2023-09-27 22:04:18 +00:00
|
|
|
* Wed Sep 27 2023 Ondrej Sloup <osloup@redhat.com> - 3.1.12-1
|
|
|
|
- Rebase to the latest upstream version (rhbz#2240358)
|
|
|
|
|
2023-08-07 05:17:48 +00:00
|
|
|
* Mon Aug 07 2023 Ondrej Sloup <osloup@redhat.com> - 3.1.10-1
|
|
|
|
- Rebase to the latest upstream version (rhbz#2229392)
|
|
|
|
|
2023-07-21 12:27:49 +00:00
|
|
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.9-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
|
|
|
2023-07-03 11:10:11 +00:00
|
|
|
* Mon Jul 03 2023 Python Maint <python-maint@redhat.com> - 3.1.9-2
|
|
|
|
- Rebuilt for Python 3.12
|
|
|
|
|
2023-05-05 00:09:28 +00:00
|
|
|
* 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
|
|
|
|
|
2023-01-20 14:18:18 +00:00
|
|
|
* Fri Jan 20 2023 Ondrej Sloup <osloup@redhat.com> - 3.1.8-1
|
|
|
|
- Rebase to the latest upstream version (rhbz#2161450)
|
|
|
|
|
2022-12-21 22:35:36 +00:00
|
|
|
* Wed Dec 21 2022 Mikel Olasagasti Uranga <mikel@olasagasti.info> - 3.1.7-1
|
|
|
|
- Release bump rhbz#2155285
|
|
|
|
- Enable postgresql server for tests
|
|
|
|
|
2022-10-14 15:09:47 +00:00
|
|
|
* Fri Oct 14 2022 Ondrej Sloup <osloup@redhat.com> - 3.0.16-2
|
|
|
|
- Release bump
|
|
|
|
|
2022-08-04 08:30:16 +00:00
|
|
|
* Thu Aug 04 2022 Ondrej Sloup <osloup@redhat.com> - 3.0.16-1
|
|
|
|
- Rebase to the latest upstream version
|
|
|
|
- Create patch files instead of sed
|
|
|
|
- Fix release numbering
|
|
|
|
|
|
|
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.11-4
|
2022-07-22 21:02:10 +00:00
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
|
|
|
2022-08-04 08:30:16 +00:00
|
|
|
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 3.0.11-3
|
2022-06-14 14:44:51 +00:00
|
|
|
- Rebuilt for Python 3.11
|
|
|
|
|
2022-05-13 09:23:05 +00:00
|
|
|
* Fri May 13 2022 Ondrej Sloup <osloup@redhat.com> - 3.0.11-2
|
|
|
|
- Add support for Fedora 35 and 36
|
|
|
|
- Remove spaces at the end of the file
|
|
|
|
- Pray that Friday 13 will not break anything
|
|
|
|
|
2022-05-11 08:20:47 +00:00
|
|
|
* Thu Apr 28 2022 Ondrej Sloup <osloup@redhat.com> - 3.0.11-1
|
2022-12-21 22:35:36 +00:00
|
|
|
- Create package from git source (#2079251)
|