Update to latest 0.4.2

This commit is contained in:
lei_ju 2020-06-30 16:21:31 +08:00
parent ba47e1f55b
commit f620c29a2d
5 changed files with 26 additions and 120 deletions

View File

@ -1,36 +0,0 @@
From 903d77cb73bd6713279f1d9920f5f665293a26c2 Mon Sep 17 00:00:00 2001
From: Robbie Harwood <rharwood@redhat.com>
Date: Thu, 9 Aug 2018 14:57:56 -0400
Subject: [PATCH] Make webtest an optional dependency
Resolves: #38
(cherry picked from commit c0bee88c60deb176d420d90447d24c370d70727a)
---
tests.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tests.py b/tests.py
index 992529f..c2b1fc0 100644
--- a/tests.py
+++ b/tests.py
@@ -33,7 +33,11 @@ from dns.rdataclass import IN as RDCLASS_IN
from dns.rdatatype import SRV as RDTYPE_SRV
from dns.rdtypes.IN.SRV import SRV
-from webtest import TestApp as WebTestApp
+try:
+ from webtest import TestApp as WebTestApp
+except ImportError:
+ print("webtest not installed! Tests will be skipped")
+ WebTestApp = "skip"
import kdcproxy
from kdcproxy import codec
@@ -45,6 +49,7 @@ HERE = os.path.dirname(os.path.abspath(__file__))
KRB5_CONFIG = os.path.join(HERE, 'tests.krb5.conf')
+@unittest.skipIf(WebTestApp == "skip", "webtest not installed")
class KDCProxyWSGITests(unittest.TestCase):
addrinfo = [
(2, 1, 6, '', ('128.66.0.2', 88)),

View File

@ -1,60 +0,0 @@
From fc96b2c6c38b896ee27a15e9a77b7dade781971e Mon Sep 17 00:00:00 2001
From: Christian Heimes <cheimes@redhat.com>
Date: Mon, 11 Feb 2019 13:22:28 +0100
Subject: [PATCH] Use dnspython package on Python 3
The dnspython3 package is obsolete and superseded by dnspython. The dnspython
package supports Python 2 and Python 3.
The change also fixes a problem with Fedora 30's new Python dependency
generator. The python3-dnspython package does not provide dnspython3
distribution:
nothing provides python3.7dist(dnspython3) needed by python3-kdcproxy-0.4-4.fc30.noarch
See: https://pypi.org/project/dnspython3/
Signed-off-by: Christian Heimes <cheimes@redhat.com>
---
setup.py | 17 +----------------
1 file changed, 1 insertion(+), 16 deletions(-)
diff --git a/setup.py b/setup.py
index 7318dba..5f9742d 100644
--- a/setup.py
+++ b/setup.py
@@ -20,16 +20,12 @@
# THE SOFTWARE.
import os
-import sys
-import setuptools
from setuptools import setup
-
-SETUPTOOLS_VERSION = tuple(int(v) for v in setuptools.__version__.split("."))
-
install_requires = [
'asn1crypto>=0.23',
+ 'dnspython'
]
extras_require = {
@@ -37,17 +33,6 @@
"test_pep8": ['flake8', 'flake8-import-order', 'pep8-naming']
}
-if SETUPTOOLS_VERSION >= (18, 0):
- extras_require.update({
- ":python_version<'3'": ["dnspython"],
- ":python_version>='3'": ["dnspython3"],
- })
-else:
- if sys.version_info.major == 2:
- install_requires.append("dnspython")
- else:
- install_requires.append("dnspython3")
-
def read(fname):
fname = os.path.join(os.path.dirname(__file__), fname)

BIN
kdcproxy-0.4.2.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,32 +1,33 @@
Name: python-kdcproxy
Version: 0.4
Release: 3
Summary: A kerberos KDC HTTP/HTTPS proxy Python WSGI module
%global realname kdcproxy
Name: python-%{realname}
Version: 0.4.2
Release: 4
Summary: MS-KKDCP (kerberos proxy) WSGI module
License: MIT
URL: https://github.com/npmccallum/kdcproxy
Source0: https://github.com/latchset/kdcproxy/releases/download/v0.4/kdcproxy-%{version}.tar.gz
Patch0000: Make-webtest-an-optional-dependency.patch
Patch0001: Use-dnspython-package-on-python3.patch
URL: https://github.com/npmccallum/%{realname}
Source0: https://github.com/latchset/kdcproxy/releases/download/v0.4.2/kdcproxy-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python3-devel python3-pytest python3-coverage python3-asn1crypto python3-dns python3-mock
BuildRequires: git
BuildRequires: python3-devel python3-pytest python3-coverage python3-asn1crypto python3-dns
BuildRequires: python3-mock
%description
A kerberos KDC HTTP/HTTPS proxy Python WSGI module.
This package contains a Python WSGI module for proxying KDC requests over
HTTP by following the MS-KKDCP protocol. It aims to be simple to deploy, with
minimal configuration.
%package -n python3-kdcproxy
Summary: A kerberos KDC HTTP/HTTPS proxy Python 3.x WSGI module
%package -n python3-%{realname}
Summary: MS-KKDCP (kerberos proxy) WSGI module
Requires: python3-dns python3-asn1crypto
%{?python_provide:%python_provide python3-kdcproxy}
%{?python_provide:%python_provide python3-%{realname}}
%description -n python3-kdcproxy
A kerberos KDC HTTP/HTTPS proxy Python 3.x WSGI module.
%description -n python3-%{realname}
This package contains a Python 3.x WSGI module for proxying KDC requests over
HTTP by following the MS-KKDCP protocol. It aims to be simple to deploy, with
minimal configuration.
%prep
%autosetup -n kdcproxy-%{version} -p1 -S git
%autosetup -S git -n %{realname}-%{version}
%build
%py3_build
@ -37,11 +38,12 @@ A kerberos KDC HTTP/HTTPS proxy Python 3.x WSGI module.
%check
KDCPROXY_ASN1MOD=asn1crypto %{__python3} -m pytest
%files -n python3-kdcproxy
%doc README COPYING
%{python3_sitelib}/kdcproxy/
%{python3_sitelib}/kdcproxy-%{version}-*.egg-info
%files -n python3-%{realname}
%doc README
%license COPYING
%{python3_sitelib}/%{realname}/
%{python3_sitelib}/%{realname}-%{version}-*.egg-info
%changelog
* Wed Apr 22 2020 leiju <leiju4@huawei.com> - 0.4-3
* Tue Jun 30 2020 leiju <leiju4@huawei.com> - 0.4.2-4
- Package init