Blame SPECS/python-gssapi.spec

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