Compare commits

...

11 Commits

Author SHA1 Message Date
openeuler-ci-bot
3beba61687
!9 [sync] PR-8: 【轻量级PR】:Fix bad date in changelog
From: @openeuler-sync-bot 
Reviewed-by: @overweight 
Signed-off-by: @overweight
2022-06-10 01:17:22 +00:00
peijiankang
a53f117adc Fix bad date in changelog
(cherry picked from commit e1dc0aac3eb908812c3062630338a93ad5dce2c3)
2022-06-10 09:16:33 +08:00
openeuler-ci-bot
0217239319 !5 Remove python2-pytest-virtualenv
From: @wang_yue111
Reviewed-by: @xiezhipeng1
Signed-off-by: @xiezhipeng1
2020-09-11 21:57:05 +08:00
wang_yue111
bc72e3d89f Remove python2-pytest-virtualenv 2020-09-11 16:15:46 +08:00
openeuler-ci-bot
84ec3e33d8 !3 add yaml
Merge pull request !3 from cuibb1/master
2020-05-13 19:08:05 +08:00
root
bfb03641ab yaml 2020-05-11 16:27:17 +08:00
openeuler-ci-bot
9bd43b6d9b !2 modify spec file
Merge pull request !2 from small_leek/xsl_python-pytest-virtualenv
2020-01-13 17:13:44 +08:00
small_leek
dde073ec04 modify spec 2020-01-13 03:48:16 -05:00
small_leek
5e2b82dc90 modify spec 2020-01-13 03:46:07 -05:00
openeuler-ci-bot
25e7bb2166 !1 openEuler init
Merge pull request !1 from gu-gu-gu/gu
2020-01-10 10:10:07 +08:00
gu-gu-gu
022eaffa42 package init 2020-01-10 10:04:54 +08:00
4 changed files with 103 additions and 0 deletions

39
91.patch Normal file
View File

@ -0,0 +1,39 @@
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.

View File

@ -0,0 +1,60 @@
%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

View File

@ -0,0 +1,4 @@
version_control: pypi
src_repo: pytest-virtualenv
tag_prefix: "^v"
seperator: "."