Accepting request 678288 from devel:languages:python:pytest

OBS-URL: https://build.opensuse.org/request/show/678288
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest-localserver?expand=0&rev=2
This commit is contained in:
Stephan Kulow 2019-02-25 16:54:17 +00:00 committed by Git OBS Bridge
parent c6fb5d5cc6
commit 3ecf299095
6 changed files with 44 additions and 35 deletions

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a72af60a1ec8f73668a7884c86baf1fbe48394573cb4fa36709887217736c021
size 19901

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3a5427909d1dfda10772c1bae4b9803679c0a8f04adb66c338ac607773bfefc2
size 20409

View File

@ -1,12 +0,0 @@
--- a/pytest_localserver/https.py 2013-10-16 15:47:29.000000000 +0200
+++ b/pytest_localserver/https.py 2015-02-09 17:40:45.219146857 +0100
@@ -9,8 +9,7 @@
from pytest_localserver.http import ContentServer
#: default server certificate
-DEFAULT_CERTIFICATE = os.path.join(
- os.path.abspath(os.path.dirname(__file__)), 'server.pem')
+DEFAULT_CERTIFICATE = "/etc/ssl/ca-bundle.pem"
class SecureContentServer (ContentServer):

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Fri Feb 22 21:12:05 CET 2019 - Matej Cepl <mcepl@suse.com>
- Add remove_bindir.patch making test suite pass by removing
'/usr/bin' from sys.path.
-------------------------------------------------------------------
Wed Feb 20 12:11:06 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Drop the patch python-pytest-localserver-do-not-use-shipped-pem.patch
* We actually want the local pem as it is used just for the test
spawning where we validate against it
-------------------------------------------------------------------
Thu Feb 14 14:20:49 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 0.5.0:
* New feature: SMTP email message objects now include a ``details``
property capturing the envelope details.
-------------------------------------------------------------------
Thu Feb 22 22:29:48 UTC 2018 - mimi.vx@gmail.com

View File

@ -1,7 +1,7 @@
#
# spec file for package python-pytest-localserver
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2015 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
@ -13,28 +13,29 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-pytest-localserver
Version: 0.4.1
Version: 0.5.0
Release: 0
Summary: Plugin for py.test to test server connections locally
License: MIT
Group: Development/Languages/Python
Url: https://bitbucket.org/pytest-dev/pytest-localserver
URL: https://bitbucket.org/pytest-dev/pytest-localserver
Source: https://files.pythonhosted.org/packages/source/p/pytest-localserver/pytest-localserver-%{version}.tar.gz
Patch0: python-pytest-localserver-do-not-use-shipped-pem.patch
BuildRequires: %{python_module devel}
Patch0: remove_bindir.patch
BuildRequires: %{python_module Werkzeug >= 0.10}
BuildRequires: %{python_module pytest >= 2.0.0}
BuildRequires: %{python_module requests}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Werkzeug
Requires: python-pytest
Requires: python-Werkzeug >= 0.10
Requires: python-pytest >= 2.0.0
BuildArch: noarch
%python_subpackages
%description
@ -49,23 +50,17 @@ no further!
%prep
%setup -q -n pytest-localserver-%{version}
%patch0 -p1
rm -f pytest_localserver/server.pem.orig
%autopatch -p1
%build
%python_build
%install
%python_install
%{python_expand rm -f %{buildroot}%{$python_sitelib}/pytest_localserver/server.pem
chmod a+x %{buildroot}%{$python_sitelib}/pytest_localserver/smtp.py
chmod a+x %{buildroot}%{$python_sitelib}/pytest_localserver/plugin.py
sed -i "s|^#!/usr/bin/env python$|#!%__$python|" %{buildroot}%{$python_sitelib}/pytest_localserver/smtp.py
sed -i "s|^#!/usr/bin/env python$|#!%__$python|" %{buildroot}%{$python_sitelib}/pytest_localserver/plugin.py
$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/pytest_localserver/
$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/pytest_localserver/
%fdupes %{buildroot}%{$python_sitelib}
}
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_expand py.test-%{$python_bin_suffix} -v -s
%files %{python_files}
%doc README

6
remove_bindir.patch Normal file
View File

@ -0,0 +1,6 @@
--- /dev/null
+++ b/tests/__init__.py
@@ -0,0 +1,3 @@
+import sys
+if '/usr/bin' in sys.path:
+ del sys.path[sys.path.index('/usr/bin')]