Simo Sorce 5b3e03b
# NOTE: tests are disabled since should_be has not yet been packaged.
Simo Sorce 5b3e03b
# To re-enable, uncomment the 'check' section and lines marked 'for tests'
Simo Sorce 5b3e03b
%global run_tests 0
Simo Sorce 5b3e03b
%global with_python3 1
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
Name:           python-gssapi
5e2d6bb
Version:        1.5.0
5e2d6bb
Release:        1%{?dist}
Simo Sorce 5b3e03b
Summary:        Python Bindings for GSSAPI (RFC 2743/2744 and extensions)
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
License:        ISC
Simo Sorce 5b3e03b
URL:            https://github.com/pythongssapi/python-gssapi
Simo Sorce 57d9edf
Source0:        https://github.com/pythongssapi/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
Simo Sorce 5b3e03b
95bdd67
# Patches
95bdd67
Simo Sorce 5b3e03b
BuildRequires:  python2-devel
Simo Sorce 5b3e03b
BuildRequires:  krb5-devel >= 1.10
Simo Sorce 5b3e03b
BuildRequires:  krb5-libs >= 1.10
c4ceea5
BuildRequires:  python2-Cython >= 0.21
c4ceea5
BuildRequires:  python2-setuptools
c4ceea5
BuildRequires:  python2-tox
7342716
BuildRequires:  gcc
Simo Sorce 5b3e03b
95bdd67
# For autosetup
95bdd67
BuildRequires: git
95bdd67
Simo Sorce 5b3e03b
%if 0%{?run_tests}
c4ceea5
BuildRequires:  python2-nose
c4ceea5
BuildRequires:  python2-nose-parameterized
Simo Sorce 5b3e03b
BuildRequires:  python-shouldbe
Simo Sorce 5b3e03b
BuildRequires:  krb5-server >= 1.10
Simo Sorce 5b3e03b
%endif
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
%if 0%{?with_python3}
Simo Sorce 5b3e03b
BuildRequires:  python3-devel
Simo Sorce 5b3e03b
BuildRequires:  python3-setuptools
Simo Sorce 5b3e03b
BuildRequires:  python3-Cython
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
%if 0%{?run_tests}
Simo Sorce 5b3e03b
BuildRequires:  python3-nose
Simo Sorce 5b3e03b
BuildRequires:  python3-nose-parameterized
Simo Sorce 5b3e03b
BuildRequires:  python3-should-be
Simo Sorce 5b3e03b
%endif
Simo Sorce 5b3e03b
%endif
Simo Sorce 5b3e03b
ce6fd5b
%global _description\
ce6fd5b
A set of Python bindings to the GSSAPI C library providing both\
ce6fd5b
a high-level pythonic interfaces and a low-level interfaces\
ce6fd5b
which more closely matches RFC 2743.  Includes support for\
Simo Sorce 5b3e03b
RFC 2743, as well as multiple extensions.
Simo Sorce 5b3e03b
ce6fd5b
%description %_description
ce6fd5b
ce6fd5b
%package -n python2-gssapi
ce6fd5b
Summary: %summary
ce6fd5b
Requires:       krb5-libs >= 1.10
c4ceea5
Requires:       python2-six
c4ceea5
Requires:       python2-enum34
c4ceea5
Requires:       python2-decorator
ce6fd5b
%{?python_provide:%python_provide python2-gssapi}
ce6fd5b
ce6fd5b
%description -n python2-gssapi %_description
ce6fd5b
Simo Sorce 5b3e03b
%if 0%{?with_python3}
Simo Sorce 5b3e03b
%package -n python3-gssapi
Simo Sorce 5b3e03b
Summary:        Python 3 Bindings for GSSAPI (RFC 2743/2744 and extensions)
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
Requires:       krb5-libs >= 1.10
Simo Sorce 5b3e03b
Requires:       python3-six
Simo Sorce 5b3e03b
Requires:       python3-decorator
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
%description -n python3-gssapi
Simo Sorce 5b3e03b
A set of Python 3 bindings to the GSSAPI C library providing both
Simo Sorce 5b3e03b
a high-level pythonic interfaces and a low-level interfaces
Simo Sorce 5b3e03b
which more closely matches RFC 2743.  Includes support for
Simo Sorce 5b3e03b
RFC 2743, as well as multiple extensions.
Simo Sorce 5b3e03b
%endif
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
%prep
95bdd67
%autosetup -S git -n %{name}-%{version}
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
%if 0%{?with_python3}
Simo Sorce 5b3e03b
rm -rf %{py3dir}
Simo Sorce 5b3e03b
cp -a . %{py3dir}
Simo Sorce 5b3e03b
%endif
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
%build
Simo Sorce 5b3e03b
CFLAGS="%{optflags}" %{__python2} setup.py build
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
%if 0%{?with_python3}
Simo Sorce 5b3e03b
pushd %{py3dir}
Simo Sorce 5b3e03b
CFLAGS="%{optflags}" %{__python3} setup.py build
Simo Sorce 5b3e03b
popd
Simo Sorce 5b3e03b
%endif
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
%install
Simo Sorce 5b3e03b
%if 0%{?with_python3}
Simo Sorce 5b3e03b
pushd %{py3dir}
Simo Sorce 5b3e03b
%{__python3} setup.py install --skip-build --root %{buildroot}
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
# fix permissions on shared objects (mock seems to set them
Simo Sorce 5b3e03b
# to 0775, whereas a normal build gives 0755)
Simo Sorce 5b3e03b
find %{buildroot}%{python3_sitearch}/gssapi -name '*.so' \
Simo Sorce 5b3e03b
    -exec chmod 0755 {} \;
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
popd
Simo Sorce 5b3e03b
%endif
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
%{__python2} setup.py install --skip-build --root %{buildroot}
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
# fix permissions on shared objects (mock seems to set them
Simo Sorce 5b3e03b
# to 0775, whereas a normal build gives 0755)
Simo Sorce 5b3e03b
find %{buildroot}%{python2_sitearch}/gssapi -name '*.so' \
Simo Sorce 5b3e03b
    -exec chmod 0755 {} \;
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
%check
Simo Sorce 5b3e03b
%if 0%{?run_tests}
Simo Sorce 5b3e03b
%{__python2} setup.py nosetests
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
%if 0%{?with_python3}
Simo Sorce 5b3e03b
pushd %{py3dir}
Simo Sorce 5b3e03b
%{__python3} setup.py nosetests
Simo Sorce 5b3e03b
popd
Simo Sorce 5b3e03b
%endif
Simo Sorce 5b3e03b
%endif
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
ce6fd5b
%files -n python2-gssapi
Simo Sorce 5b3e03b
%doc README.txt
Simo Sorce 5b3e03b
%license LICENSE.txt
Simo Sorce 5b3e03b
%{python2_sitearch}/*
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
%if 0%{?with_python3}
Simo Sorce 5b3e03b
%files -n python3-gssapi
Simo Sorce 5b3e03b
%doc README.txt
Simo Sorce 5b3e03b
%license LICENSE.txt
Simo Sorce 5b3e03b
%{python3_sitearch}/*
Simo Sorce 5b3e03b
%endif
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
Simo Sorce 5b3e03b
%changelog
5e2d6bb
* Fri Apr 06 2018 Robbie Harwood <rharwood@redhat.com> - 1.5.0-1
5e2d6bb
- Prepare for release 1.5.0
5e2d6bb
7342716
* Wed Mar 07 2018 Robbie Harwood <rharwood@redhat.com> - 1.4.1-2
7342716
- Add gcc to build-deps
7342716
e81261b
* Fri Feb 16 2018 Robbie Harwood <rharwood@redhat.com> - 1.4.1-1
e81261b
- Prepare for release 1.4.1
e81261b
534dc1d
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.3.0-3
534dc1d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
534dc1d
c4ceea5
* Fri Jan 19 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.3.0-2
c4ceea5
- Update Python 2 dependency declarations to new packaging standards
c4ceea5
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
c4ceea5
7a73d71
* Fri Dec 01 2017 Robbie Harwood <rharwood@redhat.com> - 1.3.0-1
7a73d71
- New upstream release v1.3.0
7a73d71
ce6fd5b
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 1.2.0-8
ce6fd5b
- Python 2 binary package renamed to python2-gssapi
ce6fd5b
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
ce6fd5b
3c5eae9
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-7
3c5eae9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
3c5eae9
f2133a9
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-6
f2133a9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f2133a9
95bdd67
* Tue Apr 04 2017 Robbie Harwood <rharwood@redhat.com> 1.2.0-5
95bdd67
- Fix problem where gss_display_status can infinite loop
95bdd67
- Move to autosetup and rpm-git-tree
95bdd67
e92d767
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-4
e92d767
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
e92d767
76eccf2
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.2.0-3
76eccf2
- Rebuild for Python 3.6
76eccf2
60da3c9
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-2
60da3c9
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
60da3c9
ada57e2
* Thu Mar 03 2016 Robbie Harwood <rharwood@redhat.com> - 1.2.0-1
ada57e2
- New upstream version 1.2.0
ada57e2
cb48337
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4-2
cb48337
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
cb48337
022601f
* Mon Nov 30 2015 Robbie Harwood <rharwood@redhat.com> - 1.1.4-1
022601f
- New upstream version 1.1.4
022601f
- Resolves #1286458
022601f
Robert Kuska 890c24f
* Wed Nov 04 2015 Robert Kuska <rkuska@redhat.com> - 1.1.3-2
Robert Kuska 890c24f
- Rebuilt for Python3.5 rebuild
Robert Kuska 890c24f
1f30060
* Fri Sep 04 2015 Robbie Harwood <rharwood@redhat.com> - 1.1.3-1
1f30060
- New upstream minor release
1f30060
Simo Sorce d6772b9
* Thu Aug 20 2015 Simo Sorce <simo@redhat.com> - 1.1.2-1
Simo Sorce d6772b9
- New minor release.
Simo Sorce d6772b9
- Resolves #1254458
Simo Sorce d6772b9
- Fixes a crash bug when inquiring incomplete security contexts
Simo Sorce d6772b9
7bc0425
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-2
7bc0425
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
7bc0425
Simo Sorce 57d9edf
* Tue Apr 28 2015 Simo Sorce <simo@redhat.com> - 1.1.1-1
Simo Sorce 57d9edf
- New minor release.
Simo Sorce 57d9edf
Simo Sorce 5b3e03b
* Thu Feb 19 2015 Solly Ross <sross@redhat.com> - 1.1.0-1
Simo Sorce 5b3e03b
- Initial Packaging