From 5b3e03bfe55b276ef9733324310539e38289114f Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 6 Apr 2015 09:20:13 -0400 Subject: [PATCH] Initial Packaging --- .gitignore | 1 + python-gssapi.dont-require-tox.patch | 10 ++ python-gssapi.spec | 134 +++++++++++++++++++++++++++ sources | 1 + 4 files changed, 146 insertions(+) create mode 100644 python-gssapi.dont-require-tox.patch create mode 100644 python-gssapi.spec diff --git a/.gitignore b/.gitignore index e69de29..c163e8a 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/v1.1.0.tar.gz diff --git a/python-gssapi.dont-require-tox.patch b/python-gssapi.dont-require-tox.patch new file mode 100644 index 0000000..db96ba3 --- /dev/null +++ b/python-gssapi.dont-require-tox.patch @@ -0,0 +1,10 @@ +--- setup.py.orig 2015-02-23 13:47:11.315000000 -0500 ++++ setup.py 2015-02-23 13:47:24.418000000 -0500 +@@ -198,7 +198,4 @@ + 'decorator', + 'six' + ], +- tests_require=[ +- 'tox' +- ] + ) diff --git a/python-gssapi.spec b/python-gssapi.spec new file mode 100644 index 0000000..10bbfb1 --- /dev/null +++ b/python-gssapi.spec @@ -0,0 +1,134 @@ +# NOTE: tests are disabled since should_be has not yet been packaged. +# To re-enable, uncomment the 'check' section and lines marked 'for tests' +%global run_tests 0 +%global with_python3 1 + +Name: python-gssapi +Version: 1.1.0 +Release: 1%{?dist} +Summary: Python Bindings for GSSAPI (RFC 2743/2744 and extensions) + +License: ISC +URL: https://github.com/pythongssapi/python-gssapi +Source0: https://github.com/pythongssapi/%{name}/releases/download/v%{version}/v%{version}.tar.gz +Patch1: python-gssapi.dont-require-tox.patch + +BuildRequires: python2-devel +BuildRequires: krb5-devel >= 1.10 +BuildRequires: krb5-libs >= 1.10 +BuildRequires: Cython >= 0.21 +BuildRequires: python-setuptools +Requires: krb5-libs >= 1.10 +Requires: python-six +Requires: python-enum34 +Requires: python-decorator + +%if 0%{?run_tests} +BuildRequires: python-nose +BuildRequires: python-nose-parameterized +BuildRequires: python-shouldbe +BuildRequires: krb5-server >= 1.10 +%endif + +%if 0%{?with_python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-Cython + +%if 0%{?run_tests} +BuildRequires: python3-nose +BuildRequires: python3-nose-parameterized +BuildRequires: python3-should-be +%endif +%endif + +%description +A set of Python bindings to the GSSAPI C library providing both +a high-level pythonic interfaces and a low-level interfaces +which more closely matches RFC 2743. Includes support for +RFC 2743, as well as multiple extensions. + +%if 0%{?with_python3} +%package -n python3-gssapi +Summary: Python 3 Bindings for GSSAPI (RFC 2743/2744 and extensions) + +Requires: krb5-libs >= 1.10 +Requires: python3-six +Requires: python3-enum34 +Requires: python3-decorator + +%description -n python3-gssapi +A set of Python 3 bindings to the GSSAPI C library providing both +a high-level pythonic interfaces and a low-level interfaces +which more closely matches RFC 2743. Includes support for +RFC 2743, as well as multiple extensions. +%endif + +%prep +%setup -q +%patch1 + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif + + +%build +CFLAGS="%{optflags}" %{__python2} setup.py build + +%if 0%{?with_python3} +pushd %{py3dir} +CFLAGS="%{optflags}" %{__python3} setup.py build +popd +%endif + + +%install +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install --skip-build --root %{buildroot} + +# fix permissions on shared objects (mock seems to set them +# to 0775, whereas a normal build gives 0755) +find %{buildroot}%{python3_sitearch}/gssapi -name '*.so' \ + -exec chmod 0755 {} \; + +popd +%endif + +%{__python2} setup.py install --skip-build --root %{buildroot} + +# fix permissions on shared objects (mock seems to set them +# to 0775, whereas a normal build gives 0755) +find %{buildroot}%{python2_sitearch}/gssapi -name '*.so' \ + -exec chmod 0755 {} \; + +%check +%if 0%{?run_tests} +%{__python2} setup.py nosetests + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py nosetests +popd +%endif +%endif + + +%files +%doc README.txt +%license LICENSE.txt +%{python2_sitearch}/* + +%if 0%{?with_python3} +%files -n python3-gssapi +%doc README.txt +%license LICENSE.txt +%{python3_sitearch}/* +%endif + + +%changelog +* Thu Feb 19 2015 Solly Ross - 1.1.0-1 +- Initial Packaging diff --git a/sources b/sources index e69de29..539de07 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +868bc2fcf1b4a613b07798c442187e1c v1.1.0.tar.gz