-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gpkg/python gpkg/python-pip gpkg/python-xcbgen
- Loading branch information
Showing
7 changed files
with
112 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
TERMUX_PKG_HOMEPAGE=https://pip.pypa.io/ | ||
TERMUX_PKG_DESCRIPTION="The PyPA recommended tool for installing Python packages" | ||
TERMUX_PKG_LICENSE="MIT" | ||
TERMUX_PKG_MAINTAINER="@termux-pacman" | ||
TERMUX_PKG_VERSION="23.3.1" | ||
TERMUX_PKG_SRCURL=https://github.com/pypa/pip/archive/$TERMUX_PKG_VERSION.tar.gz | ||
TERMUX_PKG_SHA256=4192f1ed5f8f1e01557d8c02ffd845c64d4a4567e0864ca78b74b0b5456c0f62 | ||
TERMUX_PKG_DEPENDS="gcc-glibc, make-glibc, pkgconf-glibc, python-glibc (>= 3.11.1-1)" | ||
TERMUX_PKG_ANTI_BUILD_DEPENDS="gcc-glibc" | ||
TERMUX_PKG_BREAKS="python-glibc (<< 3.11.1-1)" | ||
TERMUX_PKG_PLATFORM_INDEPENDENT=true | ||
TERMUX_PKG_BUILD_IN_SRC=true | ||
TERMUX_PKG_PYTHON_COMMON_DEPS="wheel, docutils, myst_parser, sphinx_copybutton, sphinx_inline_tabs, sphinxcontrib.towncrier, completion" | ||
|
||
termux_step_post_make_install() { | ||
( # creating pip documentation | ||
cd docs/ | ||
python pip_sphinxext.py | ||
sphinx-build -b man -d build/doctrees/man man build/man -c html | ||
) | ||
|
||
install -vDm 644 LICENSE.txt -t "$TERMUX_PREFIX/share/licenses/python-pip/" | ||
install -vDm 644 docs/build/man/*.1 -t "$TERMUX_PREFIX/share/man/man1/" | ||
install -vDm 644 {NEWS,README}.rst -t "$TERMUX_PREFIX/share/doc/python-pip/" | ||
|
||
"$TERMUX_PREFIX"/bin/pip completion --bash | install -vDm 644 /dev/stdin "$TERMUX_PREFIX"/share/bash-completion/completions/pip | ||
"$TERMUX_PREFIX"/bin/pip completion --fish | install -vDm 644 /dev/stdin "$TERMUX_PREFIX"/share/fish/vendor_completions.d/pip.fish | ||
} | ||
|
||
termux_step_create_debscripts() { | ||
# disable pip update notification | ||
cat <<- POSTINST_EOF > ./postinst | ||
#!$TERMUX_PREFIX/bin/bash | ||
echo "pip setup..." | ||
pip config set --global global.disable-pip-version-check true | ||
exit 0 | ||
POSTINST_EOF | ||
if [ "$TERMUX_PACKAGE_FORMAT" = "pacman" ]; then | ||
echo "post_install" > postupg | ||
fi | ||
|
||
# deleting conf of pip while removing it | ||
cat <<- PRERM_EOF > ./prerm | ||
#!$TERMUX_PREFIX/bin/bash | ||
if [ -d $TERMUX_PREFIX/etc/pip.conf ]; then | ||
echo "Removing the pip setting..." | ||
rm -fr $TERMUX_PREFIX/etc/pip.conf | ||
fi | ||
exit 0 | ||
PRERM_EOF | ||
|
||
chmod 0755 postinst prerm | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- pip-22.3.1/docs/html/conf.py 2022-11-05 18:25:43.000000000 +0300 | ||
+++ pip-22.3.1/docs/html/conf.py.patch 2022-12-01 18:27:35.429357992 +0300 | ||
@@ -21,11 +21,6 @@ | ||
"sphinx.ext.intersphinx", | ||
# our extensions | ||
"pip_sphinxext", | ||
- # third-party extensions | ||
- "myst_parser", | ||
- "sphinx_copybutton", | ||
- "sphinx_inline_tabs", | ||
- "sphinxcontrib.towncrier", | ||
] | ||
|
||
# General information about the project. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- pip-22.3.1/src/pip/_internal/utils/appdirs.py | ||
+++ pip-22.3.1/src/pip/_internal/utils/appdirs.py | ||
@@ -49,4 +49,4 @@ def site_config_dirs(appname: str) -> List[str]: | ||
return [dirval] | ||
|
||
# Unix-y system. Look in /etc as well. | ||
- return dirval.split(os.pathsep) + ["/etc"] | ||
+ return dirval.split(os.pathsep) + ["@TERMUX_PREFIX@/etc"] | ||
--- pip-22.3.1/src/pip/_vendor/platformdirs/unix.py | ||
+++ pip-22.3.1/src/pip/_vendor/platformdirs/unix.py | ||
@@ -79,7 +79,7 @@ def site_config_dir(self) -> str: | ||
# XDG default for $XDG_CONFIG_DIRS only first, if multipath is False | ||
path = os.environ.get("XDG_CONFIG_DIRS", "") | ||
if not path.strip(): | ||
- path = "/etc/xdg" | ||
+ path = "@TERMUX_PREFIX@/etc/xdg" | ||
return self._with_multi_path(path) | ||
|
||
@property |
23 changes: 23 additions & 0 deletions
23
gpkg/python-pip/install_py_preventing_pip_from_installing.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- pip-23.1/src/pip/_internal/commands/install.py 2023-04-16 00:05:42.665257200 +0100 | ||
+++ pip-23.1.mod/src/pip/_internal/commands/install.py 2023-04-16 00:09:42.989257317 +0100 | ||
@@ -342,6 +342,20 @@ | ||
reqs = self.get_requirements(args, options, finder, session) | ||
check_legacy_setup_py_options(options, reqs) | ||
|
||
+ reqs_list = [req.name for req in reqs] | ||
+ while reqs_list.count("pip") != 0: | ||
+ reqs_index = reqs_list.index("pip") | ||
+ if len(reqs)-reqs_list.count("pip") == 0: | ||
+ raise CommandError( | ||
+ "Installing pip is forbidden, this will break the python-pip package (termux)." | ||
+ ) | ||
+ elif reqs_list.count("pip") == 1: | ||
+ logger.warning( | ||
+ "Skip installing pip, this will break the python-pip package (termux)." | ||
+ ) | ||
+ del reqs_list[reqs_index] | ||
+ del reqs[reqs_index] | ||
+ | ||
wheel_cache = WheelCache(options.cache_dir) | ||
|
||
# Only when installing is it permitted to use PEP 660. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.