Compare commits

...

No commits in common. 'c9' and 'c8-beta-stream-3.9' have entirely different histories.

@ -1,26 +1,8 @@
%if 0%{?fedora}
%bcond_without python3
%bcond_without python3_debug
%if 0%{?fedora} > 31
%bcond_with python2
%bcond_with python2_debug
%else
%bcond_without python2
%bcond_without python2_debug
%endif
%else
%if 0%{?rhel} > 7
%bcond_with python2
%bcond_without python3
%bcond_with python2_debug
%bcond_without python3_debug
%else
%bcond_without python2
%bcond_with python3
%bcond_without python2_debug
%bcond_with python3_debug
%endif
%endif
# RHEL8 python39 module: Python 3 enabled, Python 3 debug and both Python 2 builds disabled
%bcond_with python2
%bcond_without python3
%bcond_with python2_debug
%bcond_with python3_debug
%bcond_without tests
@ -34,8 +16,8 @@ features offered by PostgreSQL.
%global python_runtimes \\\
%{?with_python2:python2} \\\
%{?with_python2_debug:python2-debug} \\\
%{?with_python3:python3} \\\
%{?with_python3_debug:python3-debug}
%{?with_python3:python%{python3_version}} \\\
%{?with_python3_debug:python%{python3_version}d}
%{!?with_python2:%{!?with_python3:%{error:one python version needed}}}
@ -50,17 +32,22 @@ features offered by PostgreSQL.
Summary: %{sum}
Name: python-%{srcname}
Version: 2.8.6
Release: 6%{?dist}
Release: 3%{?dist}
# The exceptions allow linking to OpenSSL and PostgreSQL's libpq
License: LGPLv3+ with exceptions
License: LGPL-3.0-or-later WITH openvpn-openssl-exception
Url: http://initd.org/psycopg/
Source0: http://initd.org/psycopg/tarballs/PSYCOPG-2-8/psycopg2-%{version}.tar.gz
# Exclude i686 arch. Due to a modularity issue it's being added to the
# x86_64 compose of CRB, but we don't want to ship it at all.
# See: https://projects.engineering.redhat.com/browse/RCM-72605
ExcludeArch: i686
%{?with_python2:BuildRequires: python2-devel python2-setuptools}
%{?with_python3:BuildRequires: python3-devel python3-setuptools}
%{?with_python3:BuildRequires: python%{python3_pkgversion}-devel python%{python3_pkgversion}-setuptools python%{python3_pkgversion}-rpm-macros}
%{?with_python2_debug:BuildRequires: python2-debug}
%{?with_python3_debug:BuildRequires: python3-debug}
%{?with_python3_debug:BuildRequires: python%{python3_pkgversion}-debug}
BuildRequires: gcc
BuildRequires: pkgconfig(libpq)
@ -70,8 +57,6 @@ BuildRequires: pkgconfig(libpq)
BuildRequires: postgresql-test-rpm-macros
%endif
Conflicts: python-psycopg2-zope < %{version}
%description
%{desc}
@ -109,45 +94,42 @@ build of Python 2.
%if %{with python3}
%package -n python3-psycopg2
%package -n python%{python3_pkgversion}-psycopg2
Summary: %{sum} 3
%{?python_provide:%python_provide python3-%{srcname}}
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
%description -n python3-psycopg2
%description -n python%{python3_pkgversion}-psycopg2
%{desc}
%package -n python3-%{srcname}-tests
%package -n python%{python3_pkgversion}-%{srcname}-tests
Summary: A testsuite for %sum 2
Requires: python3-%srcname = %version-%release
Requires: python%{python3_pkgversion}-%srcname = %version-%release
%description -n python3-%{srcname}-tests
%description -n python%{python3_pkgversion}-%{srcname}-tests
%desc
This sub-package delivers set of tests for the adapter.
%endif
%if %{with python3_debug}
%package -n python3-psycopg2-debug
%package -n python%{python3_pkgversion}-psycopg2-debug
Summary: A PostgreSQL database adapter for Python 3 (debug build)
# Require base python 3 package, as we're sharing .py/.pyc files:
Requires: python3-psycopg2 = %{version}-%{release}
Requires: python%{python3_pkgversion}-psycopg2 = %{version}-%{release}
%description -n python3-%{srcname}-debug
%description -n python%{python3_pkgversion}-%{srcname}-debug
This is a build of the psycopg PostgreSQL database adapter for the debug
build of Python 3.
%endif
%package doc
%package -n python%{python3_pkgversion}-%{srcname}-doc
Summary: Documentation for psycopg python PostgreSQL database adapter
%{?with_python2:Provides: python2-%{srcname}-doc = %{version}-%{release}}
%{?with_python3:Provides: python3-%{srcname}-doc = %{version}-%{release}}
# For a smoother upgrade from RHEL 8
%{?with_python3:Obsoletes: python39-psycopg2-doc < %{version}-%{release}}
%{?with_python3:Provides: python%{python3_pkgversion}-%{srcname}-doc = %{version}-%{release}}
%description doc
%description -n python%{python3_pkgversion}-%{srcname}-doc
Documentation and example files for the psycopg python PostgreSQL
database adapter.
@ -223,7 +205,7 @@ done
%if %{with python3}
cp -r tests/ %{buildroot}%{python3_sitearch}/%{srcname}/tests/
for i in `find %{buildroot}%{python3_sitearch}/%{srcname}/tests/ -iname "*.py"`; do
sed -i 's|#!/usr/bin/env python|#!/usr/bin/python3|' $i
sed -i 's|#!/usr/bin/env python|#!%{__python3}|' $i
done
%endif
@ -260,7 +242,7 @@ done
%if %{with python3}
%files -n python3-psycopg2
%files -n python%{python3_pkgversion}-psycopg2
%license LICENSE
%doc AUTHORS NEWS README.rst
%dir %{python3_sitearch}/psycopg2
@ -271,19 +253,19 @@ done
%{python3_sitearch}/psycopg2-%{version}-py3*.egg-info
%files -n python3-%{srcname}-tests
%files -n python%{python3_pkgversion}-%{srcname}-tests
%{python3_sitearch}/psycopg2/tests
%endif
%if %{with python3_debug}
%files -n python3-psycopg2-debug
%files -n python%{python3_pkgversion}-psycopg2-debug
%license LICENSE
%{python3_sitearch}/psycopg2/_psycopg.cpython-%{python3_version_nodots}d*.so
%endif
%files doc
%files -n python%{python3_pkgversion}-%{srcname}-doc
%license LICENSE
%doc doc
@ -301,24 +283,13 @@ done
%changelog
* Tue Feb 08 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 2.8.6-6
- Add automatically generated Obsoletes tag with the python39- prefix
for smoother upgrade from RHEL8
- Add manual Obsoletes for python39-psycopg2-doc
- Related: rhbz#1990421
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 2.8.6-5
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 2.8.6-4
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Mon Feb 08 2021 Pavel Raiskup <praiskup@redhat.com> - 2.8.6-3
- rebuild for libpq ABI fix rhbz#1908268
* Sun Oct 29 2023 Ondrej Sloup <osloup@redhat.com> - 2.8.6-3
- Update license tag to the SPDX format
- Resolves: RHEL-12994
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Jan 15 2021 Tomas Orsava <torsava@redhat.com> - 2.8.6-2
- Convert from Fedora to the python39 module in RHEL8
- Resolves: rhbz#1877430
* Thu Sep 17 2020 Patrik Novotný <panovotn@redhat.com> - 2.8.6-1
- Rebase to upstream version 2.8.6

Loading…
Cancel
Save