diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2023-10-27 06:40:13 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2023-10-27 06:40:13 +0000 |
| commit | 532d6c10f84767f12eb9d80cbbb5564795c6e2fd (patch) | |
| tree | 4d34fa75471b263a1514eccd2ea48cb074cd34c8 /dev-python/pipenv | |
| parent | d5f704aeefcddf84c928c77f138968554a171262 (diff) | |
| download | baldeagleos-repo-532d6c10f84767f12eb9d80cbbb5564795c6e2fd.tar.gz baldeagleos-repo-532d6c10f84767f12eb9d80cbbb5564795c6e2fd.tar.xz baldeagleos-repo-532d6c10f84767f12eb9d80cbbb5564795c6e2fd.zip | |
Adding metadata
Diffstat (limited to 'dev-python/pipenv')
| -rw-r--r-- | dev-python/pipenv/Manifest | 2 | ||||
| -rw-r--r-- | dev-python/pipenv/files/pipenv-2023.4.29-fix-imports.patch | 31 | ||||
| -rw-r--r-- | dev-python/pipenv/files/pipenv-2023.4.29-fix-toml-dump.patch | 18 | ||||
| -rw-r--r-- | dev-python/pipenv/files/pipenv-2023.4.29-fix-toml-in-vendor.patch | 85 | ||||
| -rw-r--r-- | dev-python/pipenv/files/pipenv-2023.9.8-append-always-install-to-pip-extra-args.patch | 34 | ||||
| -rw-r--r-- | dev-python/pipenv/files/pipenv-2023.9.8-inject-system-packages.patch | 53 | ||||
| -rw-r--r-- | dev-python/pipenv/pipenv-2023.9.8.ebuild (renamed from dev-python/pipenv/pipenv-2023.4.29-r1.ebuild) | 41 |
7 files changed, 116 insertions, 148 deletions
diff --git a/dev-python/pipenv/Manifest b/dev-python/pipenv/Manifest index f0b6618dab16..55f477212328 100644 --- a/dev-python/pipenv/Manifest +++ b/dev-python/pipenv/Manifest @@ -1,2 +1,2 @@ -DIST pipenv-2023.4.29.gh.tar.gz 10808706 BLAKE2B 31432b80f82b041969e75d0ec0a28ca90068395be25dac94a7f34526f0b638adfae59e9396b147fa61592ee78af2d9cfb4a1b65dedea9bbb299b2624a6d6e9a1 SHA512 870b33ced4ed909b23b9d345ec788f4b5fffde4b253755e8a41b0629e885ef49ca14e9a68b5919b70074829002603fe427e8b77f41028a7de33d269a910354ff DIST pipenv-2023.7.11.gh.tar.gz 10828051 BLAKE2B 3eeab9c5328dc5914e7e024f07bf105241ca777187ce50d5765f0ca1bb7270d8c6bda6a842b188fcacb57ba8bf5d0ed5f7b29b9edce5d45e485c8079691ac991 SHA512 d37cf030f4f77d4c95d0f0883140b1e829d4473b43fdc3f61c3d39827fdf9c98ecfc794d3eacf3ebedb55dadb018416c1250938a193a6382ac61ce859d19e193 +DIST pipenv-2023.9.8.gh.tar.gz 10819425 BLAKE2B 3fd67d5aa7022251660c09d47e6d2487eabca507dbac8ebb2c298ef46cae452e6f2330615053d80a404f98ce523e5ff15ef89adbc85779305633b45e6b989423 SHA512 328cab44cea16bb685f745f80804e2a8b951e93a24379d5b61faeae4730e58d48cff663652f785800dd1dffc7a05f398ca54eb5118cd4fcfa43c35dad86f60eb diff --git a/dev-python/pipenv/files/pipenv-2023.4.29-fix-imports.patch b/dev-python/pipenv/files/pipenv-2023.4.29-fix-imports.patch deleted file mode 100644 index eeae85039e12..000000000000 --- a/dev-python/pipenv/files/pipenv-2023.4.29-fix-imports.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff --git a/pipenv/project.py b/pipenv/project.py -index 75ee7d401..ed43cf2bc 100644 ---- a/pipenv/project.py -+++ b/pipenv/project.py -@@ -40,9 +40,11 @@ from pipenv.utils.shell import ( - system_which, - ) - from pipenv.utils.toml import cleanup_toml, convert_toml_outline_tables --from pipenv.vendor import click, plette, toml, tomlkit -+from pipenv.vendor import plette - from pipenv.vendor.requirementslib.models.utils import get_default_pyproject_backend - -+import click, toml, tomlkit -+ - try: - # this is only in Python3.8 and later - from functools import cached_property -diff --git a/pipenv/utils/environment.py b/pipenv/utils/environment.py -index 2e066eef2..9385689bf 100644 ---- a/pipenv/utils/environment.py -+++ b/pipenv/utils/environment.py -@@ -1,7 +1,8 @@ - import os -+import dotenv -+import click - - from pipenv import environments --from pipenv.vendor import click, dotenv - - - def load_dot_env(project, as_dict=False, quiet=False): diff --git a/dev-python/pipenv/files/pipenv-2023.4.29-fix-toml-dump.patch b/dev-python/pipenv/files/pipenv-2023.4.29-fix-toml-dump.patch deleted file mode 100644 index 8218d0f59e1c..000000000000 --- a/dev-python/pipenv/files/pipenv-2023.4.29-fix-toml-dump.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/pipenv/project.py b/pipenv/project.py -index 55251bc5f..9fd46f089 100644 ---- a/pipenv/project.py -+++ b/pipenv/project.py -@@ -183,9 +183,9 @@ class Project: - "name": "pypi", - } - -- default_sources_toml = f"[[source]]\n{toml.dumps(self.default_source)}" -+ default_sources_toml = f"[[source]]\n{tomlkit.dumps(self.default_source)}" - for pip_conf_index in pip_conf_indexes: -- default_sources_toml += f"\n\n[[source]]\n{toml.dumps(pip_conf_index)}" -+ default_sources_toml += f"\n\n[[source]]\n{tomlkit.dumps(pip_conf_index)}" - plette.pipfiles.DEFAULT_SOURCE_TOML = default_sources_toml - - # Hack to skip this during pipenv run, or -r. - - diff --git a/dev-python/pipenv/files/pipenv-2023.4.29-fix-toml-in-vendor.patch b/dev-python/pipenv/files/pipenv-2023.4.29-fix-toml-in-vendor.patch deleted file mode 100644 index e23a42e46b59..000000000000 --- a/dev-python/pipenv/files/pipenv-2023.4.29-fix-toml-in-vendor.patch +++ /dev/null @@ -1,85 +0,0 @@ -diff --git a/pipenv/project.py b/pipenv/project.py -index ed43cf2bc..55251bc5f 100644 ---- a/pipenv/project.py -+++ b/pipenv/project.py -@@ -13,6 +13,13 @@ import urllib.parse - from json.decoder import JSONDecodeError - from pathlib import Path - -+import click, tomlkit -+ -+try: -+ import tomllib as toml -+except ImportError: -+ import tomli as toml -+ - from pipenv.cmdparse import Script - from pipenv.environment import Environment - from pipenv.environments import Setting, is_in_virtualenv, normalize_pipfile_path -@@ -43,8 +50,6 @@ from pipenv.utils.toml import cleanup_toml, convert_toml_outline_tables - from pipenv.vendor import plette - from pipenv.vendor.requirementslib.models.utils import get_default_pyproject_backend - --import click, toml, tomlkit -- - try: - # this is only in Python3.8 and later - from functools import cached_property -diff --git a/pipenv/utils/toml.py b/pipenv/utils/toml.py -index d4157d01c..27d9975ae 100644 ---- a/pipenv/utils/toml.py -+++ b/pipenv/utils/toml.py -@@ -1,4 +1,9 @@ --from pipenv.vendor import toml, tomlkit -+try: -+ import tomllib as toml -+except ImportError: -+ import tomli as toml -+ -+import tomlkit - - - def cleanup_toml(tml): -diff --git a/pipenv/vendor/dparse/parser.py b/pipenv/vendor/dparse/parser.py -index faaad2e8e..4c59474e9 100644 ---- a/pipenv/vendor/dparse/parser.py -+++ b/pipenv/vendor/dparse/parser.py -@@ -10,6 +10,11 @@ from io import StringIO - from configparser import ConfigParser, NoOptionError - from pathlib import PurePath - -+try: -+ import tomllib as toml -+except ImportError: -+ import tomli as toml -+ - from .errors import MalformedDependencyFileError - from .regex import HASH_REGEX - -@@ -17,7 +22,6 @@ from .dependencies import DependencyFile, Dependency - from pipenv.patched.pip._vendor.packaging.requirements import Requirement as PackagingRequirement,\ - InvalidRequirement - from . import filetypes --import pipenv.vendor.toml as toml - from pipenv.patched.pip._vendor.packaging.specifiers import SpecifierSet - from pipenv.patched.pip._vendor.packaging.version import Version, InvalidVersion - import json -diff --git a/pipenv/vendor/dparse/updater.py b/pipenv/vendor/dparse/updater.py -index 7b7ba9a53..fe20a213f 100644 ---- a/pipenv/vendor/dparse/updater.py -+++ b/pipenv/vendor/dparse/updater.py -@@ -3,9 +3,13 @@ from __future__ import absolute_import, print_function, unicode_literals - import re - import json - import tempfile --import pipenv.vendor.toml as toml - import os - -+try: -+ import tomllib as toml -+except ImportError: -+ import tomli as toml -+ - - class RequirementsTXTUpdater(object): - SUB_REGEX = r"^{}(?=\s*\r?\n?$)" diff --git a/dev-python/pipenv/files/pipenv-2023.9.8-append-always-install-to-pip-extra-args.patch b/dev-python/pipenv/files/pipenv-2023.9.8-append-always-install-to-pip-extra-args.patch new file mode 100644 index 000000000000..d97987fd0db3 --- /dev/null +++ b/dev-python/pipenv/files/pipenv-2023.9.8-append-always-install-to-pip-extra-args.patch @@ -0,0 +1,34 @@ +From 8ee76835b2d615156bb6d329417d6ce8d19bfa3a Mon Sep 17 00:00:00 2001 +From: Oz Tiram <oz.tiram@gmail.com> +Date: Wed, 20 Sep 2023 23:11:27 +0200 +Subject: [PATCH 2/4] Append always install to pip extra args + +--- + pipenv/routines/install.py | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/pipenv/routines/install.py b/pipenv/routines/install.py +index 2f135b435..e30f2da52 100644 +--- a/pipenv/routines/install.py ++++ b/pipenv/routines/install.py +@@ -459,6 +459,17 @@ def batch_install_iteration( + allow_global=False, + extra_pip_args=None, + ): ++ # Gentoo patch: ++ # Install dependencies into the venv even if they exist ++ # in the system. ++ # This is needed because pipenv imports the system packages to run. ++ # It does not change your system's packages. ++ ++ if (extra_pip_args is not None) and ("-I" not in extra_pip_args): ++ extra_pip_args.append("-I") ++ ++ # End of Gentoo patch ++ + with temp_environ(): + if not allow_global: + os.environ["PIP_USER"] = "0" +-- +2.41.0 + diff --git a/dev-python/pipenv/files/pipenv-2023.9.8-inject-system-packages.patch b/dev-python/pipenv/files/pipenv-2023.9.8-inject-system-packages.patch new file mode 100644 index 000000000000..cf211f1ab846 --- /dev/null +++ b/dev-python/pipenv/files/pipenv-2023.9.8-inject-system-packages.patch @@ -0,0 +1,53 @@ +From b6b25911c050f0bec192e5ccb09ddc6dc3d5fa7d Mon Sep 17 00:00:00 2001 +From: Oz Tiram <oz.tiram@gmail.com> +Date: Wed, 20 Sep 2023 23:03:57 +0200 +Subject: [PATCH 1/4] Inject system packages + +--- + pipenv/patched/pip/__main__.py | 8 ++++++++ + pipenv/resolver.py | 6 ++++++ + 2 files changed, 14 insertions(+) + +diff --git a/pipenv/patched/pip/__main__.py b/pipenv/patched/pip/__main__.py +index 032297163..59f7ad19e 100644 +--- a/pipenv/patched/pip/__main__.py ++++ b/pipenv/patched/pip/__main__.py +@@ -21,10 +21,18 @@ if __package__ == "": + if __name__ == "__main__": + import importlib.util + import sys ++ ++ SITE_PACKAGES_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) ++ ++ # Inject site directory into system path. ++ sys.path.insert(-1, SITE_PACKAGES_ROOT) ++ + spec = importlib.util.spec_from_file_location( + "pipenv", location=os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), "__init__.py")) + pipenv = importlib.util.module_from_spec(spec) + sys.modules["pipenv"] = pipenv ++ ++ + spec.loader.exec_module(pipenv) + from pipenv.patched.pip._internal.cli.main import main as _main + +diff --git a/pipenv/resolver.py b/pipenv/resolver.py +index 82e01ca39..29461b878 100644 +--- a/pipenv/resolver.py ++++ b/pipenv/resolver.py +@@ -10,6 +10,12 @@ except ImportError: + cached_property = property + + ++SITE_PACKAGES_ROOT = os.path.dirname(os.path.dirname(__file__)) ++ ++# Inject site directory into system path. ++sys.path.insert(-1, SITE_PACKAGES_ROOT) ++ ++ + def _ensure_modules(): + spec = importlib.util.spec_from_file_location( + "typing_extensions", +-- +2.41.0 + diff --git a/dev-python/pipenv/pipenv-2023.4.29-r1.ebuild b/dev-python/pipenv/pipenv-2023.9.8.ebuild index 146553b71716..b124e46c2a49 100644 --- a/dev-python/pipenv/pipenv-2023.4.29-r1.ebuild +++ b/dev-python/pipenv/pipenv-2023.9.8.ebuild @@ -16,25 +16,27 @@ S="${WORKDIR}"/${PN}-${MY_PV} LICENSE="MIT" SLOT="0" -KEYWORDS="~amd64 ~riscv ~x86" +KEYWORDS="~amd64" PATCHES=( - "${FILESDIR}/pipenv-2022.9.24-inject-site-packages.patch" - "${FILESDIR}/pipenv-2023.4.29-append-always-install.patch" - "${FILESDIR}/pipenv-2023.4.29-fix-imports.patch" - "${FILESDIR}/pipenv-2023.4.29-fix-toml-in-vendor.patch" - "${FILESDIR}/pipenv-2023.4.29-fix-toml-dump.patch" + "${FILESDIR}/pipenv-2023.9.8-inject-system-packages.patch" + "${FILESDIR}/pipenv-2023.9.8-append-always-install-to-pip-extra-args.patch" ) RDEPEND=" - dev-python/attrs[${PYTHON_USEDEP}] >=dev-python/cerberus-1.3.2[${PYTHON_USEDEP}] dev-python/click[${PYTHON_USEDEP}] + dev-python/click-didyoumean[${PYTHON_USEDEP}] >=dev-python/colorama-0.4.4[${PYTHON_USEDEP}] + dev-python/dparse[${PYTHON_USEDEP}] >=dev-python/markupsafe-2.0.1[${PYTHON_USEDEP}] >=dev-python/pexpect-4.8.0[${PYTHON_USEDEP}] + dev-python/pipdeptree[${PYTHON_USEDEP}] + dev-python/plette[${PYTHON_USEDEP}] >=dev-python/ptyprocess-0.7.0[${PYTHON_USEDEP}] + <dev-python/pydantic-2.0.0[${PYTHON_USEDEP}] dev-python/pyparsing[${PYTHON_USEDEP}] + dev-python/pythonfinder[${PYTHON_USEDEP}] $(python_gen_cond_dep ' dev-python/tomli[${PYTHON_USEDEP}] ' python3_{9..10}) >=dev-python/python-dateutil-2.8.2[${PYTHON_USEDEP}] >=dev-python/python-dotenv-0.21.0[${PYTHON_USEDEP}] @@ -42,6 +44,8 @@ RDEPEND=" dev-python/virtualenv-clone[${PYTHON_USEDEP}] >=dev-python/requests-2.26.0[${PYTHON_USEDEP}] dev-python/ruamel-yaml[${PYTHON_USEDEP}] + dev-python/shellingham[${PYTHON_USEDEP}] + dev-python/tomli[${PYTHON_USEDEP}] dev-python/tomlkit[${PYTHON_USEDEP}] " @@ -62,10 +66,13 @@ distutils_enable_tests pytest # The vendored packages should eventually all be removed # see: https://bugs.gentoo.org/717666 src_prepare() { + sed --in-place -e "s/import click, plette, tomlkit/import click\n\import tomlkit\nfrom pipenv.vendor import plette/g" pipenv/project.py || die "Failed patching pipenv/project.py" + local pkgName local jobs=$(makeopts_jobs) - local packages=( attr attrs cerberus colorama dotenv markupsafe \ - pexpect ptyprocess pyparsing requests urllib3 tomlkit ) + local packages=( cerberus colorama click click_didyoumean dotenv dparse markupsafe \ + pexpect pep517 pipdeptree plette ptyprocess pydantic pyparsing pythonfinder \ + requests urllib3 shellingham tomli tomlkit ) for pkgName in ${packages[@]}; do find ./ -type f -print0 | \ xargs --max-procs="${jobs}" --null \ @@ -93,15 +100,23 @@ src_prepare() { -e "s/from pipenv\.vendor import plette, toml, tomlkit, vistir/from pipenv\.vendor import plette, toml, vistir\\nimport tomlkit/g" # remove python ruaml yaml - sed --in-place -e "s/from pipenv\.vendor\.ruamel\.yaml import YAML/from ruamel\.yaml import YAML/g" pipenv/patched/safety/util.py || die "Failed sed in ruaml-yaml" - sed --in-place -e "s/from pipenv\.vendor\.ruamel\.yaml\.error import MarkedYAMLError/from ruamel\.yaml\.error import MarkedYAMLError/g" pipenv/patched/safety/util.py || die "Failed sed in ruamel-yaml" + sed --in-place -e \ + "s/from pipenv\.vendor\.ruamel\.yaml import YAML/from ruamel\.yaml import YAML/g" \ + pipenv/patched/safety/util.py || die "Failed sed in ruaml-yaml" + sed --in-place -e \ + "s/from pipenv\.vendor\.ruamel\.yaml\.error import MarkedYAMLError/from ruamel\.yaml\.error import MarkedYAMLError/g" \ + pipenv/patched/safety/util.py || die "Failed sed in ruamel-yaml" rm -vR pipenv/vendor/ruamel || die "Failed removing ruamel-yaml from vendor" - for fname in Makefile README.md README.rst ruamel.*.LICENSE vendor.txt; do - rm -v pipenv/vendor/$fname || die "Failed removing pipenv/vendor/$fname" + for fname in Makefile README.md ruamel.*.LICENSE vendor.txt; do + rm -v pipenv/vendor/$fname || die "Failed removing pipenv/vendor/${fname}" done + sed --in-place -e "s/pipenv.vendor.pythonfinder.utils.get_python_version/pythonfinder.utils.get_python_version/g" tests/unit/test_utils.py || die "Failed patching tests" + + rm -Rfv pipenv/vendor || die "Could not vendor" + rm -Rfv examples || die "Could not remove examples" } python_test() { |
