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.
This commit is contained in:
parent
f8d9881f4e
commit
d1692f61bf
3 changed files with 37 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.30 2012/05/22 09:43:33 obache Exp $
|
||||
# $NetBSD: Makefile,v 1.31 2012/05/23 13:26:49 obache Exp $
|
||||
|
||||
DISTNAME= sip-4.13.2
|
||||
PKGNAME= ${PYPKGPREFIX}-${DISTNAME}
|
||||
|
@ -60,9 +60,6 @@ do-configure:
|
|||
(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
|
||||
${PYTHONBIN} configure.py ${CONFIGURE_ARGS})
|
||||
|
||||
post-install:
|
||||
${PY_COMPILE_ALL} ${DESTDIR}${PREFIX}/${PYSITELIB}/sipconfig.py
|
||||
|
||||
.include "../../lang/python/application.mk"
|
||||
.include "../../lang/python/extension.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
$NetBSD: distinfo,v 1.25 2012/05/22 09:43:33 obache Exp $
|
||||
$NetBSD: distinfo,v 1.26 2012/05/23 13:26:49 obache Exp $
|
||||
|
||||
SHA1 (sip-4.13.2.tar.gz) = 1c5df9182e8046f1c0d01603a2474fa2418bcea0
|
||||
RMD160 (sip-4.13.2.tar.gz) = 24a8e7c4bd36382594ea3f11317eb0f10e4e56ea
|
||||
Size (sip-4.13.2.tar.gz) = 733120 bytes
|
||||
SHA1 (patch-aa) = 72742d6608d13c1999961a2d36913b5e9d11fa50
|
||||
SHA1 (patch-aa) = 353f3c08b4eb27a329221ecfeec6feb0dca4b287
|
||||
SHA1 (patch-ab) = 044f78528dc67f7585c15b0fb3ec116ff11e31a6
|
||||
|
|
|
@ -1,8 +1,16 @@
|
|||
$NetBSD: patch-aa,v 1.5 2012/05/22 09:43:33 obache Exp $
|
||||
$NetBSD: patch-aa,v 1.6 2012/05/23 13:26:49 obache Exp $
|
||||
|
||||
--- configure.py.orig 2010-12-23 17:40:28.000000000 +0000
|
||||
--- configure.py.orig 2012-02-10 10:03:04.000000000 +0000
|
||||
+++ configure.py
|
||||
@@ -208,7 +208,7 @@ def set_platform_directories():
|
||||
@@ -19,6 +19,7 @@ import sys
|
||||
import os
|
||||
import glob
|
||||
import optparse
|
||||
+import imp
|
||||
from distutils import sysconfig
|
||||
|
||||
import siputils
|
||||
@@ -211,7 +212,7 @@ def set_platform_directories():
|
||||
|
||||
plat_py_lib_dir = lib_dir + "/config"
|
||||
plat_bin_dir = sys.exec_prefix + "/bin"
|
||||
|
@ -11,7 +19,7 @@ $NetBSD: patch-aa,v 1.5 2012/05/22 09:43:33 obache Exp $
|
|||
|
||||
|
||||
def patch_files():
|
||||
@@ -254,7 +254,7 @@ def create_config(module, template, macr
|
||||
@@ -264,7 +265,7 @@ def create_config(module, template, macr
|
||||
"sip_version": sip_version,
|
||||
"sip_version_str": sip_version_str,
|
||||
"platform": opts.platform,
|
||||
|
@ -20,3 +28,25 @@ $NetBSD: patch-aa,v 1.5 2012/05/22 09:43:33 obache Exp $
|
|||
"sip_inc_dir": opts.sipincdir,
|
||||
"sip_mod_dir": opts.sipmoddir,
|
||||
"default_bin_dir": plat_bin_dir,
|
||||
@@ -297,11 +298,19 @@ def create_makefiles(macros):
|
||||
|
||||
sipconfig.inform("Creating top level Makefile...")
|
||||
|
||||
+ pyc_file = "sipconfig.pyc"
|
||||
+ pyc_dir = cfg.sip_mod_dir
|
||||
+ try:
|
||||
+ pyc_file = imp.cache_from_source("sipconfig.py")
|
||||
+ pyc_dir = os.path.join(cfg.sip_mod_dir, "__pycache__")
|
||||
+ except AttributeError:
|
||||
+ pass
|
||||
+
|
||||
sipconfig.ParentMakefile(
|
||||
configuration=cfg,
|
||||
subdirs=["sipgen", "siplib"],
|
||||
- installs=(["sipconfig.py", os.path.join(src_dir, "sipdistutils.py")],
|
||||
- cfg.sip_mod_dir)
|
||||
+ installs=[(["sipconfig.py", os.path.join(src_dir, "sipdistutils.py")],
|
||||
+ cfg.sip_mod_dir), ([pyc_file], pyc_dir)]
|
||||
).generate()
|
||||
|
||||
sipconfig.inform("Creating sip code generator Makefile...")
|
||||
|
|
Loading…
Reference in a new issue