14
0
Files
python-virtualenv/python-virtualenv.spec

147 lines
4.9 KiB
RPMSpec
Raw Normal View History

#
# spec file
#
# Copyright (c) 2023 SUSE LLC
#
# 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/
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
# there is no platformdirs for python2 on any of the target distributions
%define skip_python2 1
%{?sle15_python_module_pythons}
Name: python-virtualenv%{psuffix}
- Update to v20.24.5: - Fix brew cannot copy by @gaborbernat in #2640 - Test with 3.12 rc by @gaborbernat in #2641 - Upgrade setuptools by @gaborbernat in #2642 - GitHub Actions: Add PyPy 3.10 to testing by @cclauss in #2638 - 20.24.4: - Fix typo found by codespell by @DimitriPapadopoulos in #2624 - Updating extend.rst typo by @sagardesai1 in #2626 - 20.24.3: - Update compatibility docs by @jugmac00 in #2618 - fix ResourceWarning on process exit (#2472) by @sigma67 in #2617 - added scripts in tasks directory to sdist on build (#2610) by @sigma67 in #2620 - Bump wheel by @gaborbernat in #2622 - 20.24.2: - Bump pip and wheel by @gaborbernat in #2614 - 20.24.1: - Upgrade pip by @arielkirkwood in #2611 - 20.24.0: - Fix the CI by @gaborbernat in #2593 - Quickstart guide by @AlvesJorge in #2599 - Updated CLI documentation with config file name by @nathanczh in #2602 - Exclude dependabot and pre-commit ci from release notes by @gaborbernat in #2603 - Export VIRTUAL_ENV_PROMPT in activation scripts (#2194) by @jimporter in #2606 - Upgrade setuptools by @gaborbernat in #2607 - 20.23.1: - Bump pypa/gh-action-pypi-publish from 1.8.5 to 1.8.6 by @dependabot in #2566 - feat: ✨ update and simplify nushell activation by @melMass in #2572 - Fix deprecation warning by @jugmac00 in #2575 - Replace unmaintained pytest-freezegun by @jugmac00 in #2576 - Update cli_interface.rst by @uberFoo in #2586 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenv?expand=0&rev=137
2023-10-03 06:46:26 +00:00
Version: 20.24.5
Release: 0
Summary: Virtual Python Environment builder
License: MIT
URL: http://www.virtualenv.org/
Source: https://files.pythonhosted.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
# PATCH-FIX-OPENSUSE fix-tests-hookimpls.patch
Patch1: fix-tests-hookimpls.patch
- Update to v20.24.5: - Fix brew cannot copy by @gaborbernat in #2640 - Test with 3.12 rc by @gaborbernat in #2641 - Upgrade setuptools by @gaborbernat in #2642 - GitHub Actions: Add PyPy 3.10 to testing by @cclauss in #2638 - 20.24.4: - Fix typo found by codespell by @DimitriPapadopoulos in #2624 - Updating extend.rst typo by @sagardesai1 in #2626 - 20.24.3: - Update compatibility docs by @jugmac00 in #2618 - fix ResourceWarning on process exit (#2472) by @sigma67 in #2617 - added scripts in tasks directory to sdist on build (#2610) by @sigma67 in #2620 - Bump wheel by @gaborbernat in #2622 - 20.24.2: - Bump pip and wheel by @gaborbernat in #2614 - 20.24.1: - Upgrade pip by @arielkirkwood in #2611 - 20.24.0: - Fix the CI by @gaborbernat in #2593 - Quickstart guide by @AlvesJorge in #2599 - Updated CLI documentation with config file name by @nathanczh in #2602 - Exclude dependabot and pre-commit ci from release notes by @gaborbernat in #2603 - Export VIRTUAL_ENV_PROMPT in activation scripts (#2194) by @jimporter in #2606 - Upgrade setuptools by @gaborbernat in #2607 - 20.23.1: - Bump pypa/gh-action-pypi-publish from 1.8.5 to 1.8.6 by @dependabot in #2566 - feat: ✨ update and simplify nushell activation by @melMass in #2572 - Fix deprecation warning by @jugmac00 in #2575 - Replace unmaintained pytest-freezegun by @jugmac00 in #2576 - Update cli_interface.rst by @uberFoo in #2586 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenv?expand=0&rev=137
2023-10-03 06:46:26 +00:00
BuildRequires: %{python_module distlib >= 0.3.7}
BuildRequires: %{python_module filelock >= 3.12.2}
BuildRequires: %{python_module hatch-vcs >= 0.3}
BuildRequires: %{python_module hatchling >= 1.14}
- Update to v20.24.5: - Fix brew cannot copy by @gaborbernat in #2640 - Test with 3.12 rc by @gaborbernat in #2641 - Upgrade setuptools by @gaborbernat in #2642 - GitHub Actions: Add PyPy 3.10 to testing by @cclauss in #2638 - 20.24.4: - Fix typo found by codespell by @DimitriPapadopoulos in #2624 - Updating extend.rst typo by @sagardesai1 in #2626 - 20.24.3: - Update compatibility docs by @jugmac00 in #2618 - fix ResourceWarning on process exit (#2472) by @sigma67 in #2617 - added scripts in tasks directory to sdist on build (#2610) by @sigma67 in #2620 - Bump wheel by @gaborbernat in #2622 - 20.24.2: - Bump pip and wheel by @gaborbernat in #2614 - 20.24.1: - Upgrade pip by @arielkirkwood in #2611 - 20.24.0: - Fix the CI by @gaborbernat in #2593 - Quickstart guide by @AlvesJorge in #2599 - Updated CLI documentation with config file name by @nathanczh in #2602 - Exclude dependabot and pre-commit ci from release notes by @gaborbernat in #2603 - Export VIRTUAL_ENV_PROMPT in activation scripts (#2194) by @jimporter in #2606 - Upgrade setuptools by @gaborbernat in #2607 - 20.23.1: - Bump pypa/gh-action-pypi-publish from 1.8.5 to 1.8.6 by @dependabot in #2566 - feat: ✨ update and simplify nushell activation by @melMass in #2572 - Fix deprecation warning by @jugmac00 in #2575 - Replace unmaintained pytest-freezegun by @jugmac00 in #2576 - Update cli_interface.rst by @uberFoo in #2586 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenv?expand=0&rev=137
2023-10-03 06:46:26 +00:00
BuildRequires: %{python_module importlib-metadata >= 6.6 if %python-base < 3.8}
BuildRequires: %{python_module importlib_resources >= 1.0 if %python-base < 3.7}
BuildRequires: %{python_module pip}
- Update to v20.24.5: - Fix brew cannot copy by @gaborbernat in #2640 - Test with 3.12 rc by @gaborbernat in #2641 - Upgrade setuptools by @gaborbernat in #2642 - GitHub Actions: Add PyPy 3.10 to testing by @cclauss in #2638 - 20.24.4: - Fix typo found by codespell by @DimitriPapadopoulos in #2624 - Updating extend.rst typo by @sagardesai1 in #2626 - 20.24.3: - Update compatibility docs by @jugmac00 in #2618 - fix ResourceWarning on process exit (#2472) by @sigma67 in #2617 - added scripts in tasks directory to sdist on build (#2610) by @sigma67 in #2620 - Bump wheel by @gaborbernat in #2622 - 20.24.2: - Bump pip and wheel by @gaborbernat in #2614 - 20.24.1: - Upgrade pip by @arielkirkwood in #2611 - 20.24.0: - Fix the CI by @gaborbernat in #2593 - Quickstart guide by @AlvesJorge in #2599 - Updated CLI documentation with config file name by @nathanczh in #2602 - Exclude dependabot and pre-commit ci from release notes by @gaborbernat in #2603 - Export VIRTUAL_ENV_PROMPT in activation scripts (#2194) by @jimporter in #2606 - Upgrade setuptools by @gaborbernat in #2607 - 20.23.1: - Bump pypa/gh-action-pypi-publish from 1.8.5 to 1.8.6 by @dependabot in #2566 - feat: ✨ update and simplify nushell activation by @melMass in #2572 - Fix deprecation warning by @jugmac00 in #2575 - Replace unmaintained pytest-freezegun by @jugmac00 in #2576 - Update cli_interface.rst by @uberFoo in #2586 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenv?expand=0&rev=137
2023-10-03 06:46:26 +00:00
BuildRequires: %{python_module platformdirs}
BuildRequires: %{python_module setuptools >= 41.0.0}
BuildRequires: %{python_module wheel}
- Update to 16.7.5: * fix powershell activation when sourced (#1398) * fix regression - sh activation script not working under sh (only bash) (#1396) * activate.ps1 syntax and style updated to follow PSStyleAnalyzer rules (#1371) * Allow creating virtual environments for 3.xy. (#1385) * Report error when running activate scripts directly * Extend the LICENSE search paths list by lib64/pythonX.Y to support Linux vendors who install their Python to /usr/lib64/pythonX.Y * Raise an error if the target path contains the operating systems path separator (using this would break our activation scripts) * Drop Jython support * Add tests covering prompt manipulation during activation/deactivation, and harmonize behavior of all supported shells - Update to 16.4.3: * Revert the symlink fix, causing debian packaging issues. (#1390) * Fix license() builtin by copying the LICENSE file into the virtualenv - by asottile. (#1317) * fixes the scenario where the python base install is symlinked with relative symlinks (#490) * Use importlib over imp in virtualenv.py for python >= 3.4 - by Anthony Sottile (#1293) * Copy or link PyPy header files instead of include directory itself (#1302) * Allow virtualenv creation with older pip not having config command correspondingly disabling configuration related features (such as pip cert setting) in this case. (#1303) * Use importlib over deprecated imp` in ``distutils/__init__.py for python 3 - by Anthony Sottile (#955) * Preserve cert option defined in pip.conf or environment variable. (#1273) * fixed a ResourceWarning: unclosed file in call_subprocess() - by Mickaël Schoentgen (#1277) * pre-import some built-in modules in site.py on PyPy according to PyPy's site.py - by microdog (#1281) * Copy files from sys.exec_prefix only if it is really different path than used prefix, bugfix for #1270 (#1282) * copyfile handles relative symlinks and symlinks to symlinks, avoiding problems when Python was installed using stow or homebrew. (#268) * Fix preserving of original path when using fish and a subshell. (#904) * Drop the source layout of the project, going back to how the source was laid out before 16.1.0. (#1241) * Fix bootstrap script generation broken with 16.0.0. Support now both CPython, pypy, jython. (#1244) * lib64 symlink is again relative (as was with < 16.1.0). (#1248) OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenv?expand=0&rev=70
2019-09-16 10:44:26 +00:00
BuildRequires: fdupes
BuildRequires: python-rpm-macros
- Update to v20.24.5: - Fix brew cannot copy by @gaborbernat in #2640 - Test with 3.12 rc by @gaborbernat in #2641 - Upgrade setuptools by @gaborbernat in #2642 - GitHub Actions: Add PyPy 3.10 to testing by @cclauss in #2638 - 20.24.4: - Fix typo found by codespell by @DimitriPapadopoulos in #2624 - Updating extend.rst typo by @sagardesai1 in #2626 - 20.24.3: - Update compatibility docs by @jugmac00 in #2618 - fix ResourceWarning on process exit (#2472) by @sigma67 in #2617 - added scripts in tasks directory to sdist on build (#2610) by @sigma67 in #2620 - Bump wheel by @gaborbernat in #2622 - 20.24.2: - Bump pip and wheel by @gaborbernat in #2614 - 20.24.1: - Upgrade pip by @arielkirkwood in #2611 - 20.24.0: - Fix the CI by @gaborbernat in #2593 - Quickstart guide by @AlvesJorge in #2599 - Updated CLI documentation with config file name by @nathanczh in #2602 - Exclude dependabot and pre-commit ci from release notes by @gaborbernat in #2603 - Export VIRTUAL_ENV_PROMPT in activation scripts (#2194) by @jimporter in #2606 - Upgrade setuptools by @gaborbernat in #2607 - 20.23.1: - Bump pypa/gh-action-pypi-publish from 1.8.5 to 1.8.6 by @dependabot in #2566 - feat: ✨ update and simplify nushell activation by @melMass in #2572 - Fix deprecation warning by @jugmac00 in #2575 - Replace unmaintained pytest-freezegun by @jugmac00 in #2576 - Update cli_interface.rst by @uberFoo in #2586 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-virtualenv?expand=0&rev=137
2023-10-03 06:46:26 +00:00
Requires: python-distlib >= 0.3.7
Requires: python-filelock >= 3.12.2
Requires: python-platformdirs
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
%if 0%{python_version_nodots} < 38
Requires: python-importlib-metadata >= 6.4.1
%endif
%if 0%{python_version_nodots} < 37
Requires: python-importlib_resources >= 1.0
%endif
%if %{with test}
BuildRequires: %{python_module devel}
BuildRequires: %{python_module flaky >= 3}
BuildRequires: %{python_module packaging >= 20.0}
BuildRequires: %{python_module pytest >= 4.0.0}
BuildRequires: %{python_module pytest-env >= 0.6.2}
# note: is unmaintained, was upstream-replaced by pytest-freezer, which we don't have in the distribution yet
# but they both contain the needed fixture, so this is OK until pytest-freezegun dies for good
BuildRequires: %{python_module pytest-freezegun >= 0.4.1}
BuildRequires: %{python_module pytest-mock >= 2.0.0}
BuildRequires: %{python_module pytest-timeout >= 1.3.4}
BuildRequires: %{python_module time-machine}
BuildRequires: ca-certificates
%endif
%python_subpackages
%description
virtualenv is a tool to create isolated Python environments.
The basic problem being addressed is one of dependencies and versions, and
indirectly permissions. Imagine you have an application that needs version 1
of LibFoo, but another application requires version 2.
Or more generally, what if you want to install an application and leave it be?
If an application works, any change in its libraries or the versions of those
libraries can break the application.
Also, what if you cant install packages into the global site-packages
directory? For instance, on a shared host.
In all these cases, virtualenv can help you. It creates an environment that
has its own installation directories, that doesnt share libraries with other
virtualenv environments (and optionally doesnt use the globally installed
libraries either).
%prep
%autosetup -p1 -n virtualenv-%{version}
# Dependencies on all those shells are too cumbersome.
rm -r tests/unit/activation
%build
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
rm %{buildroot}%{_bindir}/virtualenv
%else
%python_clone -a %{buildroot}%{_bindir}/virtualenv
%endif
%check
%if %{with test}
export LANG="en_US.UTF8"
export PIP_CERT="%{_sysconfdir}/ssl/ca-bundle.pem"
export PYTHONPATH=$PWD/src
# online tests downloads from pypi
donttest="test_seed_link_via_app_data"
# gh#pypa/virtualenv!2431
donttest+=" or test_py_pyc_missing"
%pytest -k "not ($donttest)"
# Uninstall everything to avoid errors of files not being packaged
%python_expand rm -r %{buildroot}%{$python_sitelib}
%endif
%if !%{with test}
%post
%python_install_alternative virtualenv
%postun
%python_uninstall_alternative virtualenv
%files %{python_files}
%license LICENSE
%doc README.md
%{python_sitelib}/virtualenv
%{python_sitelib}/virtualenv-%{version}*-info
%python_alternative %{_bindir}/virtualenv
%endif
%changelog