Compare commits
No commits in common. "c8-stream-2.7" and "c8-beta" have entirely different histories.
c8-stream-
...
c8-beta
@ -1,14 +1,22 @@
|
||||
%bcond_with python36_module
|
||||
|
||||
%if 0%{?fedora}
|
||||
%bcond_without python2
|
||||
%bcond_without python3
|
||||
%if 0%{?fedora} > 29
|
||||
%bcond_with python2
|
||||
%else
|
||||
%bcond_without python2
|
||||
%endif
|
||||
%else
|
||||
%if 0%{?rhel} > 7
|
||||
%bcond_with python2
|
||||
%bcond_without python3
|
||||
%else
|
||||
%bcond_without python2
|
||||
%bcond_with python3
|
||||
%endif
|
||||
%endif
|
||||
|
||||
%bcond_without check
|
||||
%bcond_with debugrpms
|
||||
|
||||
%global srcname psycopg2
|
||||
%global sum A PostgreSQL database adapter for Python
|
||||
@ -17,10 +25,10 @@ programming language. At its core it fully implements the Python DB \
|
||||
API 2.0 specifications. Several extensions allow access to many of the \
|
||||
features offered by PostgreSQL.
|
||||
|
||||
%global python_runtimes %{?with_python2:python2 python2-debug} \\\
|
||||
%{?with_python3:python3.6 python3.6-debug}
|
||||
%global python_runtimes %{?with_python2:python2 %{?with_debugrpms:python2-debug}} \\\
|
||||
%{?with_python3:python3 %{?with_debugrpms:python3-debug}}
|
||||
|
||||
%{!?with_python2:%{!?with_python3:%{error:one python version eneeded}}}
|
||||
%{!?with_python2:%{!?with_python3:%{error:one python version needed}}}
|
||||
|
||||
# Python 2.5+ is not supported by Zope, so it does not exist in
|
||||
# recent Fedora releases. That's why zope subpackage is disabled.
|
||||
@ -41,13 +49,8 @@ Url: http://www.psycopg.org/psycopg/
|
||||
|
||||
Source0: http://www.psycopg.org/psycopg/tarballs/PSYCOPG-2-7/psycopg2-%{version}.tar.gz
|
||||
|
||||
%{?with_python2:BuildRequires: python2-debug python2-devel}
|
||||
%if %{with python36_module}
|
||||
%{?with_python3:BuildRequires: python36-debug python36-devel}
|
||||
%{?with_python3:BuildRequires: python36-rpm-macros}
|
||||
%else
|
||||
%{?with_python3:BuildRequires: python3-debug python3-devel}
|
||||
%endif
|
||||
%{?with_python2:BuildRequires: %{?with_debugrpms:/usr/bin/python2-debug} python2-devel}
|
||||
%{?with_python3:BuildRequires: %{?with_debugrpms:/usr/bin/python3-debug} python3-devel}
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: pkgconfig(libpq)
|
||||
@ -63,6 +66,7 @@ Conflicts: python-psycopg2-zope < %{version}
|
||||
%{desc}
|
||||
|
||||
|
||||
%if %{with python2}
|
||||
%package -n python2-%{srcname}
|
||||
%{?python_provide:%python_provide python2-%{srcname}}
|
||||
Summary: %{sum} 2
|
||||
@ -80,6 +84,7 @@ Requires: python2-%srcname = %version-%release
|
||||
This sub-package delivers set of tests for the adapter.
|
||||
|
||||
|
||||
%if %{with debugrpms}
|
||||
%package -n python2-%{srcname}-debug
|
||||
Summary: A PostgreSQL database adapter for Python 2 (debug build)
|
||||
# Require the base package, as we're sharing .py/.pyc files:
|
||||
@ -89,6 +94,8 @@ Requires: python2-%{srcname} = %{version}-%{release}
|
||||
%description -n python2-%{srcname}-debug
|
||||
This is a build of the psycopg PostgreSQL database adapter for the debug
|
||||
build of Python 2.
|
||||
%endif # debugrpms
|
||||
%endif # python2
|
||||
|
||||
|
||||
%if %{with python3}
|
||||
@ -109,6 +116,7 @@ Requires: python3-%srcname = %version-%release
|
||||
This sub-package delivers set of tests for the adapter.
|
||||
|
||||
|
||||
%if %{with debugrpms}
|
||||
%package -n python3-psycopg2-debug
|
||||
Summary: A PostgreSQL database adapter for Python 3 (debug build)
|
||||
# Require base python 3 package, as we're sharing .py/.pyc files:
|
||||
@ -117,6 +125,7 @@ Requires: python3-psycopg2 = %{version}-%{release}
|
||||
%description -n python3-%{srcname}-debug
|
||||
This is a build of the psycopg PostgreSQL database adapter for the debug
|
||||
build of Python 3.
|
||||
%endif # debugrpms
|
||||
%endif # python3
|
||||
|
||||
|
||||
@ -150,6 +159,7 @@ Zope Database Adapter for PostgreSQL, called ZPsycopgDA
|
||||
|
||||
|
||||
%build
|
||||
export CFLAGS=${RPM_OPT_FLAGS} LDFLAGS=${RPM_LD_FLAGS}
|
||||
for python in %{python_runtimes} ; do
|
||||
$python setup.py build
|
||||
done
|
||||
@ -187,6 +197,7 @@ PYTHONPATH=%buildroot%python3_sitearch %__python3 -c "$cmd" --verbose
|
||||
|
||||
|
||||
%install
|
||||
export CFLAGS=${RPM_OPT_FLAGS} LDFLAGS=${RPM_LD_FLAGS}
|
||||
for python in %{python_runtimes} ; do
|
||||
$python setup.py install --no-compile --root %{buildroot}
|
||||
done
|
||||
@ -215,9 +226,11 @@ cp -pr ZPsycopgDA/* %{buildroot}%{ZPsycopgDAdir}
|
||||
%{python2_sitearch}/psycopg2/tests
|
||||
|
||||
|
||||
%if %{with debugrpms}
|
||||
%files -n python2-%{srcname}-debug
|
||||
%license LICENSE
|
||||
%{python2_sitearch}/psycopg2/_psycopg_d.so
|
||||
%endif # debugrpms
|
||||
%endif # python2
|
||||
|
||||
|
||||
@ -237,9 +250,11 @@ cp -pr ZPsycopgDA/* %{buildroot}%{ZPsycopgDAdir}
|
||||
%{python3_sitearch}/psycopg2/tests
|
||||
|
||||
|
||||
%if %{with debugrpms}
|
||||
%files -n python3-psycopg2-debug
|
||||
%license LICENSE
|
||||
%{python3_sitearch}/psycopg2/_psycopg.cpython-3?dm*.so
|
||||
%endif # debugrpms
|
||||
%endif # python3
|
||||
|
||||
|
||||
@ -261,18 +276,11 @@ cp -pr ZPsycopgDA/* %{buildroot}%{ZPsycopgDAdir}
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 2.7.5-7
|
||||
- Bumping due to problems with modular RPM upgrade path
|
||||
- Resolves: rhbz#1695587
|
||||
* Fri Oct 05 2018 Pavel Raiskup <praiskup@redhat.com> - 2.7.5-7
|
||||
- bump the NVR to beat the NVR from module
|
||||
|
||||
* Wed Sep 26 2018 Tomas Orsava <torsava@redhat.com> - 2.7.5-6
|
||||
- Use the fully versioned binaries during build
|
||||
- Related: rhbz#1619153
|
||||
|
||||
* Mon Sep 17 2018 Tomas Orsava <torsava@redhat.com> - 2.7.5-5
|
||||
- Require python2-psycopg2 instead of python-psycopg2 from the
|
||||
python2-psycopg2-debug subpackage
|
||||
- Resolves: rhbz#1628242
|
||||
* Wed Oct 03 2018 Pavel Raiskup <praiskup@redhat.com> - 2.7.5-5
|
||||
- sync with Fedora Rawide
|
||||
|
||||
* Thu Aug 02 2018 Pavel Raiskup <praiskup@redhat.com> - 2.7.5-4
|
||||
- re-enable testsuite
|
||||
|
Loading…
Reference in New Issue
Block a user