You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

501 lines
18 KiB

  1. #
  2. # Copyright (C) 2006-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. # The file included below defines PYTHON_VERSION
  9. include ./files/python-package.mk
  10. PKG_NAME:=python
  11. PKG_VERSION:=$(PYTHON_VERSION).$(PYTHON_VERSION_MICRO)
  12. PKG_RELEASE:=3
  13. PKG_SOURCE:=Python-$(PKG_VERSION).tar.xz
  14. PKG_SOURCE_URL:=http://www.python.org/ftp/python/$(PKG_VERSION)
  15. PKG_MD5SUM:=d235bdfa75b8396942e360a70487ee00
  16. PKG_LICENSE:=PSF
  17. PKG_LICENSE_FILES:=LICENSE Modules/_ctypes/libffi_msvc/LICENSE Modules/_ctypes/darwin/LICENSE Modules/_ctypes/libffi/LICENSE Modules/_ctypes/libffi_osx/LICENSE Tools/pybench/LICENSE
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. HOST_BUILD_PARALLEL:=1
  21. PKG_BUILD_DIR:=$(BUILD_DIR)/Python-$(PKG_VERSION)
  22. HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/Python-$(PKG_VERSION)
  23. PKG_BUILD_DEPENDS:=python/host
  24. include $(INCLUDE_DIR)/host-build.mk
  25. include $(INCLUDE_DIR)/package.mk
  26. define Package/python/Default
  27. SUBMENU:=Python
  28. SECTION:=lang
  29. CATEGORY:=Languages
  30. TITLE:=Python $(PYTHON_VERSION) programming language
  31. URL:=http://www.python.org/
  32. MAINTAINER:=Alexandru Ardelean <ardeleanalex@gmail.com>
  33. endef
  34. define Package/python/Default/description
  35. Python is a dynamic object-oriented programming language that can be used
  36. for many kinds of software development. It offers strong support for
  37. integration with other languages and tools, comes with extensive standard
  38. libraries, and can be learned in a few days. Many Python programmers
  39. report substantial productivity gains and feel the language encourages
  40. the development of higher quality, more maintainable code.
  41. endef
  42. define Package/python
  43. $(call Package/python/Default)
  44. DEPENDS:=+libpthread +zlib +libffi
  45. endef
  46. define Package/python/description
  47. $(call Package/python/Default/description)
  48. .
  49. This package contains only a minimal Python install.
  50. endef
  51. define Package/python-full
  52. $(call Package/python/Default)
  53. TITLE+= (full)
  54. DEPENDS:=@PACKAGE_python +PACKAGE_python:python
  55. endef
  56. define Package/python-full/description
  57. $(call Package/python/Default/description)
  58. .
  59. This package contains the full Python install.
  60. endef
  61. define Package/python-doc
  62. $(call Package/python/Default)
  63. TITLE:=Python interactive documentation
  64. DEPENDS:=@PACKAGE_python +PACKAGE_python:python
  65. endef
  66. define Package/python-bzip2
  67. $(call Package/python/Default)
  68. TITLE:=Python support for Bzip2
  69. DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libbz2
  70. endef
  71. define Package/python-expat
  72. $(call Package/python/Default)
  73. TITLE:=Python support for expat
  74. DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libexpat
  75. endef
  76. define Package/python-gzip
  77. $(call Package/python/Default)
  78. TITLE:=Python support for gzip
  79. DEPENDS:=@PACKAGE_python +PACKAGE_python:python
  80. endef
  81. define Package/python-openssl
  82. $(call Package/python/Default)
  83. TITLE:=Python support for OpenSSL
  84. DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libopenssl
  85. endef
  86. define Package/python-shutil
  87. $(call Package/python/Default)
  88. TITLE:=Python support for shutil
  89. DEPENDS:=@PACKAGE_python +PACKAGE_python:python
  90. endef
  91. # Needs datetime
  92. define Package/python-sqlite3
  93. $(call Package/python/Default)
  94. TITLE:=Python support for sqlite3
  95. DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libsqlite3
  96. endef
  97. define Package/python-gdbm
  98. $(call Package/python/Default)
  99. TITLE:=Python support for gdbm
  100. DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libgdbm
  101. endef
  102. define Package/python-readline
  103. $(call Package/python/Default)
  104. TITLE:=Python support for readline
  105. DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libreadline +libncurses @BROKEN
  106. endef
  107. define Package/python-ncurses
  108. $(call Package/python/Default)
  109. TITLE:=Python support for readline
  110. DEPENDS:=@PACKAGE_python +PACKAGE_python:python +libncurses
  111. endef
  112. MAKE_FLAGS:=\
  113. $(TARGET_CONFIGURE_OPTS) \
  114. DESTDIR="$(PKG_INSTALL_DIR)" \
  115. CROSS_COMPILE=yes \
  116. CFLAGS="$(TARGET_CFLAGS) -DNDEBUG -fno-inline" \
  117. LDFLAGS="$(TARGET_LDFLAGS)" \
  118. LD="$(TARGET_CC)" \
  119. PGEN=pgen2
  120. ENABLE_IPV6:=
  121. ifeq ($(CONFIG_IPV6),y)
  122. ENABLE_IPV6 += --enable-ipv6
  123. endif
  124. define Build/Configure
  125. -$(MAKE) -C $(PKG_BUILD_DIR) distclean
  126. (cd $(PKG_BUILD_DIR); autoreconf --force --install || exit 0)
  127. $(CP) ./files/config.site $(PKG_BUILD_DIR)
  128. $(call Build/Configure/Default, \
  129. --sysconfdir=/etc \
  130. --disable-shared \
  131. --without-cxx-main \
  132. --with-threads \
  133. --with-system-ffi="$(STAGING_DIR)/usr" \
  134. --without-ensurepip \
  135. --without-pymalloc \
  136. $(ENABLE_IPV6) \
  137. CONFIG_SITE="$(PKG_BUILD_DIR)/config.site" \
  138. OPT="$(TARGET_CFLAGS)" \
  139. )
  140. endef
  141. define Build/InstallDev
  142. $(INSTALL_DIR) $(2)/bin $(1)/usr/bin $(1)/usr/include $(1)/usr/lib
  143. $(INSTALL_DIR) $(STAGING_DIR)/mk/
  144. $(INSTALL_DATA) ./files/python-package.mk $(STAGING_DIR)/mk/
  145. $(CP) \
  146. $(PKG_INSTALL_DIR)/usr/include/python$(PYTHON_VERSION) \
  147. $(1)/usr/include/
  148. $(CP) \
  149. $(STAGING_DIR_HOST)/lib/python$(PYTHON_VERSION) \
  150. $(PKG_BUILD_DIR)/libpython$(PYTHON_VERSION).a \
  151. $(1)/usr/lib/
  152. $(CP) \
  153. $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON_VERSION)/config \
  154. $(1)/usr/lib/python$(PYTHON_VERSION)/
  155. $(CP) \
  156. $(STAGING_DIR_HOST)/bin/python$(PYTHON_VERSION)-config \
  157. $(2)/bin/
  158. $(SED) 's,^#!.*,#!/usr/bin/env python$(PYTHON_VERSION),g' $(2)/bin/python$(PYTHON_VERSION)-config
  159. endef
  160. define PyPackage/python-full/filespec
  161. +|/usr/lib/python$(PYTHON_VERSION)
  162. -|/usr/lib/python$(PYTHON_VERSION)/bsddb/test
  163. -|/usr/lib/python$(PYTHON_VERSION)/config
  164. -|/usr/lib/python$(PYTHON_VERSION)/ctypes/test
  165. -|/usr/lib/python$(PYTHON_VERSION)/distutils/command/wininst-*.exe
  166. -|/usr/lib/python$(PYTHON_VERSION)/distutils/tests
  167. -|/usr/lib/python$(PYTHON_VERSION)/email/test
  168. -|/usr/lib/python$(PYTHON_VERSION)/idlelib
  169. -|/usr/lib/python$(PYTHON_VERSION)/json/tests
  170. -|/usr/lib/python$(PYTHON_VERSION)/lib-tk
  171. -|/usr/lib/python$(PYTHON_VERSION)/sqlite3
  172. -|/usr/lib/python$(PYTHON_VERSION)/test
  173. -|/usr/lib/python$(PYTHON_VERSION)/lib2to3
  174. -|/usr/lib/python$(PYTHON_VERSION)/lib-old
  175. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/bz2.so
  176. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/gdbm.so
  177. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sqlite3.so
  178. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ssl.so
  179. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/pyexpat.so
  180. -|/usr/lib/python$(PYTHON_VERSION)/pydoc_data
  181. -|/usr/lib/python$(PYTHON_VERSION)/pydoc.py
  182. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ctypes_test.so
  183. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_testcapi.so
  184. -|/usr/lib/python$(PYTHON_VERSION)/__future__.py
  185. -|/usr/lib/python$(PYTHON_VERSION)/_abcoll.py
  186. -|/usr/lib/python$(PYTHON_VERSION)/abc.py
  187. -|/usr/lib/python$(PYTHON_VERSION)/codecs.py
  188. -|/usr/lib/python$(PYTHON_VERSION)/compileall.py
  189. -|/usr/lib/python$(PYTHON_VERSION)/ConfigParser.py
  190. -|/usr/lib/python$(PYTHON_VERSION)/copy.py
  191. -|/usr/lib/python$(PYTHON_VERSION)/copy_reg.py
  192. -|/usr/lib/python$(PYTHON_VERSION)/dis.py
  193. -|/usr/lib/python$(PYTHON_VERSION)/encodings
  194. -|/usr/lib/python$(PYTHON_VERSION)/fnmatch.py
  195. -|/usr/lib/python$(PYTHON_VERSION)/genericpath.py
  196. -|/usr/lib/python$(PYTHON_VERSION)/getopt.py
  197. -|/usr/lib/python$(PYTHON_VERSION)/glob.py
  198. -|/usr/lib/python$(PYTHON_VERSION)/hashlib.py
  199. -|/usr/lib/python$(PYTHON_VERSION)/inspect.py
  200. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/array.so
  201. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/binascii.so
  202. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/cStringIO.so
  203. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_curses.so
  204. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_curses_panel.so
  205. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/dbm.so
  206. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_bsddb.so
  207. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/fcntl.so
  208. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/grp.so
  209. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/itertools.so
  210. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/math.so
  211. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_md5.so
  212. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/operator.so
  213. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_random.so
  214. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/readline.so
  215. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/select.so
  216. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha.so
  217. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha256.so
  218. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha512.so
  219. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_socket.so
  220. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/strop.so
  221. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_struct.so
  222. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/syslog.so
  223. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/time.so
  224. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/unicodedata.so
  225. -|/usr/lib/python$(PYTHON_VERSION)/linecache.py
  226. -|/usr/lib/python$(PYTHON_VERSION)/md5.py
  227. -|/usr/lib/python$(PYTHON_VERSION)/new.py
  228. -|/usr/lib/python$(PYTHON_VERSION)/opcode.py
  229. -|/usr/lib/python$(PYTHON_VERSION)/optparse.py
  230. -|/usr/lib/python$(PYTHON_VERSION)/os.py
  231. -|/usr/lib/python$(PYTHON_VERSION)/pickle.py
  232. -|/usr/lib/python$(PYTHON_VERSION)/pickle.py
  233. -|/usr/lib/python$(PYTHON_VERSION)/pkgutil.py
  234. -|/usr/lib/python$(PYTHON_VERSION)/popen2.py
  235. -|/usr/lib/python$(PYTHON_VERSION)/posixpath.py
  236. -|/usr/lib/python$(PYTHON_VERSION)/py_compile.py
  237. -|/usr/lib/python$(PYTHON_VERSION)/random.py
  238. -|/usr/lib/python$(PYTHON_VERSION)/repr.py
  239. -|/usr/lib/python$(PYTHON_VERSION)/re.py
  240. -|/usr/lib/python$(PYTHON_VERSION)/sha.py
  241. -|/usr/lib/python$(PYTHON_VERSION)/site.py
  242. -|/usr/lib/python$(PYTHON_VERSION)/socket.py
  243. -|/usr/lib/python$(PYTHON_VERSION)/sre_compile.py
  244. -|/usr/lib/python$(PYTHON_VERSION)/sre_constants.py
  245. -|/usr/lib/python$(PYTHON_VERSION)/sre_parse.py
  246. -|/usr/lib/python$(PYTHON_VERSION)/sre.py
  247. -|/usr/lib/python$(PYTHON_VERSION)/stat.py
  248. -|/usr/lib/python$(PYTHON_VERSION)/StringIO.py
  249. -|/usr/lib/python$(PYTHON_VERSION)/stringprep.py
  250. -|/usr/lib/python$(PYTHON_VERSION)/string.py
  251. -|/usr/lib/python$(PYTHON_VERSION)/struct.py
  252. -|/usr/lib/python$(PYTHON_VERSION)/subprocess.py
  253. -|/usr/lib/python$(PYTHON_VERSION)/tempfile.py
  254. -|/usr/lib/python$(PYTHON_VERSION)/textwrap.py
  255. -|/usr/lib/python$(PYTHON_VERSION)/tokenize.py
  256. -|/usr/lib/python$(PYTHON_VERSION)/token.py
  257. -|/usr/lib/python$(PYTHON_VERSION)/traceback.py
  258. -|/usr/lib/python$(PYTHON_VERSION)/types.py
  259. -|/usr/lib/python$(PYTHON_VERSION)/UserDict.py
  260. -|/usr/lib/python$(PYTHON_VERSION)/warnings.py
  261. -|/usr/lib/python$(PYTHON_VERSION)/weakref.py
  262. -|/usr/lib/python$(PYTHON_VERSION)/_weakrefset.py
  263. -|/usr/lib/python$(PYTHON_VERSION)/sysconfig.py
  264. -|/usr/lib/python$(PYTHON_VERSION)/functools.py
  265. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_functools.so
  266. -|/usr/lib/python$(PYTHON_VERSION)/collections.py
  267. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_collections.so
  268. -|/usr/lib/python$(PYTHON_VERSION)/keyword.py
  269. -|/usr/lib/python$(PYTHON_VERSION)/heapq.py
  270. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_heapq.so
  271. -|/usr/lib/python$(PYTHON_VERSION)/bisect.py
  272. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_bisect.so
  273. endef
  274. define PyPackage/python/filespec
  275. +|/usr/bin/python$(PYTHON_VERSION)
  276. +|/usr/lib/python$(PYTHON_VERSION)/__future__.py
  277. +|/usr/lib/python$(PYTHON_VERSION)/_abcoll.py
  278. +|/usr/lib/python$(PYTHON_VERSION)/abc.py
  279. +|/usr/lib/python$(PYTHON_VERSION)/codecs.py
  280. +|/usr/lib/python$(PYTHON_VERSION)/compileall.py
  281. +|/usr/lib/python$(PYTHON_VERSION)/ConfigParser.py
  282. +|/usr/lib/python$(PYTHON_VERSION)/copy.py
  283. +|/usr/lib/python$(PYTHON_VERSION)/copy_reg.py
  284. +|/usr/lib/python$(PYTHON_VERSION)/dis.py
  285. +|/usr/lib/python$(PYTHON_VERSION)/encodings
  286. +|/usr/lib/python$(PYTHON_VERSION)/fnmatch.py
  287. +|/usr/lib/python$(PYTHON_VERSION)/genericpath.py
  288. +|/usr/lib/python$(PYTHON_VERSION)/getopt.py
  289. +|/usr/lib/python$(PYTHON_VERSION)/glob.py
  290. +|/usr/lib/python$(PYTHON_VERSION)/hashlib.py
  291. +|/usr/lib/python$(PYTHON_VERSION)/inspect.py
  292. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/array.so
  293. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/binascii.so
  294. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/cStringIO.so
  295. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/fcntl.so
  296. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/grp.so
  297. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/itertools.so
  298. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/math.so
  299. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_md5.so
  300. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/operator.so
  301. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_random.so
  302. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/select.so
  303. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha.so
  304. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha256.so
  305. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sha512.so
  306. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_socket.so
  307. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/strop.so
  308. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_struct.so
  309. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/syslog.so
  310. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/time.so
  311. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/unicodedata.so
  312. +|/usr/lib/python$(PYTHON_VERSION)/linecache.py
  313. +|/usr/lib/python$(PYTHON_VERSION)/md5.py
  314. +|/usr/lib/python$(PYTHON_VERSION)/new.py
  315. +|/usr/lib/python$(PYTHON_VERSION)/opcode.py
  316. +|/usr/lib/python$(PYTHON_VERSION)/optparse.py
  317. +|/usr/lib/python$(PYTHON_VERSION)/os.py
  318. +|/usr/lib/python$(PYTHON_VERSION)/pickle.py
  319. +|/usr/lib/python$(PYTHON_VERSION)/pickle.py
  320. +|/usr/lib/python$(PYTHON_VERSION)/pkgutil.py
  321. +|/usr/lib/python$(PYTHON_VERSION)/popen2.py
  322. +|/usr/lib/python$(PYTHON_VERSION)/posixpath.py
  323. +|/usr/lib/python$(PYTHON_VERSION)/py_compile.py
  324. +|/usr/lib/python$(PYTHON_VERSION)/random.py
  325. +|/usr/lib/python$(PYTHON_VERSION)/repr.py
  326. +|/usr/lib/python$(PYTHON_VERSION)/re.py
  327. +|/usr/lib/python$(PYTHON_VERSION)/sha.py
  328. +|/usr/lib/python$(PYTHON_VERSION)/site.py
  329. +|/usr/lib/python$(PYTHON_VERSION)/socket.py
  330. +|/usr/lib/python$(PYTHON_VERSION)/sre_compile.py
  331. +|/usr/lib/python$(PYTHON_VERSION)/sre_constants.py
  332. +|/usr/lib/python$(PYTHON_VERSION)/sre_parse.py
  333. +|/usr/lib/python$(PYTHON_VERSION)/sre.py
  334. +|/usr/lib/python$(PYTHON_VERSION)/stat.py
  335. +|/usr/lib/python$(PYTHON_VERSION)/StringIO.py
  336. +|/usr/lib/python$(PYTHON_VERSION)/stringprep.py
  337. +|/usr/lib/python$(PYTHON_VERSION)/string.py
  338. +|/usr/lib/python$(PYTHON_VERSION)/struct.py
  339. +|/usr/lib/python$(PYTHON_VERSION)/subprocess.py
  340. +|/usr/lib/python$(PYTHON_VERSION)/tempfile.py
  341. +|/usr/lib/python$(PYTHON_VERSION)/textwrap.py
  342. +|/usr/lib/python$(PYTHON_VERSION)/tokenize.py
  343. +|/usr/lib/python$(PYTHON_VERSION)/token.py
  344. +|/usr/lib/python$(PYTHON_VERSION)/traceback.py
  345. +|/usr/lib/python$(PYTHON_VERSION)/types.py
  346. +|/usr/lib/python$(PYTHON_VERSION)/UserDict.py
  347. +|/usr/lib/python$(PYTHON_VERSION)/warnings.py
  348. +|/usr/lib/python$(PYTHON_VERSION)/weakref.py
  349. +|/usr/lib/python$(PYTHON_VERSION)/_weakrefset.py
  350. +|/usr/lib/python$(PYTHON_VERSION)/config/Makefile
  351. +|/usr/lib/python$(PYTHON_VERSION)/sysconfig.py
  352. +|/usr/lib/python$(PYTHON_VERSION)/functools.py
  353. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_functools.so
  354. +|/usr/lib/python$(PYTHON_VERSION)/collections.py
  355. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_collections.so
  356. +|/usr/lib/python$(PYTHON_VERSION)/keyword.py
  357. +|/usr/lib/python$(PYTHON_VERSION)/heapq.py
  358. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_heapq.so
  359. +|/usr/lib/python$(PYTHON_VERSION)/bisect.py
  360. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_bisect.so
  361. +|/usr/include/python$(PYTHON_VERSION)/pyconfig.h
  362. endef
  363. define PyPackage/python/install
  364. $(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python
  365. $(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python2
  366. endef
  367. define PyPackage/python-doc/filespec
  368. +|/usr/lib/python$(PYTHON_VERSION)/pydoc_data
  369. +|/usr/lib/python$(PYTHON_VERSION)/pydoc.py
  370. endef
  371. define PyPackage/python-bzip2/filespec
  372. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/bz2.so
  373. endef
  374. define PyPackage/python-expat/filespec
  375. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/pyexpat.so
  376. endef
  377. define PyPackage/python-gzip/filespec
  378. +|/usr/lib/python$(PYTHON_VERSION)/gzip.py
  379. endef
  380. define PyPackage/python-openssl/filespec
  381. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ssl.so
  382. endef
  383. define PyPackage/python-shutil/filespec
  384. +|/usr/lib/python$(PYTHON_VERSION)/shutil.py
  385. endef
  386. define PyPackage/python-sqlite3/filespec
  387. +|/usr/lib/python$(PYTHON_VERSION)/sqlite3
  388. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sqlite3.so
  389. endef
  390. define PyPackage/python-gdbm/filespec
  391. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/gdbm.so
  392. endef
  393. define PyPackage/python-readline/filespec
  394. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/readline.so
  395. endef
  396. define PyPackage/python-ncurses/filespec
  397. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_curses.so
  398. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_curses_panel.so
  399. endef
  400. define Host/Configure
  401. -$(MAKE) -C $(HOST_BUILD_DIR) distclean
  402. (cd $(HOST_BUILD_DIR); autoreconf --force --install || exit 0)
  403. (cd $(HOST_BUILD_DIR); \
  404. rm -rf config.cache; \
  405. CONFIG_SITE= \
  406. OPT="$(HOST_CFLAGS)" \
  407. ./configure \
  408. --without-cxx-main \
  409. --without-ensurepip \
  410. --without-pymalloc \
  411. --with-threads \
  412. --prefix=$(STAGING_DIR_HOST); \
  413. )
  414. endef
  415. define Host/Compile
  416. +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
  417. python Parser/pgen
  418. +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
  419. sharedmods
  420. endef
  421. define Host/Install
  422. $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
  423. $(MAKE) -C $(HOST_BUILD_DIR) \
  424. install
  425. $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/pgen2
  426. endef
  427. $(eval $(call HostBuild))
  428. $(eval $(call PyPackage,python))
  429. $(eval $(call PyPackage,python-full))
  430. $(eval $(call PyPackage,python-doc))
  431. $(eval $(call PyPackage,python-bzip2))
  432. $(eval $(call PyPackage,python-expat))
  433. $(eval $(call PyPackage,python-gzip))
  434. $(eval $(call PyPackage,python-openssl))
  435. $(eval $(call PyPackage,python-shutil))
  436. $(eval $(call PyPackage,python-sqlite3))
  437. $(eval $(call PyPackage,python-gdbm))
  438. $(eval $(call PyPackage,python-readline))
  439. $(eval $(call PyPackage,python-ncurses))
  440. $(eval $(call BuildPackage,python))
  441. $(eval $(call BuildPackage,python-full))
  442. $(eval $(call BuildPackage,python-doc))
  443. $(eval $(call BuildPackage,python-bzip2))
  444. $(eval $(call BuildPackage,python-expat))
  445. $(eval $(call BuildPackage,python-gzip))
  446. $(eval $(call BuildPackage,python-openssl))
  447. $(eval $(call BuildPackage,python-shutil))
  448. $(eval $(call BuildPackage,python-sqlite3))
  449. $(eval $(call BuildPackage,python-gdbm))
  450. $(eval $(call BuildPackage,python-readline))
  451. $(eval $(call BuildPackage,python-ncurses))