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.

495 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 +libopenssl +libcrypto
  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 +libncursesw @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 +libncursesw
  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) -L$(PKG_BUILD_DIR)" \
  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. --enable-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).so* \
  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/_hashlib.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/_socket.so
  217. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/strop.so
  218. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_struct.so
  219. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/syslog.so
  220. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/time.so
  221. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/unicodedata.so
  222. -|/usr/lib/python$(PYTHON_VERSION)/linecache.py
  223. -|/usr/lib/python$(PYTHON_VERSION)/md5.py
  224. -|/usr/lib/python$(PYTHON_VERSION)/new.py
  225. -|/usr/lib/python$(PYTHON_VERSION)/opcode.py
  226. -|/usr/lib/python$(PYTHON_VERSION)/optparse.py
  227. -|/usr/lib/python$(PYTHON_VERSION)/os.py
  228. -|/usr/lib/python$(PYTHON_VERSION)/pickle.py
  229. -|/usr/lib/python$(PYTHON_VERSION)/pickle.py
  230. -|/usr/lib/python$(PYTHON_VERSION)/pkgutil.py
  231. -|/usr/lib/python$(PYTHON_VERSION)/popen2.py
  232. -|/usr/lib/python$(PYTHON_VERSION)/posixpath.py
  233. -|/usr/lib/python$(PYTHON_VERSION)/py_compile.py
  234. -|/usr/lib/python$(PYTHON_VERSION)/random.py
  235. -|/usr/lib/python$(PYTHON_VERSION)/repr.py
  236. -|/usr/lib/python$(PYTHON_VERSION)/re.py
  237. -|/usr/lib/python$(PYTHON_VERSION)/sha.py
  238. -|/usr/lib/python$(PYTHON_VERSION)/site.py
  239. -|/usr/lib/python$(PYTHON_VERSION)/socket.py
  240. -|/usr/lib/python$(PYTHON_VERSION)/sre_compile.py
  241. -|/usr/lib/python$(PYTHON_VERSION)/sre_constants.py
  242. -|/usr/lib/python$(PYTHON_VERSION)/sre_parse.py
  243. -|/usr/lib/python$(PYTHON_VERSION)/sre.py
  244. -|/usr/lib/python$(PYTHON_VERSION)/stat.py
  245. -|/usr/lib/python$(PYTHON_VERSION)/StringIO.py
  246. -|/usr/lib/python$(PYTHON_VERSION)/stringprep.py
  247. -|/usr/lib/python$(PYTHON_VERSION)/string.py
  248. -|/usr/lib/python$(PYTHON_VERSION)/struct.py
  249. -|/usr/lib/python$(PYTHON_VERSION)/subprocess.py
  250. -|/usr/lib/python$(PYTHON_VERSION)/tempfile.py
  251. -|/usr/lib/python$(PYTHON_VERSION)/textwrap.py
  252. -|/usr/lib/python$(PYTHON_VERSION)/tokenize.py
  253. -|/usr/lib/python$(PYTHON_VERSION)/token.py
  254. -|/usr/lib/python$(PYTHON_VERSION)/traceback.py
  255. -|/usr/lib/python$(PYTHON_VERSION)/types.py
  256. -|/usr/lib/python$(PYTHON_VERSION)/UserDict.py
  257. -|/usr/lib/python$(PYTHON_VERSION)/warnings.py
  258. -|/usr/lib/python$(PYTHON_VERSION)/weakref.py
  259. -|/usr/lib/python$(PYTHON_VERSION)/_weakrefset.py
  260. -|/usr/lib/python$(PYTHON_VERSION)/sysconfig.py
  261. -|/usr/lib/python$(PYTHON_VERSION)/functools.py
  262. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_functools.so
  263. -|/usr/lib/python$(PYTHON_VERSION)/collections.py
  264. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_collections.so
  265. -|/usr/lib/python$(PYTHON_VERSION)/keyword.py
  266. -|/usr/lib/python$(PYTHON_VERSION)/heapq.py
  267. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_heapq.so
  268. -|/usr/lib/python$(PYTHON_VERSION)/bisect.py
  269. -|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_bisect.so
  270. endef
  271. define PyPackage/python/filespec
  272. +|/usr/bin/python$(PYTHON_VERSION)
  273. +|/usr/lib/python$(PYTHON_VERSION)/__future__.py
  274. +|/usr/lib/python$(PYTHON_VERSION)/_abcoll.py
  275. +|/usr/lib/python$(PYTHON_VERSION)/abc.py
  276. +|/usr/lib/python$(PYTHON_VERSION)/codecs.py
  277. +|/usr/lib/python$(PYTHON_VERSION)/compileall.py
  278. +|/usr/lib/python$(PYTHON_VERSION)/ConfigParser.py
  279. +|/usr/lib/python$(PYTHON_VERSION)/copy.py
  280. +|/usr/lib/python$(PYTHON_VERSION)/copy_reg.py
  281. +|/usr/lib/python$(PYTHON_VERSION)/dis.py
  282. +|/usr/lib/python$(PYTHON_VERSION)/encodings
  283. +|/usr/lib/python$(PYTHON_VERSION)/fnmatch.py
  284. +|/usr/lib/python$(PYTHON_VERSION)/genericpath.py
  285. +|/usr/lib/python$(PYTHON_VERSION)/getopt.py
  286. +|/usr/lib/python$(PYTHON_VERSION)/glob.py
  287. +|/usr/lib/python$(PYTHON_VERSION)/hashlib.py
  288. +|/usr/lib/python$(PYTHON_VERSION)/inspect.py
  289. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/array.so
  290. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/binascii.so
  291. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/cStringIO.so
  292. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/fcntl.so
  293. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/grp.so
  294. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/itertools.so
  295. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/math.so
  296. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_hashlib.so
  297. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/operator.so
  298. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_random.so
  299. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/select.so
  300. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_socket.so
  301. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/strop.so
  302. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_struct.so
  303. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/syslog.so
  304. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/time.so
  305. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/unicodedata.so
  306. +|/usr/lib/python$(PYTHON_VERSION)/linecache.py
  307. +|/usr/lib/python$(PYTHON_VERSION)/md5.py
  308. +|/usr/lib/python$(PYTHON_VERSION)/new.py
  309. +|/usr/lib/python$(PYTHON_VERSION)/opcode.py
  310. +|/usr/lib/python$(PYTHON_VERSION)/optparse.py
  311. +|/usr/lib/python$(PYTHON_VERSION)/os.py
  312. +|/usr/lib/python$(PYTHON_VERSION)/pickle.py
  313. +|/usr/lib/python$(PYTHON_VERSION)/pickle.py
  314. +|/usr/lib/python$(PYTHON_VERSION)/pkgutil.py
  315. +|/usr/lib/python$(PYTHON_VERSION)/popen2.py
  316. +|/usr/lib/python$(PYTHON_VERSION)/posixpath.py
  317. +|/usr/lib/python$(PYTHON_VERSION)/py_compile.py
  318. +|/usr/lib/python$(PYTHON_VERSION)/random.py
  319. +|/usr/lib/python$(PYTHON_VERSION)/repr.py
  320. +|/usr/lib/python$(PYTHON_VERSION)/re.py
  321. +|/usr/lib/python$(PYTHON_VERSION)/sha.py
  322. +|/usr/lib/python$(PYTHON_VERSION)/site.py
  323. +|/usr/lib/python$(PYTHON_VERSION)/socket.py
  324. +|/usr/lib/python$(PYTHON_VERSION)/sre_compile.py
  325. +|/usr/lib/python$(PYTHON_VERSION)/sre_constants.py
  326. +|/usr/lib/python$(PYTHON_VERSION)/sre_parse.py
  327. +|/usr/lib/python$(PYTHON_VERSION)/sre.py
  328. +|/usr/lib/python$(PYTHON_VERSION)/stat.py
  329. +|/usr/lib/python$(PYTHON_VERSION)/StringIO.py
  330. +|/usr/lib/python$(PYTHON_VERSION)/stringprep.py
  331. +|/usr/lib/python$(PYTHON_VERSION)/string.py
  332. +|/usr/lib/python$(PYTHON_VERSION)/struct.py
  333. +|/usr/lib/python$(PYTHON_VERSION)/subprocess.py
  334. +|/usr/lib/python$(PYTHON_VERSION)/tempfile.py
  335. +|/usr/lib/python$(PYTHON_VERSION)/textwrap.py
  336. +|/usr/lib/python$(PYTHON_VERSION)/tokenize.py
  337. +|/usr/lib/python$(PYTHON_VERSION)/token.py
  338. +|/usr/lib/python$(PYTHON_VERSION)/traceback.py
  339. +|/usr/lib/python$(PYTHON_VERSION)/types.py
  340. +|/usr/lib/python$(PYTHON_VERSION)/UserDict.py
  341. +|/usr/lib/python$(PYTHON_VERSION)/warnings.py
  342. +|/usr/lib/python$(PYTHON_VERSION)/weakref.py
  343. +|/usr/lib/python$(PYTHON_VERSION)/_weakrefset.py
  344. +|/usr/lib/python$(PYTHON_VERSION)/config/Makefile
  345. +|/usr/lib/python$(PYTHON_VERSION)/sysconfig.py
  346. +|/usr/lib/python$(PYTHON_VERSION)/functools.py
  347. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_functools.so
  348. +|/usr/lib/python$(PYTHON_VERSION)/collections.py
  349. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_collections.so
  350. +|/usr/lib/python$(PYTHON_VERSION)/keyword.py
  351. +|/usr/lib/python$(PYTHON_VERSION)/heapq.py
  352. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_heapq.so
  353. +|/usr/lib/python$(PYTHON_VERSION)/bisect.py
  354. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_bisect.so
  355. endef
  356. define PyPackage/python/install
  357. $(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python
  358. $(LN) python$(PYTHON_VERSION) $(1)/usr/bin/python2
  359. $(CP) $(PKG_BUILD_DIR)/libpython$(PYTHON_VERSION).so* $(1)/usr/lib/
  360. endef
  361. define PyPackage/python-doc/filespec
  362. +|/usr/lib/python$(PYTHON_VERSION)/pydoc_data
  363. +|/usr/lib/python$(PYTHON_VERSION)/pydoc.py
  364. endef
  365. define PyPackage/python-bzip2/filespec
  366. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/bz2.so
  367. endef
  368. define PyPackage/python-expat/filespec
  369. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/pyexpat.so
  370. endef
  371. define PyPackage/python-gzip/filespec
  372. +|/usr/lib/python$(PYTHON_VERSION)/gzip.py
  373. endef
  374. define PyPackage/python-openssl/filespec
  375. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_ssl.so
  376. endef
  377. define PyPackage/python-shutil/filespec
  378. +|/usr/lib/python$(PYTHON_VERSION)/shutil.py
  379. endef
  380. define PyPackage/python-sqlite3/filespec
  381. +|/usr/lib/python$(PYTHON_VERSION)/sqlite3
  382. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_sqlite3.so
  383. endef
  384. define PyPackage/python-gdbm/filespec
  385. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/gdbm.so
  386. endef
  387. define PyPackage/python-readline/filespec
  388. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/readline.so
  389. endef
  390. define PyPackage/python-ncurses/filespec
  391. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_curses.so
  392. +|/usr/lib/python$(PYTHON_VERSION)/lib-dynload/_curses_panel.so
  393. endef
  394. define Host/Configure
  395. -$(MAKE) -C $(HOST_BUILD_DIR) distclean
  396. (cd $(HOST_BUILD_DIR); autoreconf --force --install || exit 0)
  397. (cd $(HOST_BUILD_DIR); \
  398. rm -rf config.cache; \
  399. CONFIG_SITE= \
  400. OPT="$(HOST_CFLAGS)" \
  401. ./configure \
  402. --without-cxx-main \
  403. --without-ensurepip \
  404. --without-pymalloc \
  405. --with-threads \
  406. --prefix=$(STAGING_DIR_HOST); \
  407. )
  408. endef
  409. define Host/Compile
  410. +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
  411. python Parser/pgen
  412. +$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR) \
  413. sharedmods
  414. endef
  415. define Host/Install
  416. $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
  417. $(MAKE) -C $(HOST_BUILD_DIR) \
  418. install
  419. $(INSTALL_BIN) $(HOST_BUILD_DIR)/Parser/pgen $(STAGING_DIR_HOST)/bin/pgen2
  420. endef
  421. $(eval $(call HostBuild))
  422. $(eval $(call PyPackage,python))
  423. $(eval $(call PyPackage,python-full))
  424. $(eval $(call PyPackage,python-doc))
  425. $(eval $(call PyPackage,python-bzip2))
  426. $(eval $(call PyPackage,python-expat))
  427. $(eval $(call PyPackage,python-gzip))
  428. $(eval $(call PyPackage,python-openssl))
  429. $(eval $(call PyPackage,python-shutil))
  430. $(eval $(call PyPackage,python-sqlite3))
  431. $(eval $(call PyPackage,python-gdbm))
  432. $(eval $(call PyPackage,python-readline))
  433. $(eval $(call PyPackage,python-ncurses))
  434. $(eval $(call BuildPackage,python))
  435. $(eval $(call BuildPackage,python-full))
  436. $(eval $(call BuildPackage,python-doc))
  437. $(eval $(call BuildPackage,python-bzip2))
  438. $(eval $(call BuildPackage,python-expat))
  439. $(eval $(call BuildPackage,python-gzip))
  440. $(eval $(call BuildPackage,python-openssl))
  441. $(eval $(call BuildPackage,python-shutil))
  442. $(eval $(call BuildPackage,python-sqlite3))
  443. $(eval $(call BuildPackage,python-gdbm))
  444. $(eval $(call BuildPackage,python-readline))
  445. $(eval $(call BuildPackage,python-ncurses))