Files as a argment of compileall.py is only acceptable for python 2.7 and 3.2. Back to change generation of Makefile, and add some trick for PEP 3147.diff -r1.30 -r1.31 pkgsrc/x11/py-sip/Makefile
(obache)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.30 2012/05/22 09:43:33 obache Exp $ | 1 | # $NetBSD: Makefile,v 1.31 2012/05/23 13:26:49 obache Exp $ | |
2 | 2 | |||
3 | DISTNAME= sip-4.13.2 | 3 | DISTNAME= sip-4.13.2 | |
4 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME} | 4 | PKGNAME= ${PYPKGPREFIX}-${DISTNAME} | |
5 | CATEGORIES= x11 devel python | 5 | CATEGORIES= x11 devel python | |
6 | MASTER_SITES= http://www.riverbankcomputing.com/static/Downloads/sip4/ | 6 | MASTER_SITES= http://www.riverbankcomputing.com/static/Downloads/sip4/ | |
7 | 7 | |||
8 | MAINTAINER= pkgsrc-users@NetBSD.org | 8 | MAINTAINER= pkgsrc-users@NetBSD.org | |
9 | HOMEPAGE= http://www.riverbankcomputing.com/software/sip/intro | 9 | HOMEPAGE= http://www.riverbankcomputing.com/software/sip/intro | |
10 | COMMENT= Tool to create Python bindings for C++ libraries | 10 | COMMENT= Tool to create Python bindings for C++ libraries | |
11 | 11 | |||
12 | PKG_DESTDIR_SUPPORT= user-destdir | 12 | PKG_DESTDIR_SUPPORT= user-destdir | |
13 | 13 | |||
14 | PYTHON_VERSIONS_INCLUDE_3X= yes | 14 | PYTHON_VERSIONS_INCLUDE_3X= yes | |
@@ -50,19 +50,16 @@ CONFIGURE_ARGS+= LFLAGS_SHLIB="-shared - | @@ -50,19 +50,16 @@ CONFIGURE_ARGS+= LFLAGS_SHLIB="-shared - | |||
50 | CONFIGURE_ARGS+= LFLAGS_SHLIB="-shared" | 50 | CONFIGURE_ARGS+= LFLAGS_SHLIB="-shared" | |
51 | . endif | 51 | . endif | |
52 | .endif | 52 | .endif | |
53 | 53 | |||
54 | SUBST_CLASSES+= pyversfx | 54 | SUBST_CLASSES+= pyversfx | |
55 | SUBST_STAGE.pyversfx= pre-configure | 55 | SUBST_STAGE.pyversfx= pre-configure | |
56 | SUBST_FILES.pyversfx= sipgen/sipgen.sbf | 56 | SUBST_FILES.pyversfx= sipgen/sipgen.sbf | |
57 | SUBST_SED.pyversfx= -e "s|@PYVERSSUFFIX@|${PYVERSSUFFIX}|g" | 57 | SUBST_SED.pyversfx= -e "s|@PYVERSSUFFIX@|${PYVERSSUFFIX}|g" | |
58 | 58 | |||
59 | do-configure: | 59 | do-configure: | |
60 | (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ | 60 | (cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \ | |
61 | ${PYTHONBIN} configure.py ${CONFIGURE_ARGS}) | 61 | ${PYTHONBIN} configure.py ${CONFIGURE_ARGS}) | |
62 | 62 | |||
63 | post-install: | |||
64 | ${PY_COMPILE_ALL} ${DESTDIR}${PREFIX}/${PYSITELIB}/sipconfig.py | |||
65 | ||||
66 | .include "../../lang/python/application.mk" | 63 | .include "../../lang/python/application.mk" | |
67 | .include "../../lang/python/extension.mk" | 64 | .include "../../lang/python/extension.mk" | |
68 | .include "../../mk/bsd.pkg.mk" | 65 | .include "../../mk/bsd.pkg.mk" |
@@ -1,7 +1,7 @@ | @@ -1,7 +1,7 @@ | |||
1 | $NetBSD: distinfo,v 1.25 2012/05/22 09:43:33 obache Exp $ | 1 | $NetBSD: distinfo,v 1.26 2012/05/23 13:26:49 obache Exp $ | |
2 | 2 | |||
3 | SHA1 (sip-4.13.2.tar.gz) = 1c5df9182e8046f1c0d01603a2474fa2418bcea0 | 3 | SHA1 (sip-4.13.2.tar.gz) = 1c5df9182e8046f1c0d01603a2474fa2418bcea0 | |
4 | RMD160 (sip-4.13.2.tar.gz) = 24a8e7c4bd36382594ea3f11317eb0f10e4e56ea | 4 | RMD160 (sip-4.13.2.tar.gz) = 24a8e7c4bd36382594ea3f11317eb0f10e4e56ea | |
5 | Size (sip-4.13.2.tar.gz) = 733120 bytes | 5 | Size (sip-4.13.2.tar.gz) = 733120 bytes | |
6 | SHA1 (patch-aa) = 72742d6608d13c1999961a2d36913b5e9d11fa50 | 6 | SHA1 (patch-aa) = 353f3c08b4eb27a329221ecfeec6feb0dca4b287 | |
7 | SHA1 (patch-ab) = 044f78528dc67f7585c15b0fb3ec116ff11e31a6 | 7 | SHA1 (patch-ab) = 044f78528dc67f7585c15b0fb3ec116ff11e31a6 |
@@ -1,22 +1,52 @@ | @@ -1,22 +1,52 @@ | |||
1 | $NetBSD: patch-aa,v 1.5 2012/05/22 09:43:33 obache Exp $ | 1 | $NetBSD: patch-aa,v 1.6 2012/05/23 13:26:49 obache Exp $ | |
2 | 2 | |||
3 | --- configure.py.orig 2010-12-23 17:40:28.000000000 +0000 | 3 | --- configure.py.orig 2012-02-10 10:03:04.000000000 +0000 | |
4 | +++ configure.py | 4 | +++ configure.py | |
5 | @@ -208,7 +208,7 @@ def set_platform_directories(): | 5 | @@ -19,6 +19,7 @@ import sys | |
6 | import os | |||
7 | import glob | |||
8 | import optparse | |||
9 | +import imp | |||
10 | from distutils import sysconfig | |||
11 | ||||
12 | import siputils | |||
13 | @@ -211,7 +212,7 @@ def set_platform_directories(): | |||
6 | 14 | |||
7 | plat_py_lib_dir = lib_dir + "/config" | 15 | plat_py_lib_dir = lib_dir + "/config" | |
8 | plat_bin_dir = sys.exec_prefix + "/bin" | 16 | plat_bin_dir = sys.exec_prefix + "/bin" | |
9 | - plat_sip_dir = sys.prefix + "/share/sip" | 17 | - plat_sip_dir = sys.prefix + "/share/sip" | |
10 | + plat_sip_dir = sys.prefix + "/share/sip%s" % sys.version[0:3] | 18 | + plat_sip_dir = sys.prefix + "/share/sip%s" % sys.version[0:3] | |
11 | 19 | |||
12 | 20 | |||
13 | def patch_files(): | 21 | def patch_files(): | |
14 | @@ -254,7 +254,7 @@ def create_config(module, template, macr | 22 | @@ -264,7 +265,7 @@ def create_config(module, template, macr | |
15 | "sip_version": sip_version, | 23 | "sip_version": sip_version, | |
16 | "sip_version_str": sip_version_str, | 24 | "sip_version_str": sip_version_str, | |
17 | "platform": opts.platform, | 25 | "platform": opts.platform, | |
18 | - "sip_bin": os.path.join(opts.sipbindir, "sip"), | 26 | - "sip_bin": os.path.join(opts.sipbindir, "sip"), | |
19 | + "sip_bin": os.path.join(opts.sipbindir, "sip%s" % sys.version[0:3]), | 27 | + "sip_bin": os.path.join(opts.sipbindir, "sip%s" % sys.version[0:3]), | |
20 | "sip_inc_dir": opts.sipincdir, | 28 | "sip_inc_dir": opts.sipincdir, | |
21 | "sip_mod_dir": opts.sipmoddir, | 29 | "sip_mod_dir": opts.sipmoddir, | |
22 | "default_bin_dir": plat_bin_dir, | 30 | "default_bin_dir": plat_bin_dir, | |
31 | @@ -297,11 +298,19 @@ def create_makefiles(macros): | |||
32 | ||||
33 | sipconfig.inform("Creating top level Makefile...") | |||
34 | ||||
35 | + pyc_file = "sipconfig.pyc" | |||
36 | + pyc_dir = cfg.sip_mod_dir | |||
37 | + try: | |||
38 | + pyc_file = imp.cache_from_source("sipconfig.py") | |||
39 | + pyc_dir = os.path.join(cfg.sip_mod_dir, "__pycache__") | |||
40 | + except AttributeError: | |||
41 | + pass | |||
42 | + | |||
43 | sipconfig.ParentMakefile( | |||
44 | configuration=cfg, | |||
45 | subdirs=["sipgen", "siplib"], | |||
46 | - installs=(["sipconfig.py", os.path.join(src_dir, "sipdistutils.py")], | |||
47 | - cfg.sip_mod_dir) | |||
48 | + installs=[(["sipconfig.py", os.path.join(src_dir, "sipdistutils.py")], | |||
49 | + cfg.sip_mod_dir), ([pyc_file], pyc_dir)] | |||
50 | ).generate() | |||
51 | ||||
52 | sipconfig.inform("Creating sip code generator Makefile...") |