Compare commits
No commits in common. "3beba616872fd6051968b0bddfb09bf9e0b38dc4" and "8d73e9c1df562e9aac6f51951d80b57ad2014d63" have entirely different histories.
3beba61687
...
8d73e9c1df
39
91.patch
39
91.patch
@ -1,39 +0,0 @@
|
|||||||
From 6bfb0f17a033c485948e09e6c18bc08f5948830c Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
|
||||||
Date: Thu, 23 Aug 2018 21:19:50 +0200
|
|
||||||
Subject: [PATCH] Instead of using the virtualenv command, use -m virtualenv
|
|
||||||
|
|
||||||
Fixes https://github.com/manahl/pytest-plugins/issues/79
|
|
||||||
---
|
|
||||||
pytest-virtualenv/pytest_virtualenv.py | 11 +++++++----
|
|
||||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/pytest-virtualenv/pytest_virtualenv.py b/pytest-virtualenv/pytest_virtualenv.py
|
|
||||||
index a7981b3..e54039c 100644
|
|
||||||
--- a/pytest-virtualenv/pytest_virtualenv.py
|
|
||||||
+++ b/pytest-virtualenv/pytest_virtualenv.py
|
|
||||||
@@ -20,7 +20,8 @@ class FixtureConfig(Config):
|
|
||||||
__slots__ = ('virtualenv_executable')
|
|
||||||
|
|
||||||
# Default values for system resource locations - patch this to change defaults
|
|
||||||
-DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE = (cmdline.which('virtualenv') + ['virtualenv'])[0]
|
|
||||||
+# Can be a string or list of them
|
|
||||||
+DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE = [sys.executable, '-m', 'virtualenv']
|
|
||||||
|
|
||||||
CONFIG = FixtureConfig(
|
|
||||||
virtualenv_executable=os.getenv('VIRTUALENV_FIXTURE_EXECUTABLE', DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE),
|
|
||||||
@@ -132,9 +133,11 @@ def __init__(self, env=None, workspace=None, name='.env', python=None, args=None
|
|
||||||
del(self.env['PYTHONPATH'])
|
|
||||||
|
|
||||||
self.virtualenv_cmd = CONFIG.virtualenv_executable
|
|
||||||
- cmd = [self.virtualenv_cmd,
|
|
||||||
- '-p', python or cmdline.get_real_python_executable()
|
|
||||||
- ]
|
|
||||||
+ if isinstance(self.virtualenv_cmd, str):
|
|
||||||
+ cmd = [self.virtualenv_cmd]
|
|
||||||
+ else:
|
|
||||||
+ cmd = list(self.virtualenv_cmd)
|
|
||||||
+ cmd.extend(['-p', python or cmdline.get_real_python_executable()])
|
|
||||||
cmd.extend(self.args)
|
|
||||||
cmd.append(str(self.virtualenv))
|
|
||||||
self.run(cmd)
|
|
||||||
Binary file not shown.
@ -1,60 +0,0 @@
|
|||||||
%global with_tests 0%{?_with_tests:1}
|
|
||||||
Name: python-pytest-virtualenv
|
|
||||||
Version: 1.2.11
|
|
||||||
Release: 12
|
|
||||||
Summary: Virtualenv fixture for py.test
|
|
||||||
License: MIT
|
|
||||||
URL: https://pypi.python.org/pypi/pytest-virtualenv
|
|
||||||
Source0: https://files.pythonhosted.org/packages/source/p/pytest-virtualenv/pytest-virtualenv-1.2.11.tar.gz
|
|
||||||
BuildArch: noarch
|
|
||||||
BuildRequires: python3-devel python3-pytest
|
|
||||||
BuildRequires: python3-six python3-setuptools_git
|
|
||||||
%if %{with_tests}
|
|
||||||
BuildRequires: python3-pytest-shutil
|
|
||||||
BuildRequires: python3-pytest-fixture-config python3-path
|
|
||||||
BuildRequires: python3-execnet python3-mock
|
|
||||||
BuildRequires: python3-contextlib2 python3-virtualenv
|
|
||||||
%endif
|
|
||||||
Patch0: 91.patch
|
|
||||||
|
|
||||||
%description
|
|
||||||
Create a Python virtual environment in your test that cleans up on teardown.
|
|
||||||
The fixture has utility methods to install packages and list what's installed.
|
|
||||||
|
|
||||||
%package -n python3-pytest-virtualenv
|
|
||||||
Summary: Virtualenv fixture for py.test
|
|
||||||
%python_provide python3-pytest-virtualenv
|
|
||||||
Requires: python3-pytest python3-pytest-shutil python3-pytest-fixture-config
|
|
||||||
Requires: python3-path python3-execnet python3-contextlib2 python3-virtualenv
|
|
||||||
|
|
||||||
%description -n python3-pytest-virtualenv
|
|
||||||
Create a Python virtual environment in your test that cleans up on teardown.
|
|
||||||
The fixture has utility methods to install packages and list what's installed.
|
|
||||||
|
|
||||||
%prep
|
|
||||||
%autosetup -n pytest-virtualenv-%{version}
|
|
||||||
|
|
||||||
%build
|
|
||||||
%py3_build
|
|
||||||
|
|
||||||
%install
|
|
||||||
%py3_install
|
|
||||||
|
|
||||||
%if %{with_tests}
|
|
||||||
%check
|
|
||||||
%{__python3} setup.py test
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files -n python3-pytest-virtualenv
|
|
||||||
%doc README.md CHANGES.md
|
|
||||||
%{python3_sitelib}/*
|
|
||||||
|
|
||||||
%changelog
|
|
||||||
* Fri Sep 11 2020 wangyue<wangyue92@huawei.com> - 1.2.11-12
|
|
||||||
- Remove python2-pytest-virtualenv
|
|
||||||
|
|
||||||
* Mon Jan 13 2020 Senlin Xia<xiasenlin1@huawei.com> - 1.2.11-11
|
|
||||||
- Modify %prep
|
|
||||||
|
|
||||||
* Wed Jan 08 2020 gulining<gulining@huawei.com> - 1.2.11-10
|
|
||||||
- Pakcage init
|
|
||||||
@ -1,4 +0,0 @@
|
|||||||
version_control: pypi
|
|
||||||
src_repo: pytest-virtualenv
|
|
||||||
tag_prefix: "^v"
|
|
||||||
seperator: "."
|
|
||||||
Loading…
x
Reference in New Issue
Block a user