Package init
This commit is contained in:
parent
6916b6fab6
commit
8690e06f75
36
Make-webtest-an-optional-dependency.patch
Normal file
36
Make-webtest-an-optional-dependency.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
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)),
|
||||||
BIN
kdcproxy-0.4.tar.gz
Normal file
BIN
kdcproxy-0.4.tar.gz
Normal file
Binary file not shown.
63
python-kdcproxy.spec
Normal file
63
python-kdcproxy.spec
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
Name: python-kdcproxy
|
||||||
|
Version: 0.4
|
||||||
|
Release: 3
|
||||||
|
Summary: A kerberos KDC HTTP/HTTPS proxy Python 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
|
||||||
|
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
BuildRequires: python2-devel python2-pytest python2-coverage python2-asn1crypto python2-dns python2-mock
|
||||||
|
BuildRequires: python3-devel python3-pytest python3-coverage python3-asn1crypto python3-dns python3-mock
|
||||||
|
BuildRequires: git
|
||||||
|
|
||||||
|
%description
|
||||||
|
A kerberos KDC HTTP/HTTPS proxy Python WSGI module.
|
||||||
|
|
||||||
|
%package -n python2-kdcproxy
|
||||||
|
Summary: A kerberos KDC HTTP/HTTPS proxy Python 2.x WSGI module
|
||||||
|
Requires: python2-dns python2-asn1crypto
|
||||||
|
%{?python_provide:%python_provide python2-kdcproxy}
|
||||||
|
|
||||||
|
%description -n python2-kdcproxy
|
||||||
|
A kerberos KDC HTTP/HTTPS proxy Python 2.x WSGI module.
|
||||||
|
|
||||||
|
%package -n python3-kdcproxy
|
||||||
|
Summary: A kerberos KDC HTTP/HTTPS proxy Python 3.x WSGI module
|
||||||
|
Requires: python3-dns python3-asn1crypto
|
||||||
|
%{?python_provide:%python_provide python3-kdcproxy}
|
||||||
|
|
||||||
|
%description -n python3-kdcproxy
|
||||||
|
A kerberos KDC HTTP/HTTPS proxy Python 3.x WSGI module.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n kdcproxy-%{version} -p1 -S git
|
||||||
|
|
||||||
|
%build
|
||||||
|
%py2_build
|
||||||
|
%py3_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%py2_install
|
||||||
|
%py3_install
|
||||||
|
|
||||||
|
%check
|
||||||
|
KDCPROXY_ASN1MOD=asn1crypto %{__python2} -m pytest
|
||||||
|
KDCPROXY_ASN1MOD=asn1crypto %{__python3} -m pytest
|
||||||
|
|
||||||
|
%files -n python2-kdcproxy
|
||||||
|
%doc README COPYING
|
||||||
|
%{python2_sitelib}/kdcproxy/
|
||||||
|
%{python2_sitelib}/kdcproxy-%{version}-*.egg-info
|
||||||
|
|
||||||
|
%files -n python3-kdcproxy
|
||||||
|
%doc README COPYING
|
||||||
|
%{python3_sitelib}/kdcproxy/
|
||||||
|
%{python3_sitelib}/kdcproxy-%{version}-*.egg-info
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Apr 22 2020 leiju <leiju4@huawei.com> - 0.4-3
|
||||||
|
- Package init
|
||||||
4
python-kdcproxy.yaml
Normal file
4
python-kdcproxy.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
version_control: github
|
||||||
|
src_repo: latchset/kdcproxy
|
||||||
|
tag_prefix: ^v
|
||||||
|
seperator: .
|
||||||
Loading…
x
Reference in New Issue
Block a user