pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/py-pip



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Wed Jun 14 11:30:54 UTC 2023

Modified Files:
        pkgsrc/devel/py-pip: Makefile distinfo
Added Files:
        pkgsrc/devel/py-pip/patches:
            patch-src_pip___internal_commands_install.py
            patch-src_pip___internal_operations_install_wheel.py
            patch-src_pip___internal_req_____init____.py
            patch-src_pip___internal_req_req__install.py

Log Message:
py-pip: Allow `pip install --executable=/path' to set #! in scripts.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 pkgsrc/devel/py-pip/Makefile
cvs rdiff -u -r1.54 -r1.55 pkgsrc/devel/py-pip/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/devel/py-pip/patches/patch-src_pip___internal_commands_install.py \
    pkgsrc/devel/py-pip/patches/patch-src_pip___internal_operations_install_wheel.py \
    pkgsrc/devel/py-pip/patches/patch-src_pip___internal_req_____init____.py \
    pkgsrc/devel/py-pip/patches/patch-src_pip___internal_req_req__install.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/py-pip/Makefile
diff -u pkgsrc/devel/py-pip/Makefile:1.64 pkgsrc/devel/py-pip/Makefile:1.65
--- pkgsrc/devel/py-pip/Makefile:1.64   Wed Apr 26 12:40:29 2023
+++ pkgsrc/devel/py-pip/Makefile        Wed Jun 14 11:30:54 2023
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.64 2023/04/26 12:40:29 adam Exp $
+# $NetBSD: Makefile,v 1.65 2023/06/14 11:30:54 riastradh Exp $
 
 DISTNAME=      pip-23.1.2
+PKGREVISION=   1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/pip/}

Index: pkgsrc/devel/py-pip/distinfo
diff -u pkgsrc/devel/py-pip/distinfo:1.54 pkgsrc/devel/py-pip/distinfo:1.55
--- pkgsrc/devel/py-pip/distinfo:1.54   Wed Apr 26 12:40:29 2023
+++ pkgsrc/devel/py-pip/distinfo        Wed Jun 14 11:30:54 2023
@@ -1,6 +1,10 @@
-$NetBSD: distinfo,v 1.54 2023/04/26 12:40:29 adam Exp $
+$NetBSD: distinfo,v 1.55 2023/06/14 11:30:54 riastradh Exp $
 
 BLAKE2s (pip-23.1.2.tar.gz) = 7e5c65e41fc6c5ba35f7d450de98c430413437442e88cec30bf8236ed38423e2
 SHA512 (pip-23.1.2.tar.gz) = 6f466ec7a5005384cd9123c9400abe345ecf08c15eba1d9803a22bb10f99bb5a640b66153491c343b26c8b4adebbc6c220b7b641e64516d1e4c6a9cf61971532
 Size (pip-23.1.2.tar.gz) = 2087568 bytes
 SHA1 (patch-src_pip___internal_build__env.py) = 19c6feb4b56cbdb70f9150c452dac73ca3949911
+SHA1 (patch-src_pip___internal_commands_install.py) = 2f78c5af7c677d052a2275488dcda2f7b86c6e51
+SHA1 (patch-src_pip___internal_operations_install_wheel.py) = 0f590d2a11a2373f50abbc9377044f728625b13d
+SHA1 (patch-src_pip___internal_req_____init____.py) = ea65543752173516df5f73bbd530328bd274a683
+SHA1 (patch-src_pip___internal_req_req__install.py) = 2bce1b51a71688c368167910e16dd4fe33013922

Added files:

Index: pkgsrc/devel/py-pip/patches/patch-src_pip___internal_commands_install.py
diff -u /dev/null pkgsrc/devel/py-pip/patches/patch-src_pip___internal_commands_install.py:1.1
--- /dev/null   Wed Jun 14 11:30:54 2023
+++ pkgsrc/devel/py-pip/patches/patch-src_pip___internal_commands_install.py    Wed Jun 14 11:30:54 2023
@@ -0,0 +1,31 @@
+$NetBSD: patch-src_pip___internal_commands_install.py,v 1.1 2023/06/14 11:30:54 riastradh Exp $
+
+Allow pip install --executable=/path to set path in script #! lines.
+https://github.com/pypa/pip/issues/12087
+https://github.com/pypa/pip/pull/12088
+
+--- src/pip/_internal/commands/install.py.orig 2023-04-26 09:23:01.000000000 +0000
++++ src/pip/_internal/commands/install.py
+@@ -141,6 +141,14 @@ class InstallCommand(RequirementCommand)
+                 "environment."
+             ),
+         )
++        self.cmd_opts.add_option(
++            "--executable",
++            dest="executable_path",
++            default=None,
++            help=(
++                "Path to executable for #! lines in scripts."
++            ),
++        )
+ 
+         self.cmd_opts.add_option(cmdoptions.src())
+ 
+@@ -452,6 +460,7 @@ class InstallCommand(RequirementCommand)
+                 root=options.root_path,
+                 home=target_temp_dir_path,
+                 prefix=options.prefix_path,
++                executable=options.executable_path,
+                 warn_script_location=warn_script_location,
+                 use_user_site=options.use_user_site,
+                 pycompile=options.compile,
Index: pkgsrc/devel/py-pip/patches/patch-src_pip___internal_operations_install_wheel.py
diff -u /dev/null pkgsrc/devel/py-pip/patches/patch-src_pip___internal_operations_install_wheel.py:1.1
--- /dev/null   Wed Jun 14 11:30:54 2023
+++ pkgsrc/devel/py-pip/patches/patch-src_pip___internal_operations_install_wheel.py    Wed Jun 14 11:30:54 2023
@@ -0,0 +1,51 @@
+$NetBSD: patch-src_pip___internal_operations_install_wheel.py,v 1.1 2023/06/14 11:30:54 riastradh Exp $
+
+Allow pip install --executable=/path to set path in script #! lines.
+https://github.com/pypa/pip/issues/12087
+https://github.com/pypa/pip/pull/12088
+
+--- src/pip/_internal/operations/install/wheel.py.orig 2023-04-26 09:23:01.000000000 +0000
++++ src/pip/_internal/operations/install/wheel.py
+@@ -422,6 +422,9 @@ def _raise_for_invalid_entrypoint(specif
+ 
+ 
+ class PipScriptMaker(ScriptMaker):
++    def __init__(self, executable, *args, **kwargs):
++        super().__init__(*args, **kwargs)
++        self.executable = executable
+     def make(
+         self, specification: str, options: Optional[Dict[str, Any]] = None
+     ) -> List[str]:
+@@ -434,6 +437,7 @@ def _install_wheel(
+     wheel_zip: ZipFile,
+     wheel_path: str,
+     scheme: Scheme,
++    executable: Optional[str] = None,
+     pycompile: bool = True,
+     warn_script_location: bool = True,
+     direct_url: Optional[DirectUrl] = None,
+@@ -624,7 +628,7 @@ def _install_wheel(
+                         record_installed(pyc_record_path, pyc_path)
+         logger.debug(stdout.getvalue())
+ 
+-    maker = PipScriptMaker(None, scheme.scripts)
++    maker = PipScriptMaker(executable, None, scheme.scripts)
+ 
+     # Ensure old scripts are overwritten.
+     # See https://github.com/pypa/pip/issues/1800
+@@ -721,6 +725,7 @@ def install_wheel(
+     wheel_path: str,
+     scheme: Scheme,
+     req_description: str,
++    executable: Optional[str] = None,
+     pycompile: bool = True,
+     warn_script_location: bool = True,
+     direct_url: Optional[DirectUrl] = None,
+@@ -733,6 +738,7 @@ def install_wheel(
+                 wheel_zip=z,
+                 wheel_path=wheel_path,
+                 scheme=scheme,
++                executable=executable,
+                 pycompile=pycompile,
+                 warn_script_location=warn_script_location,
+                 direct_url=direct_url,
Index: pkgsrc/devel/py-pip/patches/patch-src_pip___internal_req_____init____.py
diff -u /dev/null pkgsrc/devel/py-pip/patches/patch-src_pip___internal_req_____init____.py:1.1
--- /dev/null   Wed Jun 14 11:30:54 2023
+++ pkgsrc/devel/py-pip/patches/patch-src_pip___internal_req_____init____.py    Wed Jun 14 11:30:54 2023
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_pip___internal_req_____init____.py,v 1.1 2023/06/14 11:30:54 riastradh Exp $
+
+Allow pip install --executable=/path to set path in script #! lines.
+https://github.com/pypa/pip/issues/12087
+https://github.com/pypa/pip/pull/12088
+
+--- src/pip/_internal/req/__init__.py.orig     2023-04-26 09:23:01.000000000 +0000
++++ src/pip/_internal/req/__init__.py
+@@ -40,6 +40,7 @@ def install_given_reqs(
+     root: Optional[str],
+     home: Optional[str],
+     prefix: Optional[str],
++    executable: Optional[str],
+     warn_script_location: bool,
+     use_user_site: bool,
+     pycompile: bool,
+@@ -74,6 +75,7 @@ def install_given_reqs(
+                     root=root,
+                     home=home,
+                     prefix=prefix,
++                    executable=executable,
+                     warn_script_location=warn_script_location,
+                     use_user_site=use_user_site,
+                     pycompile=pycompile,
Index: pkgsrc/devel/py-pip/patches/patch-src_pip___internal_req_req__install.py
diff -u /dev/null pkgsrc/devel/py-pip/patches/patch-src_pip___internal_req_req__install.py:1.1
--- /dev/null   Wed Jun 14 11:30:54 2023
+++ pkgsrc/devel/py-pip/patches/patch-src_pip___internal_req_req__install.py    Wed Jun 14 11:30:54 2023
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_pip___internal_req_req__install.py,v 1.1 2023/06/14 11:30:54 riastradh Exp $
+
+Allow pip install --executable=/path to set path in script #! lines.
+https://github.com/pypa/pip/issues/12087
+https://github.com/pypa/pip/pull/12088
+
+--- src/pip/_internal/req/req_install.py.orig  2023-04-26 09:23:01.000000000 +0000
++++ src/pip/_internal/req/req_install.py
+@@ -766,6 +766,7 @@ class InstallRequirement:
+         root: Optional[str] = None,
+         home: Optional[str] = None,
+         prefix: Optional[str] = None,
++        executable: Optional[str] = None,
+         warn_script_location: bool = True,
+         use_user_site: bool = False,
+         pycompile: bool = True,
+@@ -801,6 +802,7 @@ class InstallRequirement:
+             self.name,
+             self.local_file_path,
+             scheme=scheme,
++            executable=executable,
+             req_description=str(self.req),
+             pycompile=pycompile,
+             warn_script_location=warn_script_location,



Home | Main Index | Thread Index | Old Index