@ -7,15 +7,12 @@
i n c l u d e $( TOPDIR ) / r u l e s . m k
# The file included below defines PYTHON_VERSION
# The file included below defines PYTHON3 _VERSION
i n c l u d e . . / p y t h o n 3 - v e r s i o n . m k
PYTHON_VERSION := $( PYTHON3_VERSION)
PYTHON_VERSION_MICRO := $( PYTHON3_VERSION_MICRO)
PKG_NAME := python3
PKG_RELEASE := 2
PKG_VERSION := $( PYTHON_VERSION) .$( PYTHON_VERSION_MICRO)
PKG_VERSION := $( PYTHON3_VERSION) .$( PYTHON3_VERSION_MICRO)
PKG_SOURCE := Python-$( PKG_VERSION) .tar.xz
PKG_SOURCE_URL := https://www.python.org/ftp/python/$( PKG_VERSION)
@ -30,6 +27,7 @@ PKG_CPE_ID:=cpe:/a:python:python
i n c l u d e . . / p y t h o n 3 - h o s t . m k
# For Py3Package
PYTHON3_PKG_BUILD := 0
i n c l u d e . . / p y t h o n 3 - p a c k a g e . m k
PKG_FIXUP := autoreconf
@ -55,7 +53,7 @@ define Package/python3/Default
SUBMENU:= Python
SECTION:= lang
CATEGORY:= Languages
TITLE:= Python $( PYTHON_VERSION) programming language
TITLE:= Python $( PYTHON3 _VERSION) programming language
URL:= https://www.python.org/
e n d e f
@ -70,7 +68,7 @@ endef
d e f i n e P a c k a g e / p y t h o n 3 - b a s e
$( call Package /python 3/Default )
TITLE:= Python $( PYTHON_VERSION) interpreter
TITLE:= Python $( PYTHON3 _VERSION) interpreter
DEPENDS:= +libpthread +zlib
e n d e f
@ -81,7 +79,7 @@ endef
d e f i n e P a c k a g e / p y t h o n 3 - l i g h t
$( call Package /python 3/Default )
TITLE:= Python $( PYTHON_VERSION) light installation
TITLE:= Python $( PYTHON3 _VERSION) light installation
DEPENDS:= +python3-base +libffi +libbz2 +PYTHON3_BLUETOOTH_SUPPORT:bluez-libs +libuuid
e n d e f
@ -108,8 +106,8 @@ define Py3BasePackage
define Py3Package/$( 1) /filespec
ifneq ( $( 2) ,)
$( subst $( space) ,$( newline) ,$( foreach lib_file,$( 2) ,+| $( lib_file) ) )
-| /usr/lib/python$( PYTHON_VERSION) /*/test
-| /usr/lib/python$( PYTHON_VERSION) /*/tests
-| /usr/lib/python$( PYTHON3 _VERSION) /*/test
-| /usr/lib/python$( PYTHON3 _VERSION) /*/tests
endif
endef
Py3Package/$( 1) /install?= :
@ -144,7 +142,7 @@ endif
PYTHON_FOR_BUILD := \
_PYTHON_PROJECT_BASE = $( PKG_BUILD_DIR) \
_PYTHON_HOST_PLATFORM = linux2 \
PYTHONPATH = " $( PKG_BUILD_DIR) /Lib: $( PKG_BUILD_DIR) /build/lib.linux2- $( PYTHON_VERSION) " \
PYTHONPATH = " $( PKG_BUILD_DIR) /Lib: $( PKG_BUILD_DIR) /build/lib.linux2- $( PYTHON3 _VERSION) " \
_PYTHON_SYSCONFIGDATA_NAME = _sysconfigdata \
$( HOST_PYTHON3_BIN)
@ -218,72 +216,72 @@ define Build/InstallDev
$( INSTALL_DIR) $( 1) /usr/include $( 1) /usr/lib $( 1) /usr/lib/pkgconfig
$( INSTALL_DIR) $( 2) /bin
$( CP) \
$( PKG_INSTALL_DIR) /usr/include/python$( PYTHON_VERSION) \
$( PKG_INSTALL_DIR) /usr/include/python$( PYTHON3 _VERSION) \
$( 1) /usr/include/
$( CP) \
$( PKG_INSTALL_DIR) /usr/lib/python$( PYTHON_VERSION) \
$( PKG_INSTALL_DIR) /usr/lib/libpython$( PYTHON_VERSION) .so* \
$( PKG_INSTALL_DIR) /usr/lib/python$( PYTHON3 _VERSION) \
$( PKG_INSTALL_DIR) /usr/lib/libpython$( PYTHON3 _VERSION) .so* \
$( 1) /usr/lib/
$( CP) \
$( PKG_INSTALL_DIR) /usr/lib/pkgconfig/python*.pc \
$( 1) /usr/lib/pkgconfig
$( INSTALL_BIN) \
$( PKG_INSTALL_DIR) /usr/bin/python$( PYTHON_VERSION) -config \
$( PKG_INSTALL_DIR) /usr/bin/python$( PYTHON3 _VERSION) -config \
$( 2) /bin/
$( SED) \
's|^prefix_real=.*$$$$|prefix_real="$(PYTHON3_DIR)"|' \
$( 2) /bin/python$( PYTHON_VERSION) -config
$( 2) /bin/python$( PYTHON3 _VERSION) -config
e n d e f
PYTHON3_BASE_LIB_FILES := \
/usr/lib/python$( PYTHON_VERSION) /encodings \
/usr/lib/python$( PYTHON_VERSION) /_collections_abc.py \
/usr/lib/python$( PYTHON_VERSION) /_sitebuiltins.py \
/usr/lib/python$( PYTHON_VERSION) /_sysconfigdata.py \
/usr/lib/python$( PYTHON_VERSION) /_weakrefset.py \
/usr/lib/python$( PYTHON_VERSION) /abc.py \
/usr/lib/python$( PYTHON_VERSION) /codecs.py \
/usr/lib/python$( PYTHON_VERSION) /genericpath.py \
/usr/lib/python$( PYTHON_VERSION) /io.py \
/usr/lib/python$( PYTHON_VERSION) /os.py \
/usr/lib/python$( PYTHON_VERSION) /posixpath.py \
/usr/lib/python$( PYTHON_VERSION) /site.py \
/usr/lib/python$( PYTHON_VERSION) /sysconfig.py \
/usr/lib/python$( PYTHON_VERSION) /stat.py
/usr/lib/python$( PYTHON3 _VERSION) /encodings \
/usr/lib/python$( PYTHON3 _VERSION) /_collections_abc.py \
/usr/lib/python$( PYTHON3 _VERSION) /_sitebuiltins.py \
/usr/lib/python$( PYTHON3 _VERSION) /_sysconfigdata.py \
/usr/lib/python$( PYTHON3 _VERSION) /_weakrefset.py \
/usr/lib/python$( PYTHON3 _VERSION) /abc.py \
/usr/lib/python$( PYTHON3 _VERSION) /codecs.py \
/usr/lib/python$( PYTHON3 _VERSION) /genericpath.py \
/usr/lib/python$( PYTHON3 _VERSION) /io.py \
/usr/lib/python$( PYTHON3 _VERSION) /os.py \
/usr/lib/python$( PYTHON3 _VERSION) /posixpath.py \
/usr/lib/python$( PYTHON3 _VERSION) /site.py \
/usr/lib/python$( PYTHON3 _VERSION) /sysconfig.py \
/usr/lib/python$( PYTHON3 _VERSION) /stat.py
PYTHON3_LIB_FILES_DEL += $( PYTHON3_BASE_LIB_FILES)
d e f i n e P y 3 P a c k a g e / p y t h o n 3 - b a s e / f i l e s p e c
+ | / u s r / b i n / p y t h o n $( PYTHON_VERSION )
+ | / u s r / b i n / p y t h o n $( PYTHON 3 _VERSION )
$( subst $ ( space ) ,$ ( newline ) ,$ ( foreach lib_file ,$ ( PYTHON 3_BASE_LIB_FILES ) ,+|$ ( lib_file ) ) )
e n d e f
d e f i n e P y 3 P a c k a g e / p y t h o n 3 - l i g h t / f i l e s p e c
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION )
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / d i s t u t i l s / c y g w i n c c o m p i l e r . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / d i s t u t i l s / c o m m a n d / w i n i n s t *
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / e n s u r e p i p
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / i d l e l i b
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / t k i n t e r
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / t u r t l e d e m o
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / l i b - d y n l o a d / _ t e s t * . s o
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / l i b - d y n l o a d / r e a d l i n e * . s o
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / p d b . d o c
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / t e s t
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / w e b b r o w s e r . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / * / t e s t
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / * / t e s t s
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / _ o s x _ s u p p o r t . p y
+ | / u s r / l i b / p y t h o n $( PYTHON 3 _VERSION )
- | / u s r / l i b / p y t h o n $( PYTHON 3 _VERSION ) / d i s t u t i l s / c y g w i n c c o m p i l e r . p y
- | / u s r / l i b / p y t h o n $( PYTHON 3 _VERSION ) / d i s t u t i l s / c o m m a n d / w i n i n s t *
- | / u s r / l i b / p y t h o n $( PYTHON 3 _VERSION ) / e n s u r e p i p
- | / u s r / l i b / p y t h o n $( PYTHON 3 _VERSION ) / i d l e l i b
- | / u s r / l i b / p y t h o n $( PYTHON 3 _VERSION ) / t k i n t e r
- | / u s r / l i b / p y t h o n $( PYTHON 3 _VERSION ) / t u r t l e d e m o
- | / u s r / l i b / p y t h o n $( PYTHON 3 _VERSION ) / l i b - d y n l o a d / _ t e s t * . s o
- | / u s r / l i b / p y t h o n $( PYTHON 3 _VERSION ) / l i b - d y n l o a d / r e a d l i n e * . s o
- | / u s r / l i b / p y t h o n $( PYTHON 3 _VERSION ) / p d b . d o c
- | / u s r / l i b / p y t h o n $( PYTHON 3 _VERSION ) / t e s t
- | / u s r / l i b / p y t h o n $( PYTHON 3 _VERSION ) / w e b b r o w s e r . p y
- | / u s r / l i b / p y t h o n $( PYTHON 3 _VERSION ) / * / t e s t
- | / u s r / l i b / p y t h o n $( PYTHON 3 _VERSION ) / * / t e s t s
- | / u s r / l i b / p y t h o n $( PYTHON 3 _VERSION ) / _ o s x _ s u p p o r t . p y
$( subst $ ( space ) ,$ ( newline ) ,$ ( foreach lib_file ,$ ( PYTHON 3_LIB_FILES_DEL ) ,-|$ ( lib_file ) ) )
e n d e f
d e f i n e P y 3 P a c k a g e / p y t h o n 3 - b a s e / i n s t a l l
# Adding the lib-dynload folder (even just empty) suppresses 2 warnings when starting Python
$( INSTALL_DIR) $( 1) /usr/lib/python$( PYTHON_VERSION) /lib-dynload/
$( INSTALL_DIR) $( 1) /usr/lib/python$( PYTHON3 _VERSION) /lib-dynload/
$( INSTALL_DIR) $( 1) /usr/bin
$( LN) python$( PYTHON_VERSION) $( 1) /usr/bin/python3
$( LN) python$( PYTHON_VERSION) $( 1) /usr/bin/python
$( CP) $( PKG_INSTALL_DIR) /usr/lib/libpython$( PYTHON_VERSION) .so* $( 1) /usr/lib/
$( LN) python$( PYTHON3 _VERSION) $( 1) /usr/bin/python3
$( LN) python$( PYTHON3 _VERSION) $( 1) /usr/bin/python
$( CP) $( PKG_INSTALL_DIR) /usr/lib/libpython$( PYTHON3 _VERSION) .so* $( 1) /usr/lib/
e n d e f
Py3Package/python3-light/install : =: