From 51543707cc152144b0eaf9d0e91c6147deb27a68 Mon Sep 17 00:00:00 2001 From: Wong Hoi Sing Edison Date: Wed, 15 Nov 2023 21:54:36 +0800 Subject: [PATCH] alvistack/20.24.6 git clean -xdf tar zcvf ../python-virtualenv_20.24.6.orig.tar.gz --exclude=.git . debuild -uc -us cp python-virtualenv.spec ../python-virtualenv_20.24.6-1.spec mv ../python*-virtualenv*20.24.6*.{gz,xz,spec,dsc} /osc/home\:alvistack/pypa-virtualenv-20.24.6/ rm -rf ../*virtualenv*20.24.6*.* See https://github.com/pypa/virtualenv/pull/2664 Signed-off-by: Wong Hoi Sing Edison --- .gitignore | 3 +- debian/.gitignore | 7 + debian/changelog | 5 + debian/control | 38 +++++ debian/copyright | 21 +++ debian/python3-virtualenv.install | 2 + debian/python3-virtualenv.lintian-overrides | 4 + debian/rules | 15 ++ debian/source/format | 1 + debian/source/lintian-overrides | 4 + pyproject.toml | 162 -------------------- python-virtualenv.spec | 102 ++++++++++++ setup.py | 123 +++++++++++++++ src/virtualenv/version.py | 4 + 14 files changed, 328 insertions(+), 163 deletions(-) create mode 100644 debian/.gitignore create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/python3-virtualenv.install create mode 100644 debian/python3-virtualenv.lintian-overrides create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/source/lintian-overrides delete mode 100644 pyproject.toml create mode 100644 python-virtualenv.spec create mode 100644 setup.py create mode 100644 src/virtualenv/version.py diff --git a/.gitignore b/.gitignore index b799ed285..9fdb30b90 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,6 @@ dist /docs/_draft.rst /pip-wheel-metadata -/src/virtualenv/version.py /src/virtualenv/out .python-version @@ -28,3 +27,5 @@ dist Dockerfile* .dockerignore + +.pybuild/ diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 000000000..89b12ccd5 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,7 @@ +*.substvars +*debhelper* +.debhelper +files +tmp +python3-virtualenv +virtualenv diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..945f52764 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +python-virtualenv (100:20.24.6-1) UNRELEASED; urgency=medium + + * https://github.com/pypa/virtualenv/releases/tag/20.24.6 + + -- Wong Hoi Sing Edison Tue, 24 Oct 2023 15:34:52 +0800 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..c10bda93c --- /dev/null +++ b/debian/control @@ -0,0 +1,38 @@ +Source: python-virtualenv +Section: python +Priority: optional +Standards-Version: 4.5.0 +Maintainer: Wong Hoi Sing Edison +Homepage: https://github.com/pypa/virtualenv/tags +Vcs-Browser: https://github.com/alvistack/pypa-virtualenv +Vcs-Git: https://github.com/alvistack/pypa-virtualenv.git +Build-Depends: + debhelper, + debhelper-compat (= 10), + dh-python, + fdupes, + python3-dev, + python3-setuptools (>= 59.6), + +Package: python3-virtualenv +Architecture: all +Description: Tool to create isolated Python environments + virtualenv is a tool to create isolated Python environments. virtualenv + is a successor to workingenv, and an extension of virtual-python. It is + written by Ian Bicking, and sponsored by the Open Planning Project. +Depends: + ${misc:Depends}, + ${shlibs:Depends}, + ${python3:Depends}, + python3, + python3-distlib (>= 0.3.7), + python3-filelock (>= 3.12.2), + python3-importlib-metadata (>= 6.6), + python3-platformdirs (>= 3.9.1), + +Package: virtualenv +Architecture: all +Depends: python3-virtualenv +Section: oldlibs +Description: Python virtual environment creator (Dependency package) + This is a dependency package and may be safely removed. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..dcb9a2448 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,21 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: debian/* +Copyright: 2023 Wong Hoi Sing Edison +License: Apache-2.0 + +License: Apache-2.0 + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + . + http://www.apache.org/licenses/LICENSE-2.0 + . + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + . + The complete text of the Apache version 2.0 license + can be found in "/usr/share/common-licenses/Apache-2.0". diff --git a/debian/python3-virtualenv.install b/debian/python3-virtualenv.install new file mode 100644 index 000000000..c529f0734 --- /dev/null +++ b/debian/python3-virtualenv.install @@ -0,0 +1,2 @@ +usr/bin/* +usr/lib/python*/*-packages/* diff --git a/debian/python3-virtualenv.lintian-overrides b/debian/python3-virtualenv.lintian-overrides new file mode 100644 index 000000000..8ef34baaa --- /dev/null +++ b/debian/python3-virtualenv.lintian-overrides @@ -0,0 +1,4 @@ +python3-virtualenv: copyright-without-copyright-notice +python3-virtualenv: initial-upload-closes-no-bugs +python3-virtualenv: no-manual-page +python3-virtualenv: zero-byte-file-in-doc-directory diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..fcaa45efe --- /dev/null +++ b/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +SHELL := /bin/bash + +override_dh_auto_install: + dh_auto_install --destdir=debian/tmp + find debian/tmp/usr/lib/python*/*-packages -type f -name '*.pyc' -exec rm -rf {} \; + fdupes -qnrps debian/tmp/usr/lib/python*/*-packages + +override_dh_auto_test: + +override_dh_auto_clean: + +%: + dh $@ --buildsystem=pybuild --with python3 diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides new file mode 100644 index 000000000..7af1e5f90 --- /dev/null +++ b/debian/source/lintian-overrides @@ -0,0 +1,4 @@ +python-virtualenv source: file-without-copyright-information +python-virtualenv source: no-debian-changes +python-virtualenv source: source-contains-prebuilt-windows-binary +python-virtualenv source: source-package-encodes-python-version diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 6efae4f9c..000000000 --- a/pyproject.toml +++ /dev/null @@ -1,162 +0,0 @@ -[build-system] -build-backend = "hatchling.build" -requires = [ - "hatch-vcs>=0.3", - "hatchling>=1.17.1", -] - -[project] -name = "virtualenv" -description = "Virtual Python Environment builder" -readme = "README.md" -keywords = [ - "environments", - "isolated", - "virtual", -] -license = "MIT" -maintainers = [{ name = "Bernat Gabor", email = "gaborjbernat@gmail.com" }] -requires-python = ">=3.7" -classifiers = [ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "License :: OSI Approved :: MIT License", - "Operating System :: MacOS :: MacOS X", - "Operating System :: Microsoft :: Windows", - "Operating System :: POSIX", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Programming Language :: Python :: 3.10", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: Implementation :: CPython", - "Programming Language :: Python :: Implementation :: PyPy", - "Topic :: Software Development :: Libraries", - "Topic :: Software Development :: Testing", - "Topic :: Utilities", -] -dynamic = [ - "version", -] -dependencies = [ - "distlib<1,>=0.3.7", - "filelock<4,>=3.12.2", - 'importlib-metadata>=6.6; python_version < "3.8"', - "platformdirs<4,>=3.9.1", -] -optional-dependencies.docs = [ - "furo>=2023.7.26", - "proselint>=0.13", - "sphinx>=7.1.2", - "sphinx-argparse>=0.4", - "sphinxcontrib-towncrier>=0.2.1a0", - "towncrier>=23.6", -] -optional-dependencies.test = [ - "covdefaults>=2.3", - "coverage>=7.2.7", - "coverage-enable-subprocess>=1", - "flaky>=3.7", - "packaging>=23.1", - "pytest>=7.4", - "pytest-env>=0.8.2", - 'pytest-freezer>=0.4.8; platform_python_implementation == "PyPy"', - "pytest-mock>=3.11.1", - "pytest-randomly>=3.12", - "pytest-timeout>=2.1", - "setuptools>=68", - 'time-machine>=2.10; platform_python_implementation == "CPython"', -] -urls.Documentation = "https://virtualenv.pypa.io" -urls.Homepage = "https://github.com/pypa/virtualenv" -urls.Source = "https://github.com/pypa/virtualenv" -urls.Tracker = "https://github.com/pypa/virtualenv/issues" -scripts.virtualenv = "virtualenv.__main__:run_with_catch" -[project.entry-points."virtualenv.activate"] -bash = "virtualenv.activation.bash:BashActivator" -batch = "virtualenv.activation.batch:BatchActivator" -cshell = "virtualenv.activation.cshell:CShellActivator" -fish = "virtualenv.activation.fish:FishActivator" -nushell = "virtualenv.activation.nushell:NushellActivator" -powershell = "virtualenv.activation.powershell:PowerShellActivator" -python = "virtualenv.activation.python:PythonActivator" -[project.entry-points."virtualenv.create"] -cpython3-mac-brew = "virtualenv.create.via_global_ref.builtin.cpython.mac_os:CPython3macOsBrew" -cpython3-mac-framework = "virtualenv.create.via_global_ref.builtin.cpython.mac_os:CPython3macOsFramework" -cpython3-posix = "virtualenv.create.via_global_ref.builtin.cpython.cpython3:CPython3Posix" -cpython3-win = "virtualenv.create.via_global_ref.builtin.cpython.cpython3:CPython3Windows" -pypy3-posix = "virtualenv.create.via_global_ref.builtin.pypy.pypy3:PyPy3Posix" -pypy3-win = "virtualenv.create.via_global_ref.builtin.pypy.pypy3:Pypy3Windows" -venv = "virtualenv.create.via_global_ref.venv:Venv" -[project.entry-points."virtualenv.discovery"] -builtin = "virtualenv.discovery.builtin:Builtin" -[project.entry-points."virtualenv.seed"] -app-data = "virtualenv.seed.embed.via_app_data.via_app_data:FromAppData" -pip = "virtualenv.seed.embed.pip_invoke:PipInvoke" - -[tool.hatch] -build.hooks.vcs.version-file = "src/virtualenv/version.py" -build.targets.sdist.include = ["/src", "/tests", "/tasks", "/tox.ini"] -version.source = "vcs" - -[tool.black] -line-length = 120 - -[tool.ruff] -select = ["ALL"] -line-length = 120 -target-version = "py37" -isort = {known-first-party = ["virtualenv"], required-imports = ["from __future__ import annotations"]} -ignore = [ - "ANN", # no type checking added yet - "D10", # no docstrings - "D40", # no imperative mode for docstrings - "PTH", # no pathlib, <=39 has problems on Windows with absolute/resolve, can revisit once we no longer need 39 - "INP001", # ignore implicit namespace packages - "D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible - "D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible - "S104", # Possible binding to all interface -] -[tool.ruff.per-file-ignores] -"tests/**/*.py" = [ - "S101", # asserts allowed in tests... - "FBT", # don"t care about booleans as positional arguments in tests - "INP001", # no implicit namespace - "D", # don"t care about documentation in tests - "S603", # `subprocess` call: check for execution of untrusted input - "PLR2004", # Magic value used in comparison, consider replacing with a constant variable -] - -[tool.pytest.ini_options] -markers = ["slow"] -timeout = 600 -addopts = "--showlocals --no-success-flaky-report" -env = ["PYTHONIOENCODING=utf-8"] - -[tool.coverage] -html.show_contexts = true -html.skip_covered = false -report.omit = [ - # site.py is ran before the coverage can be enabled, no way to measure coverage on this - "**/src/virtualenv/create/via_global_ref/builtin/python2/site.py", - "**/src/virtualenv/create/via_global_ref/_virtualenv.py", - "**/src/virtualenv/activation/python/activate_this.py", - "**/src/virtualenv/seed/wheels/embed/pip-*.whl/pip/**", -] -paths.source = ["src", "**/site-packages"] -report.fail_under = 76 -run.source = ["${_COVERAGE_SRC}", "tests"] -run.dynamic_context = "test_function" -run.parallel = true -run.plugins = ["covdefaults"] -run.relative_files = true - -[tool.towncrier] -name = "tox" -filename = "docs/changelog.rst" -directory = "docs/changelog" -title_format = false -issue_format = ":issue:`{issue}`" -template = "docs/changelog/template.jinja2" diff --git a/python-virtualenv.spec b/python-virtualenv.spec new file mode 100644 index 000000000..1c77b5ebd --- /dev/null +++ b/python-virtualenv.spec @@ -0,0 +1,102 @@ +# Copyright 2023 Wong Hoi Sing Edison +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +%global debug_package %{nil} + +Name: python-virtualenv +Epoch: 100 +Version: 20.24.6 +Release: 1%{?dist} +BuildArch: noarch +Summary: Tool to create isolated Python environments +License: MIT +URL: https://github.com/pypa/virtualenv/tags +Source0: %{name}_%{version}.orig.tar.gz +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: python3-devel +BuildRequires: python3-setuptools >= 59.6 + +%description +virtualenv is a tool to create isolated Python environments. virtualenv +is a successor to workingenv, and an extension of virtual-python. It is +written by Ian Bicking, and sponsored by the Open Planning Project. + +%prep +%autosetup -T -c -n %{name}_%{version}-%{release} +tar -zx -f %{S:0} --strip-components=1 -C . + +%build +%py3_build + +%install +%py3_install +find %{buildroot}%{python3_sitelib} -type f -name '*.pyc' -exec rm -rf {} \; +fdupes -qnrps %{buildroot}%{python3_sitelib} + +%check + +%if 0%{?suse_version} > 1500 || 0%{?centos_version} == 700 +%package -n python%{python3_version_nodots}-virtualenv +Summary: Tool to create isolated Python environments +Requires: python3 +Requires: python3-distlib >= 0.3.7 +Requires: python3-filelock >= 3.12.2 +Requires: python3-importlib-metadata >= 6.6 +Requires: python3-platformdirs >= 3.9.1 +Provides: python3-virtualenv = %{epoch}:%{version}-%{release} +Provides: python3dist(virtualenv) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-virtualenv = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(virtualenv) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-virtualenv = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(virtualenv) = %{epoch}:%{version}-%{release} + +%description -n python%{python3_version_nodots}-virtualenv +virtualenv is a tool to create isolated Python environments. virtualenv +is a successor to workingenv, and an extension of virtual-python. It is +written by Ian Bicking, and sponsored by the Open Planning Project. + +%files -n python%{python3_version_nodots}-virtualenv +%license LICENSE +%{_bindir}/* +%{python3_sitelib}/* +%endif + +%if !(0%{?suse_version} > 1500) && !(0%{?centos_version} == 700) +%package -n python3-virtualenv +Summary: Tool to create isolated Python environments +Requires: python3 +Requires: python3-distlib >= 0.3.7 +Requires: python3-filelock >= 3.12.2 +Requires: python3-importlib-metadata >= 6.6 +Requires: python3-platformdirs >= 3.9.1 +Provides: python3-virtualenv = %{epoch}:%{version}-%{release} +Provides: python3dist(virtualenv) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}-virtualenv = %{epoch}:%{version}-%{release} +Provides: python%{python3_version}dist(virtualenv) = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}-virtualenv = %{epoch}:%{version}-%{release} +Provides: python%{python3_version_nodots}dist(virtualenv) = %{epoch}:%{version}-%{release} + +%description -n python3-virtualenv +virtualenv is a tool to create isolated Python environments. virtualenv +is a successor to workingenv, and an extension of virtual-python. It is +written by Ian Bicking, and sponsored by the Open Planning Project. + +%files -n python3-virtualenv +%license LICENSE +%{_bindir}/* +%{python3_sitelib}/* +%endif + +%changelog diff --git a/setup.py b/setup.py new file mode 100644 index 000000000..d70ddbddc --- /dev/null +++ b/setup.py @@ -0,0 +1,123 @@ +# -*- coding: utf-8 -*- +from setuptools import setup + +setup( + name='virtualenv', + version='20.24.6', + description='Virtual Python Environment builder', + maintainer_email='Bernat Gabor ', + classifiers=[ + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: MIT License', + 'Operating System :: MacOS :: MacOS X', + 'Operating System :: Microsoft :: Windows', + 'Operating System :: POSIX', + 'Programming Language :: Python :: 3 :: Only', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.11', + 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: Implementation :: CPython', + 'Programming Language :: Python :: Implementation :: PyPy', + 'Topic :: Software Development :: Libraries', + 'Topic :: Software Development :: Testing', + 'Topic :: Utilities', + ], + install_requires=[ + 'distlib<1,>=0.3.7', + 'filelock<4,>=3.12.2', + 'importlib-metadata>=6.6; python_version < "3.8"', + 'platformdirs<5,>=3.9.1', + ], + extras_require={ + 'docs': [ + 'furo>=2023.7.26', + 'proselint>=0.13', + 'sphinx-argparse>=0.4', + 'sphinx>=7.1.2', + 'sphinxcontrib-towncrier>=0.2.1a0', + 'towncrier>=23.6', + ], + 'test': [ + 'covdefaults>=2.3', + 'coverage-enable-subprocess>=1', + 'coverage>=7.2.7', + 'flaky>=3.7', + 'packaging>=23.1', + 'pytest-env>=0.8.2', + 'pytest-freezer>=0.4.8; platform_python_implementation == "PyPy"', + 'pytest-mock>=3.11.1', + 'pytest-randomly>=3.12', + 'pytest-timeout>=2.1', + 'pytest>=7.4', + 'setuptools>=68', + 'time-machine>=2.10; platform_python_implementation == "CPython"', + ], + }, + entry_points={ + 'console_scripts': [ + 'virtualenv = virtualenv.__main__:run_with_catch', + ], + 'virtualenv.activate': [ + 'bash = virtualenv.activation.bash:BashActivator', + 'batch = virtualenv.activation.batch:BatchActivator', + 'cshell = virtualenv.activation.cshell:CShellActivator', + 'fish = virtualenv.activation.fish:FishActivator', + 'nushell = virtualenv.activation.nushell:NushellActivator', + 'powershell = virtualenv.activation.powershell:PowerShellActivator', + 'python = virtualenv.activation.python:PythonActivator', + ], + 'virtualenv.create': [ + 'cpython3-mac-brew = virtualenv.create.via_global_ref.builtin.cpython.mac_os:CPython3macOsBrew', + 'cpython3-mac-framework = virtualenv.create.via_global_ref.builtin.cpython.mac_os:CPython3macOsFramework', + 'cpython3-posix = virtualenv.create.via_global_ref.builtin.cpython.cpython3:CPython3Posix', + 'cpython3-win = virtualenv.create.via_global_ref.builtin.cpython.cpython3:CPython3Windows', + 'pypy3-posix = virtualenv.create.via_global_ref.builtin.pypy.pypy3:PyPy3Posix', + 'pypy3-win = virtualenv.create.via_global_ref.builtin.pypy.pypy3:Pypy3Windows', + 'venv = virtualenv.create.via_global_ref.venv:Venv', + ], + 'virtualenv.discovery': [ + 'builtin = virtualenv.discovery.builtin:Builtin', + ], + 'virtualenv.seed': [ + 'app-data = virtualenv.seed.embed.via_app_data.via_app_data:FromAppData', + 'pip = virtualenv.seed.embed.pip_invoke:PipInvoke', + ], + }, + packages=[ + 'virtualenv', + 'virtualenv.activation', + 'virtualenv.activation.bash', + 'virtualenv.activation.batch', + 'virtualenv.activation.cshell', + 'virtualenv.activation.fish', + 'virtualenv.activation.nushell', + 'virtualenv.activation.powershell', + 'virtualenv.activation.python', + 'virtualenv.app_data', + 'virtualenv.config', + 'virtualenv.config.cli', + 'virtualenv.create', + 'virtualenv.create.via_global_ref', + 'virtualenv.create.via_global_ref.builtin', + 'virtualenv.create.via_global_ref.builtin.cpython', + 'virtualenv.create.via_global_ref.builtin.pypy', + 'virtualenv.discovery', + 'virtualenv.discovery.windows', + 'virtualenv.run', + 'virtualenv.run.plugin', + 'virtualenv.seed', + 'virtualenv.seed.embed', + 'virtualenv.seed.embed.via_app_data', + 'virtualenv.seed.embed.via_app_data.pip_install', + 'virtualenv.seed.wheels', + 'virtualenv.seed.wheels.embed', + 'virtualenv.util', + 'virtualenv.util.path', + 'virtualenv.util.subprocess', + ], + package_dir={'': 'src'}, +) diff --git a/src/virtualenv/version.py b/src/virtualenv/version.py new file mode 100644 index 000000000..6a4f30201 --- /dev/null +++ b/src/virtualenv/version.py @@ -0,0 +1,4 @@ +# file generated by setuptools_scm +# don't change, don't track in version control +__version__ = version = '20.24.5' +__version_tuple__ = version_tuple = (20, 24, 5)