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