python-packages: Add usr/bin symlinks without "3" suffix 12249/head
authorJeffery To <jeffery.to@gmail.com>
Thu, 21 May 2020 19:57:55 +0000 (03:57 +0800)
committerJeffery To <jeffery.to@gmail.com>
Thu, 21 May 2020 19:57:55 +0000 (03:57 +0800)
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>
lang/python/python-chardet/Makefile
lang/python/python-twisted/Makefile
lang/python/python3-version.mk
lang/python/python3/Makefile
lang/python/python3/files/python3-package-dev.mk
lang/python/python3/files/python3-package-pip.mk
lang/python/python3/files/python3-package-setuptools.mk

index f9c0cf0b178a4a42756d738b52d2efc6bd480314..1b71631efd8015161bfcafae3a9cec16f5fd8820 100644 (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
 
index 1a3946777135acd6c6a945e385cbe9634b14337e..935f34b3686020b152b313ae01d1564300a47be8 100644 (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
 
index 0a9f0ea85eb732fa0e8f5444f1c5973581c64b0d..e8f8fba05221d4dc4480c60bd584fc62f5f900f9 100644 (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
index 993dce756615b5e6c844d2d20f2d5d066d064470..87c401842752756c7b73474f21c9723d5becaed6 100644 (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
index b23654876ca864774ae1d6d0aa53070b67cecc16..e43ba523491d48509cf4849e9e693827de831580 100644 (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' \
index 0182c99d824eb0c05df2c5ab59b59fa410eafcf4..8b547cee81f33fbfaf2ecf6cf51b745b66ae23ab 100644 (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 \
index 3a562c26219c4873f694d03480c4b3c2d3fcdf29..4e5a7572d99976bb17bd3dd136c38b807bd52e56 100644 (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 \