Blame SPECS/python-gssapi.spec

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