package init

This commit is contained in:
wangxiao65 2020-08-06 10:25:22 +08:00
parent dad6a6c8ed
commit 1457ace18f
4 changed files with 132 additions and 0 deletions

View File

@ -0,0 +1,38 @@
From ce277612b1e262a84a1a97e5084571b66b7dd573 Mon Sep 17 00:00:00 2001
From: Dan Callaghan <dcallagh@redhat.com>
Date: Thu, 11 Feb 2016 10:29:02 +1000
Subject: [PATCH] switch requirement from pykerberos back to kerberos
---
requirements.txt | 2 +-
setup.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/requirements.txt b/requirements.txt
index c49add0..98fcbbc 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,6 +1,6 @@
requests>=1.1.0
winkerberos >= 0.5.0; sys.platform == 'win32'
-pykerberos >= 1.1.8, < 2.0.0; sys.platform != 'win32'
+kerberos; sys.platform != 'win32'
cryptography>=1.3
cryptography>=1.3; python_version!="3.3"
cryptography>=1.3, <2; python_version=="3.3"
diff --git a/setup.py b/setup.py
index 8381ac7..53dafc0 100755
--- a/setup.py
+++ b/setup.py
@@ -54,7 +54,7 @@ def get_version():
],
extras_require={
':sys_platform=="win32"': ['winkerberos>=0.5.0'],
- ':sys_platform!="win32"': ['pykerberos>=1.1.8,<2.0.0'],
+ ':sys_platform!="win32"': ['kerberos'],
},
test_suite='test_requests_kerberos',
tests_require=['mock'],
--
2.13.6

View File

@ -0,0 +1,90 @@
%global _empty_manifest_terminate_build 0
Name: python-requests-kerberos
Version: 0.12.0
Release: 1
Summary: A Kerberos authentication handler for python-requests
License: MIT
URL: https://github.com/requests/requests-kerberos
Source0: https://files.pythonhosted.org/packages/14/61/85737ebe1e65cd4bf023d9e4610df70851bd7638e003b81a44a9b901feae/requests-kerberos-0.12.0.tar.gz
Patch0000: 0001-switch-requirement-from-pykerberos-back-to-kerberos.patch
BuildArch: noarch
Requires: python3-requests python3-cryptography
%description
Requests is an HTTP library, written in Python, for human beings. This library
adds optional Kerberos/GSSAPI authentication support and supports mutual
authentication. Basic GET usage:
>>> import requests
>>> from requests_kerberos import HTTPKerberosAuth
>>> r = requests.get("http://example.org", auth=HTTPKerberosAuth())
The entire ``requests.api`` should be supported.
%package -n python3-requests-kerberos
Summary: A Kerberos authentication handler for python-requests
Provides: python-requests-kerberos
BuildRequires: python3-devel python3-setuptools
%description -n python3-requests-kerberos
Requests is an HTTP library, written in Python, for human beings. This library
adds optional Kerberos/GSSAPI authentication support and supports mutual
authentication. Basic GET usage:
>>> import requests
>>> from requests_kerberos import HTTPKerberosAuth
>>> r = requests.get("http://example.org", auth=HTTPKerberosAuth())
The entire ``requests.api`` should be supported.
%package help
Summary: Development documents and examples for requests-kerberos
Provides: python3-requests-kerberos-doc
%description help
Requests is an HTTP library, written in Python, for human beings. This library
adds optional Kerberos/GSSAPI authentication support and supports mutual
authentication. Basic GET usage:
>>> import requests
>>> from requests_kerberos import HTTPKerberosAuth
>>> r = requests.get("http://example.org", auth=HTTPKerberosAuth())
The entire ``requests.api`` should be supported.
%prep
%autosetup -n requests-kerberos-0.12.0 -p1
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-requests-kerberos -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Tue Aug 4 2020 wangxiao <wangxiao65@huawei.com> - 0.12.0-1
- package init

View File

@ -0,0 +1,4 @@
version_control: github
src_repo: requests-kerberos
tag_prefix: "^v"
seperator: "."

Binary file not shown.