Browse Source

python-packages: Add usr/bin symlinks without "3" suffix

Previously, binaries installed by Python packages will have a
non-suffixed Python 2 version and a suffixed Python 3 version, e.g. pip
and pip3. With the removal of Python 2, the non-suffixed names are no
longer taken.

This adds symlinks for the non-suffixed names linking to the suffixed
scripts (or in the case of pip, easy_install, and python-config, to the
fully-versioned scripts).

Signed-off-by: Jeffery To <jeffery.to@gmail.com>
lilik-openwrt-22.03
Jeffery To 5 years ago
parent
commit
3c36696a56
7 changed files with 10 additions and 5 deletions
  1. +2
    -1
      lang/python/python-chardet/Makefile
  2. +2
    -1
      lang/python/python-twisted/Makefile
  3. +2
    -2
      lang/python/python3-version.mk
  4. +1
    -1
      lang/python/python3/Makefile
  5. +1
    -0
      lang/python/python3/files/python3-package-dev.mk
  6. +1
    -0
      lang/python/python3/files/python3-package-pip.mk
  7. +1
    -0
      lang/python/python3/files/python3-package-setuptools.mk

+ 2
- 1
lang/python/python-chardet/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=python-chardet
PKG_VERSION:=3.0.4
PKG_RELEASE:=3
PKG_RELEASE:=4
PKG_LICENSE:=LGPL-2.1
PYPI_NAME:=chardet
@ -38,6 +38,7 @@ define Py3Package/python3-chardet/install
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
for bin in $(1)/usr/bin/*; do \
mv $$$$bin $$$${bin}3 ; \
$(LN) $$$${bin##*/}3 $$$$bin ; \
done
endef


+ 2
- 1
lang/python/python-twisted/Makefile View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=python-twisted
PKG_VERSION:=20.3.0
PKG_RELEASE:=2
PKG_RELEASE:=3
PYPI_NAME:=Twisted
PYPI_SOURCE_EXT:=tar.bz2
@ -59,6 +59,7 @@ define Py3Package/python3-twisted/install
$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
for bin in $(1)/usr/bin/*; do \
mv $$$$bin $$$${bin}3 ; \
$(LN) $$$${bin##*/}3 $$$$bin ; \
done
endef


+ 2
- 2
lang/python/python3-version.mk View File

@ -12,8 +12,8 @@ PYTHON3_VERSION_MICRO:=3
PYTHON3_VERSION:=$(PYTHON3_VERSION_MAJOR).$(PYTHON3_VERSION_MINOR)
PYTHON3_SETUPTOOLS_PKG_RELEASE:=2
PYTHON3_PIP_PKG_RELEASE:=3
PYTHON3_SETUPTOOLS_PKG_RELEASE:=3
PYTHON3_PIP_PKG_RELEASE:=4
PYTHON3_SETUPTOOLS_VERSION:=41.2.0
PYTHON3_PIP_VERSION:=19.2.3

+ 1
- 1
lang/python/python3/Makefile View File

@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk
include ../python3-version.mk
PKG_NAME:=python3
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_VERSION:=$(PYTHON3_VERSION).$(PYTHON3_VERSION_MICRO)
PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz


+ 1
- 0
lang/python/python3/files/python3-package-dev.mk View File

@ -15,6 +15,7 @@ define Py3Package/python3-dev/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib
$(CP) $(PKG_INSTALL_DIR)/usr/bin/python$(PYTHON3_VERSION)-config $(1)/usr/bin
$(LN) python$(PYTHON3_VERSION)-config $(1)/usr/bin/python3-config
$(LN) python$(PYTHON3_VERSION)-config $(1)/usr/bin/python-config
$(LN) python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)/libpython$(PYTHON3_VERSION).a $(1)/usr/lib/
# This depends on being called before filespec is processed
$(SED) 's|$(TARGET_AR)|ar|g;s|$(TARGET_CROSS)readelf|readelf|g;s|$(TARGET_CC)|gcc|g;s|$(TARGET_CXX)|g++|g' \


+ 1
- 0
lang/python/python3/files/python3-package-pip.mk View File

@ -19,6 +19,7 @@ define Py3Package/python3-pip/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
$(CP) $(PKG_BUILD_DIR)/install-pip/usr/bin/pip$(PYTHON3_VERSION) $(1)/usr/bin
$(LN) pip$(PYTHON3_VERSION) $(1)/usr/bin/pip3
$(LN) pip$(PYTHON3_VERSION) $(1)/usr/bin/pip
$(CP) \
$(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages/pip \
$(PKG_BUILD_DIR)/install-pip/usr/lib/python$(PYTHON3_VERSION)/site-packages/pip-$(PYTHON3_PIP_VERSION).dist-info \


+ 1
- 0
lang/python/python3/files/python3-package-setuptools.mk View File

@ -19,6 +19,7 @@ define Py3Package/python3-setuptools/install
$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/python$(PYTHON3_VERSION)/site-packages
$(CP) $(PKG_BUILD_DIR)/install-setuptools/usr/bin/easy_install-* $(1)/usr/bin
$(LN) easy_install-$(PYTHON3_VERSION) $(1)/usr/bin/easy_install-3
$(LN) easy_install-$(PYTHON3_VERSION) $(1)/usr/bin/easy_install
$(CP) \
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools \
$(PKG_BUILD_DIR)/install-setuptools/usr/lib/python$(PYTHON3_VERSION)/site-packages/setuptools-$(PYTHON3_SETUPTOOLS_VERSION).dist-info \


Loading…
Cancel
Save