diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..77788c4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/requests-kerberos-0.2.tar.gz diff --git a/python-requests-kerberos.spec b/python-requests-kerberos.spec new file mode 100644 index 0000000..d8eb125 --- /dev/null +++ b/python-requests-kerberos.spec @@ -0,0 +1,87 @@ +%global upstream_name requests-kerberos +%global module_name requests_kerberos + +# Upstream doesn't support Python 3 yet, and there is no python3-kerberos. +%if 0 && 0%{?fedora} || 0%{?rhel} > 6 +%bcond_without python3 +%else +%bcond_with python3 +%endif + +Name: python-%{upstream_name} +Version: 0.2 +Release: 1%{?dist} +Summary: A Kerberos authentication handler for python-requests +License: MIT +URL: https://github.com/requests/requests-kerberos +Source0: http://pypi.python.org/packages/source/r/%{upstream_name}/%{upstream_name}-%{version}.tar.gz +BuildArch: noarch +BuildRequires: python2-devel +BuildRequires: python-setuptools +%if %{with python3} +BuildRequires: python3-devel +BuildRequires: python3-setuptools +%endif + +Requires: python-requests +Requires: python-kerberos + +%description +Requests is an HTTP library, written in Python, for human beings. This library +adds optional Kerberos/GSSAPI authentication support and supports mutual +authentication. + +%if %{with python3} +%package -n python3-%{upstream_name} +Summary: A Kerberos authentication handler for python-requests +Requires: python3-requests +Requires: python3-kerberos + +%description -n python3-%{upstream_name} +Requests is an HTTP library, written in Python, for human beings. This library +adds optional Kerberos/GSSAPI authentication support and supports mutual +authentication. +%endif + +%prep +%setup -q -n %{upstream_name}-%{version} +rm -r %{module_name}.egg-info + +%if %{with python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif + +%build +%{__python} setup.py build + +%if %{with python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif + +%install +%if %{with python3} +pushd %{py3dir} +%{__python3} setup.py install --skip-build --root %{buildroot} +popd +%endif + +%{__python} setup.py install --skip-build --root %{buildroot} + +%files +%doc README.rst LICENSE AUTHORS HISTORY.rst +%{python_sitelib}/%{module_name} +%{python_sitelib}/%{module_name}*.egg-info + +%if %{with python3} +%files -n python3-%{upstream_name} +%doc README.rst LICENSE AUTHORS HISTORY.rst +%{python3_sitelib}/%{module_name} +%{python3_sitelib}/%{module_name}*.egg-info +%endif + +%changelog +* Tue May 14 2013 Dan Callaghan - 0.2-1 +- initial version diff --git a/sources b/sources new file mode 100644 index 0000000..c7f22b5 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +f03cabf4726be999a5a11b0419a83164 requests-kerberos-0.2.tar.gz