%global srcname requests_credssp %global gh_owner jborean93 %global gh_name requests-credssp %if 0%{?fedora} # escaping for EPEL. %global with_python3 1 %endif Name: python-%{gh_name} Version: 1.0.0 Release: 1%{?dist} Summary: This package allows for HTTPS CredSSP authentication using the requests library. License: MIT URL: https://pypi.python.org/pypi/%{srcname} Source0: https://github.com/%{gh_owner}/%{gh_name}/archive/v%{version}.tar.gz#/%{gh_name}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-setuptools BuildRequires: python2-devel # For tests BuildRequires: python2-pytest BuildRequires: python2-cryptography BuildRequires: python2-requests BuildRequires: python2-pyasn1 BuildRequires: python2-ntlm-auth %if 0%{?fedora} BuildRequires: python2-pyOpenSSL %else BuildRequires: pyOpenSSL %endif %if 0%{?with_python3} BuildRequires: python3-setuptools BuildRequires: python3-devel # For tests BuildRequires: python3-pytest BuildRequires: python3-cryptography BuildRequires: python3-requests BuildRequires: python3-pyOpenSSL BuildRequires: python3-pyasn1 BuildRequires: python3-ntlm-auth %endif %description This package allows for HTTPS CredSSP authentication using the requests library. CredSSP is a Microsoft authentication that allows your credentials to be delegated to a server giving you double hop authentication. %package -n python2-%{gh_name} Requires: python2-cryptography Requires: python2-requests Requires: python2-pyOpenSSL Requires: python2-pyasn1 Requires: python2-ntlm-auth Summary: Python 2 credssp library %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{gh_name} This package allows for HTTPS CredSSP authentication using the requests library. CredSSP is a Microsoft authentication that allows your credentials to be delegated to a server giving you double hop authentication. %if 0%{?with_python3} %package -n python3-%{gh_name} Requires: python3-cryptography Requires: python3-requests Requires: python3-pyOpenSSL Requires: python3-pyasn1 Requires: python3-ntlm-auth Summary: Python 3 credssp library %{?python_provide:%python_provide python3-%{srcname}} %description -n python3-%{gh_name} This package allows for HTTPS CredSSP authentication using the requests library. CredSSP is a Microsoft authentication that allows your credentials to be delegated to a server giving you double hop authentication. %endif %prep %autosetup -n %{gh_name}-%{version} # Remove bundled egg-info, it's not there yet but just in case it gets added upstream rm -rf %{gh_name}.egg-info %build %py2_build %if 0%{?with_python3} %py3_build %endif %install %py2_install %if 0%{?with_python3} %py3_install %endif %check %{__python2} -m pytest tests %if 0%{?with_python3} %{__python3} -m pytest tests %endif %files -n python2-%{gh_name} %license LICENSE %doc CHANGES.md README.md %{python2_sitelib}/%{srcname} %{python2_sitelib}/%{srcname}-%{version}-py?.?.egg-info %if 0%{?with_python3} %files -n python3-%{gh_name} %license LICENSE %doc CHANGES.md README.md %{python3_sitelib}/%{srcname} %{python3_sitelib}/%{srcname}-%{version}-py?.?.egg-info %endif %changelog * Mon May 21 2018 James Hogarth - 1.0.0-1 - Initial package