2019-09-20 09:59:50 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-pytest-server-fixtures
|
|
|
|
|
#
|
2022-03-21 04:29:52 +00:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2019-09-20 09:59:50 +00:00
|
|
|
#
|
|
|
|
|
# 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-%{**}}
|
2022-04-22 05:17:06 +00:00
|
|
|
%bcond_without python2
|
2019-09-20 09:59:50 +00:00
|
|
|
Name: python-pytest-server-fixtures
|
|
|
|
|
Version: 1.7.0
|
|
|
|
|
Release: 0
|
2022-04-22 05:17:06 +00:00
|
|
|
Summary: Extensible server fixtures for pytest
|
2019-09-20 09:59:50 +00:00
|
|
|
License: MIT
|
|
|
|
|
Group: Development/Languages/Python
|
2021-10-19 17:15:13 +00:00
|
|
|
URL: https://github.com/man-group/pytest-plugins
|
2019-09-20 09:59:50 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pytest-server-fixtures/pytest-server-fixtures-%{version}.tar.gz
|
2021-10-19 17:15:13 +00:00
|
|
|
# PATCH-FIX-UPSTREAM pytest-plugins-pr186-fix-psycopg29.patch -- gh#man-group/pytest-plugins#186
|
|
|
|
|
Patch0: https://github.com/man-group/pytest-plugins/pull/186.patch#/pytest-plugins-pr186-fix-psycopg29.patch
|
2022-04-22 05:17:06 +00:00
|
|
|
# PATCH-FEATURE-UPSTREAM remove-mock.patch -- gh#man-group#pytest-plugins#171
|
|
|
|
|
Patch1: remove-mock.patch
|
2019-09-20 09:59:50 +00:00
|
|
|
BuildRequires: %{python_module setuptools-git}
|
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
|
BuildRequires: redis
|
|
|
|
|
# net-tools-deprecated's netstat and lsof needed internally
|
|
|
|
|
Requires: lsof
|
|
|
|
|
Requires: net-tools-deprecated
|
|
|
|
|
Requires: python-future
|
|
|
|
|
Requires: python-psutil
|
2020-05-29 09:59:02 +00:00
|
|
|
Requires: python-pytest
|
2019-09-20 09:59:50 +00:00
|
|
|
Requires: python-pytest-fixture-config
|
|
|
|
|
Requires: python-pytest-shutil
|
|
|
|
|
Requires: python-requests
|
|
|
|
|
Requires: python-retry
|
|
|
|
|
Requires: python-six
|
|
|
|
|
Suggests: apache2
|
|
|
|
|
Suggests: postgresql-server-devel
|
|
|
|
|
Suggests: python-boto3
|
|
|
|
|
Suggests: python-docker
|
|
|
|
|
Suggests: python-kubernetes
|
|
|
|
|
Suggests: python-psycopg2
|
|
|
|
|
Suggests: python-pymongo >= 3.6.0
|
|
|
|
|
Suggests: python-python-jenkins
|
|
|
|
|
Suggests: python-redis
|
|
|
|
|
Suggests: python-rethinkdb
|
|
|
|
|
Suggests: redis
|
|
|
|
|
Suggests: xauth
|
|
|
|
|
Suggests: xdpyinfo
|
|
|
|
|
Suggests: xorg-x11-server
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
# SECTION test requirements
|
|
|
|
|
BuildRequires: %{python_module boto3}
|
|
|
|
|
BuildRequires: %{python_module docker}
|
|
|
|
|
BuildRequires: %{python_module future}
|
|
|
|
|
BuildRequires: %{python_module kubernetes}
|
|
|
|
|
BuildRequires: %{python_module psutil}
|
|
|
|
|
BuildRequires: %{python_module psycopg2}
|
|
|
|
|
BuildRequires: %{python_module pymongo >= 3.6.0}
|
|
|
|
|
BuildRequires: %{python_module pytest-fixture-config}
|
|
|
|
|
BuildRequires: %{python_module pytest-shutil}
|
2020-05-29 09:59:02 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2019-09-20 09:59:50 +00:00
|
|
|
BuildRequires: %{python_module python-jenkins}
|
|
|
|
|
BuildRequires: %{python_module redis}
|
|
|
|
|
BuildRequires: %{python_module requests}
|
|
|
|
|
BuildRequires: %{python_module rethinkdb}
|
|
|
|
|
BuildRequires: %{python_module retry}
|
|
|
|
|
BuildRequires: %{python_module six}
|
2022-04-22 05:17:06 +00:00
|
|
|
%if %{with python2}
|
|
|
|
|
BuildRequires: python2-mock
|
|
|
|
|
%endif
|
2019-09-20 09:59:50 +00:00
|
|
|
BuildRequires: apache2
|
|
|
|
|
BuildRequires: lsof
|
|
|
|
|
BuildRequires: net-tools-deprecated
|
|
|
|
|
BuildRequires: postgresql-server-devel
|
|
|
|
|
BuildRequires: redis
|
|
|
|
|
BuildRequires: xauth
|
|
|
|
|
BuildRequires: xdpyinfo
|
|
|
|
|
BuildRequires: xorg-x11-server
|
|
|
|
|
# /SECTION
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
2022-04-22 05:17:06 +00:00
|
|
|
Extensible server fixtures for pytest
|
2019-09-20 09:59:50 +00:00
|
|
|
|
|
|
|
|
%prep
|
2021-10-19 17:15:13 +00:00
|
|
|
%autosetup -p2 -n pytest-server-fixtures-%{version}
|
2019-09-20 09:59:50 +00:00
|
|
|
|
|
|
|
|
# Tests requiring a server
|
|
|
|
|
rm tests/integration/test_mongo_server.py
|
|
|
|
|
rm tests/integration/test_jenkins_server.py
|
|
|
|
|
rm tests/integration/test_rethink_server.py
|
|
|
|
|
rm tests/integration/test_s3_server.py
|
|
|
|
|
rm tests/unit/serverclass/test_kubernetes_unit.py
|
|
|
|
|
|
|
|
|
|
# openSUSE apache2 has the mpm compiled in
|
|
|
|
|
sed -i '/mod_mpm_prefork.so/d' pytest_server_fixtures/httpd.py
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%python_install
|
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
export PATH=$HOME/bin:$PATH:%{_sbindir}
|
|
|
|
|
export SERVER_FIXTURES_HTTPD_MODULES=%{_libdir}/apache2/
|
|
|
|
|
export SERVER_FIXTURES_HTTPD=httpd
|
|
|
|
|
export SERVER_FIXTURES_REDIS=%{_sbindir}/redis-server
|
2021-05-01 10:31:56 +00:00
|
|
|
# gh#man-group/pytest-plugins#177
|
|
|
|
|
%pytest -k 'not test_init'
|
2019-09-20 09:59:50 +00:00
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
|
%doc CHANGES.md README.md
|
|
|
|
|
%license LICENSE
|
2022-04-22 05:17:06 +00:00
|
|
|
%{python_sitelib}/pytest_server_fixtures
|
|
|
|
|
%{python_sitelib}/pytest_server_fixtures-%{version}*-info
|
2019-09-20 09:59:50 +00:00
|
|
|
|
|
|
|
|
%changelog
|