Blame SPECS/python-gssapi.spec

3fd62d
# NOTE: tests are disabled since should_be has not yet been packaged.
3fd62d
%global run_tests 0
3fd62d
3fd62d
# NOTE: python3 is disabled since python3-Cython is not yet packaged
3fd62d
%global with_python3 0
3fd62d
3fd62d
Name:           python-gssapi
3fd62d
Version:        1.2.0
3fd62d
Release:        3%{?dist}
3fd62d
Summary:        Python Bindings for GSSAPI (RFC 2743/2744 and extensions)
3fd62d
3fd62d
License:        ISC
3fd62d
URL:            https://github.com/pythongssapi/python-gssapi
3fd62d
Source0:        https://github.com/pythongssapi/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
3fd62d
3fd62d
Patch0: k5test-0.9.1-usr_lib64.patch
3fd62d
Patch1: python-gssapi-cython_0.19.patch
3fd62d
Patch2: python-gssapi-1.2.1-overwrite_cred_store.patch
3fd62d
Patch3: python-gssapi-display_status-infinite-recursion.patch
3fd62d
3fd62d
BuildRequires:  python2-devel
3fd62d
BuildRequires:  krb5-devel >= 1.10
3fd62d
BuildRequires:  krb5-libs >= 1.10
3fd62d
BuildRequires:  Cython >= 0.19
3fd62d
BuildRequires:  python-setuptools
3fd62d
Requires:       krb5-libs >= 1.10
3fd62d
Requires:       python-six
3fd62d
Requires:       python-enum34
3fd62d
Requires:       python-decorator
3fd62d
3fd62d
%if 0%{?run_tests}
3fd62d
BuildRequires:  python-nose
3fd62d
BuildRequires:  python-nose-parameterized
3fd62d
BuildRequires:  python-shouldbe
3fd62d
BuildRequires:  python-tox
3fd62d
BuildRequires:  krb5-server >= 1.10
3fd62d
%endif
3fd62d
3fd62d
%if 0%{?with_python3}
3fd62d
BuildRequires:  python3-devel
3fd62d
BuildRequires:  python3-setuptools
3fd62d
BuildRequires:  python3-Cython
3fd62d
3fd62d
%if 0%{?run_tests}
3fd62d
BuildRequires:  python3-nose
3fd62d
BuildRequires:  python3-nose-parameterized
3fd62d
BuildRequires:  python3-should-be
3fd62d
%endif
3fd62d
%endif
3fd62d
3fd62d
%description
3fd62d
A set of Python bindings to the GSSAPI C library providing both
3fd62d
a high-level pythonic interfaces and a low-level interfaces
3fd62d
which more closely matches RFC 2743.  Includes support for
3fd62d
RFC 2743, as well as multiple extensions.
3fd62d
3fd62d
3fd62d
%if 0%{?with_python3}
3fd62d
%package -n python3-gssapi
3fd62d
Summary:        Python 3 Bindings for GSSAPI (RFC 2743/2744 and extensions)
3fd62d
3fd62d
Requires:       krb5-libs >= 1.10
3fd62d
Requires:       python3-six
3fd62d
Requires:       python3-decorator
3fd62d
3fd62d
%description -n python3-gssapi
3fd62d
A set of Python 3 bindings to the GSSAPI C library providing both
3fd62d
a high-level pythonic interfaces and a low-level interfaces
3fd62d
which more closely matches RFC 2743.  Includes support for
3fd62d
RFC 2743, as well as multiple extensions.
3fd62d
%endif
3fd62d
3fd62d
3fd62d
%prep
3fd62d
%setup -q
3fd62d
3fd62d
%patch0 -p1 -b .usr_lib64
3fd62d
%patch1 -p1 -b .cython_0.19
3fd62d
%patch2 -p1 -b .overwrite_cred_store
3fd62d
%patch3 -p1 -b .display_status-infinite-recursion
3fd62d
3fd62d
%if 0%{?with_python3}
3fd62d
rm -rf %{py3dir}
3fd62d
cp -a . %{py3dir}
3fd62d
%endif
3fd62d
3fd62d
3fd62d
%build
3fd62d
CFLAGS="%{optflags}" %{__python2} setup.py build
3fd62d
3fd62d
%if 0%{?with_python3}
3fd62d
pushd %{py3dir}
3fd62d
CFLAGS="%{optflags}" %{__python3} setup.py build
3fd62d
popd
3fd62d
%endif
3fd62d
3fd62d
3fd62d
%install
3fd62d
%if 0%{?with_python3}
3fd62d
pushd %{py3dir}
3fd62d
%{__python3} setup.py install --skip-build --root %{buildroot}
3fd62d
3fd62d
# fix permissions on shared objects (mock seems to set them
3fd62d
# to 0775, whereas a normal build gives 0755)
3fd62d
find %{buildroot}%{python3_sitearch}/gssapi -name '*.so' \
3fd62d
    -exec chmod 0755 {} \;
3fd62d
3fd62d
popd
3fd62d
%endif
3fd62d
3fd62d
%{__python2} setup.py install --skip-build --root %{buildroot}
3fd62d
3fd62d
# fix permissions on shared objects (mock seems to set them
3fd62d
# to 0775, whereas a normal build gives 0755)
3fd62d
find %{buildroot}%{python2_sitearch}/gssapi -name '*.so' \
3fd62d
    -exec chmod 0755 {} \;
3fd62d
3fd62d
%check
3fd62d
%if 0%{?run_tests}
3fd62d
%{__python2} setup.py nosetests
3fd62d
3fd62d
%if 0%{?with_python3}
3fd62d
pushd %{py3dir}
3fd62d
%{__python3} setup.py nosetests
3fd62d
popd
3fd62d
%endif
3fd62d
%endif
3fd62d
3fd62d
3fd62d
%files
3fd62d
%doc README.txt
3fd62d
%license LICENSE.txt
3fd62d
%{python2_sitearch}/*
3fd62d
3fd62d
%if 0%{?with_python3}
3fd62d
%files -n python3-gssapi
3fd62d
%doc README.txt
3fd62d
%license LICENSE.txt
3fd62d
%{python3_sitearch}/*
3fd62d
%endif
3fd62d
3fd62d
3fd62d
%changelog
3fd62d
* Tue Apr 11 2017 Robbie Harwood <rharwood@redhat.com> - 1.2.0-3
3fd62d
- Fix an infinite loop from gss_display_status
3fd62d
- Resolves: #1438390
3fd62d
3fd62d
* Mon Apr 04 2016 Robbie Harwood <rharwood@redhat.com> - 1.2.0-2
3fd62d
- Move python-tox from build requirement to test requirement
3fd62d
- Resolves: #1292139
3fd62d
3fd62d
* Mon Mar 28 2016 Robbie Harwood <rharwood@redhat.com> - 1.2.0-1
3fd62d
- Import upstream version 1.2.0 with patches
3fd62d
- Resolves: #1292139