diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-08-11 09:34:39 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-08-11 09:34:39 +0100 |
commit | 7e2b5bc2c2e2e045de6095d46c24ee857453adf2 (patch) | |
tree | 4387abc7e6be6debdd362738e7976e0d053163a1 /dev-python/pipenv | |
parent | 9b97cf60d2411c33c1b2170b730b345ea9995002 (diff) |
gentoo auto-resync : 11:08:2023 - 09:34:39
Diffstat (limited to 'dev-python/pipenv')
-rw-r--r-- | dev-python/pipenv/Manifest | 4 | ||||
-rw-r--r-- | dev-python/pipenv/files/pipenv-2023.7.11-fix-imports-utils.patch | 15 | ||||
-rw-r--r-- | dev-python/pipenv/files/pipenv-2023.7.11-fix-imports.patch | 39 | ||||
-rw-r--r-- | dev-python/pipenv/pipenv-2023.7.11.ebuild | 108 |
4 files changed, 166 insertions, 0 deletions
diff --git a/dev-python/pipenv/Manifest b/dev-python/pipenv/Manifest index a65d2517290c..95329ef01503 100644 --- a/dev-python/pipenv/Manifest +++ b/dev-python/pipenv/Manifest @@ -3,6 +3,10 @@ AUX pipenv-2023.4.29-append-always-install.patch 696 BLAKE2B 61ae23b3c948358109a AUX pipenv-2023.4.29-fix-imports.patch 946 BLAKE2B 76cc36b1a60cb600851198340f1b42bed7210f62d9aec536a8bd203e86a62a11659cccf5c328e2ebbc11c0b22f863a8c70f64932170ca2d1ac0bfee526797f0b SHA512 ff6221fe4a1876a0f4c0677243d06c9e79cd08b504b20b958ce98194f0d269bdf2bedd3558af69d03d0dd24749c73999172c83c89643d362c6e095e54f55d73d AUX pipenv-2023.4.29-fix-toml-dump.patch 732 BLAKE2B 5e1a379ee851763344c642da4c3a9876e0cda4e4f1697becfec63564c404d1070c886df5b9df7e379447bb191e7ecae63fd743bde4a8de8a1ca655ac78a3a23f SHA512 8152e1650d0f2c75c810c0ab64bff9544cfabcd3ff9b342aeddbeeda27549f8a4ee4eacdb71e7ec18945a91443381b5cecc1c5ad8a885a1f162811cd8f09f396 AUX pipenv-2023.4.29-fix-toml-in-vendor.patch 2612 BLAKE2B 8951dc3baefe0d58262d5d8c2f1952331322665f4961ced0dab5ac4109a33a4cd107646d5a9281a6b3685d6885f3f6b256fd675f9308b8c7844b065bcbde3522 SHA512 075fe3a8b69265ea41071407edec1edba945ef38123da970a6ba4553f5bd7491f8b13b07241f6ecd3e77dff1b6542f279943b0a760711c8cb0827837a7daa376 +AUX pipenv-2023.7.11-fix-imports-utils.patch 367 BLAKE2B 65529d5b515b265fa44be5e520051f98f5507989f1e708d7bf258bbd55304016cc6369ec6ec389268f7018165ddc2052aa2c6f6c4b89fff48d4b973e366b2092 SHA512 15c91f4f663254e314a8d74ffea68b63a96a40a0732be18692629c338551114924f876db7085b965d274c5124d001e735871bf06a1abe2e5df80de7eb354158a +AUX pipenv-2023.7.11-fix-imports.patch 1572 BLAKE2B e2dca1f8cb57138a9d19baf4b0b036f88172f1e58ad1d41201f6020088357fd0ace950d9b49c95a34caa391826da13468d5bca472b50717b5ee32e9474de22a6 SHA512 592d271ce3bc3e375090a39e9629f8a6eba80f9a2b15562e3902b94cc42ac24b6cb097f5c62c307a1dcee3a179d0a0c8475375b94512eaeadc05d369d60b1087 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 EBUILD pipenv-2023.4.29-r1.ebuild 4161 BLAKE2B a9b5486d69f30af06517b100771280a9562399257fd599c63787cdd235d9c4e2a1d8c113592d3e61fa972487e3896982b7fe6478c456649e3f48b125437bca92 SHA512 4687a9d3ad00d71db2259615ad4f37b3503b92a742094fdc663ff9b217e3bbf7e5faf05ffe9021a189f7a80b0924a6ebd2b7dcdd3daa633d6c77a2c463e8e3b7 +EBUILD pipenv-2023.7.11.ebuild 4108 BLAKE2B 89b3556b5f91c0170ff80fcb8de66b13afee7aa8e433309f10012d0f33636cff63538e0c742f15f5e01fe51dcf3b944ba0cccfab1c7d65cd22ac342ed857d490 SHA512 37dc19e6457b1a9f0cc4c0e3b39ac1534981e5459e8347276f6ba1118908405a9e6a3f790c7b4cc1167cfc561e66931e6f2991fe8ac706361bb82a7846590ebd MISC metadata.xml 643 BLAKE2B ff3557d9ae32b553c85455436683e2ca94bc16c6ec7c6d2ceb1113a69dc841b9ac2f0e4b96eec4c6c84ca899ad6a99b0747d7bf3f9289110a8bbdfb80f2cb2eb SHA512 7a611950572c2d700fb1680e0aa307069d80d992528144da781eca9f1fee729defa6f8b28382ddd8f66e58c5f68de9a17815989a4a39473bbf830a7be42ea282 diff --git a/dev-python/pipenv/files/pipenv-2023.7.11-fix-imports-utils.patch b/dev-python/pipenv/files/pipenv-2023.7.11-fix-imports-utils.patch new file mode 100644 index 000000000000..2e348bf8e440 --- /dev/null +++ b/dev-python/pipenv/files/pipenv-2023.7.11-fix-imports-utils.patch @@ -0,0 +1,15 @@ +diff --git a/pipenv/utils/environment.py b/pipenv/utils/environment.py +index 2e066eef2..219d8f9e5 100644 +--- a/pipenv/utils/environment.py ++++ b/pipenv/utils/environment.py +@@ -1,7 +1,9 @@ + import os + ++import click ++import dotenv ++ + 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.7.11-fix-imports.patch b/dev-python/pipenv/files/pipenv-2023.7.11-fix-imports.patch new file mode 100644 index 000000000000..a437d55b6964 --- /dev/null +++ b/dev-python/pipenv/files/pipenv-2023.7.11-fix-imports.patch @@ -0,0 +1,39 @@ +diff --git a/pipenv/environment.py b/pipenv/environment.py +index dbb89b011..89f2aaf9e 100644 +--- a/pipenv/environment.py ++++ b/pipenv/environment.py +@@ -14,7 +14,9 @@ from sysconfig import get_paths, get_python_version, get_scheme_names + from urllib.parse import urlparse + from urllib.request import url2pathname + ++import click + import pipenv ++ + from pipenv.patched.pip._internal.commands.install import InstallCommand + from pipenv.patched.pip._internal.index.package_finder import PackageFinder + from pipenv.patched.pip._vendor import pkg_resources +@@ -23,7 +25,6 @@ from pipenv.utils.funktools import chunked, unnest + from pipenv.utils.indexes import prepare_pip_source_args + from pipenv.utils.processes import subprocess_run + from pipenv.utils.shell import make_posix +-from pipenv.vendor import click + from pipenv.vendor.pythonfinder.utils import is_in_path + from pipenv.vendor.requirementslib.fileutils import normalize_path, temp_path + from pipenv.vendor.requirementslib.utils import temp_environ +diff --git a/pipenv/project.py b/pipenv/project.py +index f865988b9..e8714ef63 100644 +--- a/pipenv/project.py ++++ b/pipenv/project.py +@@ -44,9 +44,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, tomlkit ++from pipenv.vendor import plette + from pipenv.vendor.requirementslib.models.utils import get_default_pyproject_backend + ++import click, tomlkit ++ + try: + # this is only in Python3.8 and later + from functools import cached_property diff --git a/dev-python/pipenv/pipenv-2023.7.11.ebuild b/dev-python/pipenv/pipenv-2023.7.11.ebuild new file mode 100644 index 000000000000..754900f42659 --- /dev/null +++ b/dev-python/pipenv/pipenv-2023.7.11.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8..11} ) + +inherit distutils-r1 multiprocessing + +MY_PV=${PV/_beta/b} +DESCRIPTION="Python Development Workflow for Humans" +HOMEPAGE="https://github.com/pypa/pipenv https://pypi.org/project/pipenv/" +SRC_URI="https://github.com/pypa/pipenv/archive/v${MY_PV}.tar.gz -> ${P}.gh.tar.gz" +S="${WORKDIR}"/${PN}-${MY_PV} + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~riscv ~x86" + +PATCHES=( + "${FILESDIR}/pipenv-2022.9.24-inject-site-packages.patch" + "${FILESDIR}/pipenv-2023.4.29-append-always-install.patch" + "${FILESDIR}/pipenv-2023.7.11-fix-imports.patch" + "${FILESDIR}/pipenv-2023.7.11-fix-imports-utils.patch" +) + +RDEPEND=" + dev-python/attrs[${PYTHON_USEDEP}] + >=dev-python/cerberus-1.3.2[${PYTHON_USEDEP}] + dev-python/click[${PYTHON_USEDEP}] + >=dev-python/colorama-0.4.4[${PYTHON_USEDEP}] + >=dev-python/markupsafe-2.0.1[${PYTHON_USEDEP}] + >=dev-python/pexpect-4.8.0[${PYTHON_USEDEP}] + >=dev-python/ptyprocess-0.7.0[${PYTHON_USEDEP}] + dev-python/pyparsing[${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}] + >=dev-python/virtualenv-20.0.35[${PYTHON_USEDEP}] + dev-python/virtualenv-clone[${PYTHON_USEDEP}] + >=dev-python/requests-2.26.0[${PYTHON_USEDEP}] + dev-python/ruamel-yaml[${PYTHON_USEDEP}] + dev-python/tomlkit[${PYTHON_USEDEP}] +" + +BDEPEND=" + ${RDEPEND} + test? ( + dev-python/flaky[${PYTHON_USEDEP}] + dev-python/mock[${PYTHON_USEDEP}] + dev-python/pytz[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +# IMPORTANT: The following sed command patches the vendor direcotry +# in the pipenv source. Attempts to simply bump the version of the +# package without checking that it works is likely to fail +# The vendored packages should eventually all be removed +# see: https://bugs.gentoo.org/717666 +src_prepare() { + local pkgName + local jobs=$(makeopts_jobs) + local packages=( attr attrs cerberus colorama dotenv markupsafe \ + pexpect ptyprocess pyparsing requests urllib3 tomlkit ) + for pkgName in ${packages[@]}; do + find ./ -type f -print0 | \ + xargs --max-procs="${jobs}" --null \ + sed --in-place \ + -e "s/from pipenv.vendor import ${pkgName}/import ${pkgName}/g" \ + -e "s/from pipenv.vendor.${pkgName}\(.*\) import \(\w*\)/from ${pkgName}\1 import \2/g"\ + -e "s/import pipenv.vendor.${pkgName} as ${pkgName}/import ${pkgName}/g" \ + -e "s/from .vendor import ${pkgName}/import ${pkgName}/g" || die "Failed to sed for ${pkgName}" + done + + distutils-r1_src_prepare + + # remove vendored versions + for pkgName in ${packages[@]}; do + find ./pipenv/vendor -regextype posix-extended -regex ".*${pkgName}$" -prune -exec rm -rvf {} + || die + # package names can be foo-bar, their module will be however foo_bar + find ./pipenv/vendor -regextype posix-extended -regex ".*${pkgName/_/-}" -prune -exec rm -rvf {} + || die + done + + find ./pipenv/vendor -regextype posix-extended -regex '.*cached[_-]property.*' -prune -exec rm -rvf {} + || die + + find ./ -type f -print0 | \ + xargs --max-procs="${jobs}" --null \ + sed --in-place \ + -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" + + 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" + done + +} + +python_test() { + epytest -m "not cli and not needs_internet" tests/unit/ +} |