@ -1,5 +1,5 @@
#
# Copyright (C) 2006-2014 OpenWrt.org
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@ -12,7 +12,7 @@ include ./files/python-package.mk
PKG_NAME := python
PKG_VERSION := $( PYTHON_VERSION) .$( PYTHON_VERSION_MICRO)
PKG_RELEASE := 4
PKG_RELEASE := 5
PKG_SOURCE := Python-$( PKG_VERSION) .tar.xz
PKG_SOURCE_URL := http://www.python.org/ftp/python/$( PKG_VERSION)
@ -54,7 +54,7 @@ endef
d e f i n e P a c k a g e / p y t h o n - b a s e
$( call Package /python /Default )
TITLE:= Python $( PYTHON_VERSION) interpreter
DEPENDS:= +libpthread +zlib +libffi +libopenssl
DEPENDS:= +libpthread +zlib
e n d e f
d e f i n e P a c k a g e / p y t h o n - b a s e / d e s c r i p t i o n
@ -62,13 +62,44 @@ define Package/python-base/description
for the interpreter to start.
e n d e f
d e f i n e P a c k a g e / p y t h o n - l i g h t
$( call Package /python /Default )
TITLE:= Python $( PYTHON_VERSION) light installation
DEPENDS:= +python-base +libffi +libbz2
e n d e f
d e f i n e P a c k a g e / p y t h o n - l i g h t / d e s c r i p t i o n
This package is essentially the python-base package plus
a few of the rarely used ( and big) libraries stripped out
into separate packages.
e n d e f
# Define newline here, since it's not defined in OpenWRT
d e f i n e n e w l i n e
e n d e f
PYTHON_LIB_FILES_DEL :=
PYTHON_PACKAGES :=
d e f i n e P y B a s e P a c k a g e
PYTHON_PACKAGES += $( 1)
PYTHON_LIB_FILES_DEL += $( 2)
define PyPackage/$( 1) /filespec
$( subst $( space) ,$( newline) ,$( foreach lib_file,$( 2) ,+| $( lib_file) ) )
endef
e n d e f
i n c l u d e . / f i l e s / p y t h o n - p a c k a g e - * . m k
d e f i n e P a c k a g e / p y t h o n
$( call Package /python /Default )
DEPENDS:= +python-base +libncursesw +libbz2 +libgdbm +libsqlite3 +libexpat +libdb47
DEPENDS:= +python-light $( foreach package,$( PYTHON_PACKAGES) ,+$( package) )
e n d e f
d e f i n e P a c k a g e / p y t h o n / d e s c r i p t i o n
This package contains the ( almost) full Python install.
It' s python-light + all other packages.
e n d e f
MAKE_FLAGS += \
@ -124,31 +155,36 @@ define Build/InstallDev
$( 1) /usr/lib/python$( PYTHON_VERSION) /
e n d e f
PYTHON_BASE_LIB_FILES := \
/usr/lib/python$( PYTHON_VERSION) /_abcoll.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) /copy_reg.py \
/usr/lib/python$( PYTHON_VERSION) /genericpath.py \
/usr/lib/python$( PYTHON_VERSION) /linecache.py \
/usr/lib/python$( PYTHON_VERSION) /posixpath.py \
/usr/lib/python$( PYTHON_VERSION) /os.py \
/usr/lib/python$( PYTHON_VERSION) /re.py \
/usr/lib/python$( PYTHON_VERSION) /site.py \
/usr/lib/python$( PYTHON_VERSION) /sre_compile.py \
/usr/lib/python$( PYTHON_VERSION) /sre_constants.py \
/usr/lib/python$( PYTHON_VERSION) /sre_parse.py \
/usr/lib/python$( PYTHON_VERSION) /sysconfig.py \
/usr/lib/python$( PYTHON_VERSION) /stat.py \
/usr/lib/python$( PYTHON_VERSION) /traceback.py \
/usr/lib/python$( PYTHON_VERSION) /types.py \
/usr/lib/python$( PYTHON_VERSION) /UserDict.py \
/usr/lib/python$( PYTHON_VERSION) /warnings.py
PYTHON_BASE_LIB_FILES += $( PYTHON_BASE_LIB_FILES)
d e f i n e P y P a c k a g e / p y t h o n - 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 / l i b / p y t h o n $( PYTHON_VERSION ) / _ a b c o l l . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / _ s y s c o n f i g d a t a . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / _ w e a k r e f s e t . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / a b c . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / c o p y _ r e g . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / g e n e r i c p a t h . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / l i n e c a c h e . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / p o s i x p a t h . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / o s . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / r e . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / s i t e . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / s r e _ c o m p i l e . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / s r e _ c o n s t a n t s . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / s r e _ p a r s e . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / s y s c o n f i g . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / s t a t . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / t r a c e b a c k . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / t y p e s . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / U s e r D i c t . p y
+ | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / w a r n i n g s . p y
e n d e f
d e f i n e P y P a c k a g e / p y t h o n / f i l e s p e c
$( subst $ ( space ) ,$ ( newline ) ,$ ( foreach lib_file ,$ ( PYTHON_BASE_LIB_FILES ) ,+|$ ( lib_file ) ) )
e n d e f
d e f i n e P y P a c k a g e / p y t h o n - 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 ) / c o n f i g
- | / 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
@ -164,26 +200,7 @@ define PyPackage/python/filespec
- | / 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 ) / 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 ) / _ a b c o l l . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / _ s y s c o n f i g d a t a . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / _ w e a k r e f s e t . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / a b c . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / c o p y _ r e g . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / g e n e r i c p a t h . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / l i n e c a c h e . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / p o s i x p a t h . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / o s . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / r e . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / s i t e . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / s r e _ c o m p i l e . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / s r e _ c o n s t a n t s . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / s r e _ p a r s e . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / s y s c o n f i g . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / s t a t . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / t r a c e b a c k . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / t y p e s . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / U s e r D i c t . p y
- | / u s r / l i b / p y t h o n $( PYTHON_VERSION ) / w a r n i n g s . p y
$( subst $ ( space ) ,$ ( newline ) ,$ ( foreach lib_file ,$ ( PYTHON_LIB_FILES_DEL ) ,-|$ ( lib_file ) ) )
e n d e f
d e f i n e P y P a c k a g e / p y t h o n - b a s e / i n s t a l l
@ -192,6 +209,10 @@ define PyPackage/python-base/install
$( CP) $( PKG_INSTALL_DIR) /usr/lib/libpython$( PYTHON_VERSION) .so* $( 1) /usr/lib/
e n d e f
# Dummy rule so that the package gets picked up
d e f i n e P a c k a g e / p y t h o n / i n s t a l l
e n d e f
HOST_CFLAGS += \
-I/usr/include/ncursesw \
-I/usr/include/ncurses
@ -213,8 +234,15 @@ endef
$( eval $ ( call HostBuild ) )
$( foreach package , $ ( PYTHON_PACKAGES ) , \
$( eval $( call PyPackage,$( package) ) ) \
$( eval $( call BuildPackage,$( package) ) ) \
)
$( eval $ ( call PyPackage ,python -base ) )
$( eval $ ( call PyPackage ,python -light ) )
$( eval $ ( call PyPackage ,python ) )
$( eval $ ( call BuildPackage ,python -base ) )
$( eval $ ( call BuildPackage ,python -light ) )
$( eval $ ( call BuildPackage ,python ) )