Update conditionals.
Make preperations for non-python2 builds
This commit is contained in:
parent
003956afe9
commit
857056a02b
@ -1,8 +1,20 @@
|
|||||||
%global realname kdcproxy
|
%global realname kdcproxy
|
||||||
|
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||||
|
%global with_python3 1
|
||||||
|
%else
|
||||||
|
%global with_python3 0
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?fedora} || 0%{?rhel} <= 7
|
||||||
|
%global with_python2 1
|
||||||
|
%else
|
||||||
|
%global with_python2 0
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: python-%{realname}
|
Name: python-%{realname}
|
||||||
Version: 0.3.2
|
Version: 0.3.2
|
||||||
Release: 11%{?dist}
|
Release: 12%{?dist}
|
||||||
Summary: MS-KKDCP (kerberos proxy) WSGI module
|
Summary: MS-KKDCP (kerberos proxy) WSGI module
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -13,17 +25,19 @@ Source0: https://github.com/npmccallum/%{realname}/archive/v%{version}.ta
|
|||||||
Patch0: fix-failing-tests.patch
|
Patch0: fix-failing-tests.patch
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python2-devel
|
|
||||||
|
|
||||||
%if 0%{?rhel} == 0
|
|
||||||
BuildRequires: /usr/bin/tox
|
BuildRequires: /usr/bin/tox
|
||||||
|
|
||||||
|
%if 0%{?with_python2} > 0
|
||||||
|
BuildRequires: python2-devel
|
||||||
BuildRequires: python2-pytest
|
BuildRequires: python2-pytest
|
||||||
BuildRequires: python2-coverage
|
BuildRequires: python2-coverage
|
||||||
BuildRequires: python2-webtest
|
BuildRequires: python2-webtest
|
||||||
BuildRequires: python2-pyasn1
|
BuildRequires: python2-pyasn1
|
||||||
BuildRequires: python2-dns
|
BuildRequires: python2-dns
|
||||||
BuildRequires: python2-mock
|
BuildRequires: python2-mock
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?with_python3} > 0
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3-pytest
|
BuildRequires: python3-pytest
|
||||||
BuildRequires: python3-coverage
|
BuildRequires: python3-coverage
|
||||||
@ -39,6 +53,7 @@ This package contains a Python WSGI module for proxying KDC requests over
|
|||||||
HTTP by following the MS-KKDCP protocol. It aims to be simple to deploy, with
|
HTTP by following the MS-KKDCP protocol. It aims to be simple to deploy, with
|
||||||
minimal configuration.
|
minimal configuration.
|
||||||
|
|
||||||
|
%if 0%{?with_python2} > 0
|
||||||
%package -n python2-%{realname}
|
%package -n python2-%{realname}
|
||||||
Summary: MS-KKDCP (kerberos proxy) WSGI module
|
Summary: MS-KKDCP (kerberos proxy) WSGI module
|
||||||
Requires: python2-dns
|
Requires: python2-dns
|
||||||
@ -50,8 +65,9 @@ Requires: python2-pyasn1
|
|||||||
This package contains a Python 2.x WSGI module for proxying KDC requests over
|
This package contains a Python 2.x WSGI module for proxying KDC requests over
|
||||||
HTTP by following the MS-KKDCP protocol. It aims to be simple to deploy, with
|
HTTP by following the MS-KKDCP protocol. It aims to be simple to deploy, with
|
||||||
minimal configuration.
|
minimal configuration.
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?rhel} == 0
|
%if 0%{?with_python3} > 0
|
||||||
%package -n python3-%{realname}
|
%package -n python3-%{realname}
|
||||||
Summary: MS-KKDCP (kerberos proxy) WSGI module
|
Summary: MS-KKDCP (kerberos proxy) WSGI module
|
||||||
Requires: python3-dns
|
Requires: python3-dns
|
||||||
@ -70,14 +86,18 @@ minimal configuration.
|
|||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
%if 0%{?with_python2} > 0
|
||||||
%py2_build
|
%py2_build
|
||||||
%if 0%{?rhel} == 0
|
%endif
|
||||||
|
%if 0%{?with_python3} > 0
|
||||||
%py3_build
|
%py3_build
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if 0%{?with_python2} > 0
|
||||||
%py2_install
|
%py2_install
|
||||||
%if 0%{?rhel} == 0
|
%endif
|
||||||
|
%if 0%{?with_python3} > 0
|
||||||
%py3_install
|
%py3_install
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -87,13 +107,15 @@ minimal configuration.
|
|||||||
tox --sitepackages -e py%{python2_version_nodots},py%{python3_version_nodots} || :
|
tox --sitepackages -e py%{python2_version_nodots},py%{python3_version_nodots} || :
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?with_python2} > 0
|
||||||
%files -n python2-%{realname}
|
%files -n python2-%{realname}
|
||||||
%doc README
|
%doc README
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%{python2_sitelib}/%{realname}/
|
%{python2_sitelib}/%{realname}/
|
||||||
%{python2_sitelib}/%{realname}-%{version}-*.egg-info
|
%{python2_sitelib}/%{realname}-%{version}-*.egg-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?rhel} == 0
|
%if 0%{?with_python3} > 0
|
||||||
%files -n python3-%{realname}
|
%files -n python3-%{realname}
|
||||||
%doc README
|
%doc README
|
||||||
%license COPYING
|
%license COPYING
|
||||||
@ -102,6 +124,10 @@ tox --sitepackages -e py%{python2_version_nodots},py%{python3_version_nodots} ||
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Mar 22 2018 Troy Dawson <tdawson@redhat.com> - 0.3.2-12
|
||||||
|
- Update conditionals.
|
||||||
|
- Make preperations for non-python2 builds
|
||||||
|
|
||||||
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.3.2-11
|
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.3.2-11
|
||||||
- Update Python 2 dependency declarations to new packaging standards
|
- Update Python 2 dependency declarations to new packaging standards
|
||||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||||
|
Loading…
Reference in New Issue
Block a user