forked from pool/python-mocket
Accepting request 731639 from home:jayvdb:py-new
add patch to fix py2 bug OBS-URL: https://build.opensuse.org/request/show/731639 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-mocket?expand=0&rev=1
This commit is contained in:
commit
c97da4fa1a
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
mocket-3.7.2.tar.gz
Normal file
3
mocket-3.7.2.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1637b5b7878a9d6fc90c124f059a78c824a3972932e821fd8069532dc57aec8e
|
||||
size 68728
|
22
partial-wildcards.patch
Normal file
22
partial-wildcards.patch
Normal file
@ -0,0 +1,22 @@
|
||||
From 98b3302d9f7bef7becaacd0a86b2ba48e90ddcfb Mon Sep 17 00:00:00 2001
|
||||
From: Giorgio Salluzzo <giorgio.salluzzo@gmail.com>
|
||||
Date: Wed, 18 Sep 2019 08:12:54 +0200
|
||||
Subject: [PATCH] Partial wildcards fix.
|
||||
|
||||
---
|
||||
mocket/mocket.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/mocket/mocket.py b/mocket/mocket.py
|
||||
index 2cfe43d..df00813 100644
|
||||
--- a/mocket/mocket.py
|
||||
+++ b/mocket/mocket.py
|
||||
@@ -210,7 +210,7 @@ def getpeercert(self, *args, **kwargs):
|
||||
return {
|
||||
"notAfter": shift.strftime("%b %d %H:%M:%S GMT"),
|
||||
"subjectAltName": (
|
||||
- ("DNS", "*%s" % self._host),
|
||||
+ ("DNS", "*.%s" % self._host),
|
||||
("DNS", self._host),
|
||||
("DNS", "*"),
|
||||
),
|
10
python-mocket.changes
Normal file
10
python-mocket.changes
Normal file
@ -0,0 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 18 04:08:03 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Activate test suite
|
||||
- Update to v3.7.2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 19 11:41:58 AM UTC 2019 - John Vandenberg <jayvdb@gmail.com>
|
||||
|
||||
- Initial spec for v2.7.2
|
108
python-mocket.spec
Normal file
108
python-mocket.spec
Normal file
@ -0,0 +1,108 @@
|
||||
#
|
||||
# spec file for package python-mocket
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-mocket
|
||||
Version: 3.7.2
|
||||
Release: 0
|
||||
Summary: Python socket mock framework
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/mindflayer/python-mocket
|
||||
Source: https://github.com/mindflayer/python-mocket/archive/%{version}.tar.gz#/mocket-%{version}.tar.gz
|
||||
# https://github.com/mindflayer/python-mocket/issues/102
|
||||
Patch0: https://github.com/mindflayer/python-mocket/commit/98b3302d9.patch#/partial-wildcards.patch
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-decorator
|
||||
Requires: python-hexdump
|
||||
Requires: python-python-magic
|
||||
Requires: python-six
|
||||
Requires: python-urllib3
|
||||
Suggests: python-gevent
|
||||
Suggests: python-pook >= 0.2.1
|
||||
Suggests: python-redis
|
||||
Suggests: python-requests
|
||||
Suggests: python-xxhash
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module cryptography}
|
||||
BuildRequires: %{python_module decorator}
|
||||
BuildRequires: %{python_module gevent}
|
||||
BuildRequires: %{python_module hexdump}
|
||||
BuildRequires: %{python_module mock}
|
||||
BuildRequires: %{python_module pyOpenSSL}
|
||||
BuildRequires: %{python_module PySocks}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module python-magic}
|
||||
BuildRequires: %{python_module redis}
|
||||
BuildRequires: %{python_module requests}
|
||||
BuildRequires: %{python_module six}
|
||||
BuildRequires: %{python_module sure}
|
||||
BuildRequires: %{python_module urllib3}
|
||||
BuildRequires: %{python_module xxhash}
|
||||
BuildRequires: ca-certificates-mozilla
|
||||
BuildRequires: python3-aiohttp
|
||||
BuildRequires: python3-async_timeout
|
||||
# /SECTION
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
Socket Mock Framework - for all kinds of socket animals, web-clients
|
||||
included, with gevent/asyncio/SSL support.
|
||||
|
||||
%prep
|
||||
%setup -q -n python-mocket-%{version}
|
||||
%patch0 -p1
|
||||
|
||||
rm -f setup.cfg pytest.ini tox.ini
|
||||
|
||||
touch conftest.py
|
||||
|
||||
rm tests/tests27/test_pook.py
|
||||
|
||||
%build
|
||||
export LANG=en_US.UTF-8
|
||||
%python_build
|
||||
|
||||
%install
|
||||
export LANG=en_US.UTF-8
|
||||
%python_install
|
||||
%{python_expand rm -r %{buildroot}%{$python_sitelib}/tests
|
||||
%fdupes %{buildroot}%{$python_sitelib}
|
||||
}
|
||||
|
||||
%check
|
||||
export LANG=en_US.UTF-8
|
||||
export PYTHONPATH=${PWD}
|
||||
export SKIP_TRUE_HTTP=1
|
||||
%{python_expand #
|
||||
if [ $python = python2 ]; then
|
||||
$python -m pytest tests/main mocket tests/tests27/ -vv -k 'not RedisTestCase'
|
||||
else
|
||||
$python -m pytest tests/main mocket tests/tests27/ tests/tests35/ -vv -k 'not RedisTestCase'
|
||||
fi
|
||||
}
|
||||
|
||||
%files %{python_files}
|
||||
%doc README.rst
|
||||
%license LICENSE
|
||||
%{python_sitelib}/*
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user