python-pytest-virtualenv/remove_virtualenv.patch
Steve Kowalik 87e5409d47 - Update to 1.8.0:
* Drop support for Python 2 and <3.6, removing compatibility code.
  * Use stdlib unittest.mock instead of mock package.
  * Removed usage of path.py and path in favour of pathlib.
  * Modernised package.
  * Added delete_workspace parameter to VirtualEnv.
  * Removed extras_require.
- Switch to pyproject macros.
- No more greedy globs in %files.
- Removed patches, included upstream:
  * remove_mock.patch
- Refreshed remove_virtualenv.patch
- Do not test with Python 3.12 and above due to an upstream bug.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-virtualenv?expand=0&rev=14
2024-10-22 06:11:40 +00:00

43 lines
1.7 KiB
Diff

Index: pytest-virtualenv-1.8.0/pytest_virtualenv.py
===================================================================
--- pytest-virtualenv-1.8.0.orig/pytest_virtualenv.py
+++ pytest-virtualenv-1.8.0/pytest_virtualenv.py
@@ -25,7 +25,7 @@ class FixtureConfig(Config):
# Default values for system resource locations - patch this to change defaults
# Can be a string or list of them
-DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE = [sys.executable, '-m', 'virtualenv']
+DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE = [sys.executable, '-m', 'venv']
CONFIG = FixtureConfig(
virtualenv_executable=os.getenv('VIRTUALENV_FIXTURE_EXECUTABLE', DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE),
@@ -82,7 +82,7 @@ class PackageEntry(object):
def match(self, package_type):
if package_type is self.ANY:
- return True
+ return True
elif package_type is self.REL:
if self.isrel:
return True
@@ -146,7 +146,6 @@ class VirtualEnv(Workspace):
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)
Index: pytest-virtualenv-1.8.0/setup.py
===================================================================
--- pytest-virtualenv-1.8.0.orig/setup.py
+++ pytest-virtualenv-1.8.0/setup.py
@@ -21,7 +21,6 @@ classifiers = [
install_requires = ['pytest-fixture-config',
'pytest-shutil',
'pytest',
- 'virtualenv',
'importlib-metadata',
]