pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/py-gobject py-gobject: Use PEP 3147 filenames



details:   https://anonhg.NetBSD.org/pkgsrc/rev/0a83ac366962
branches:  trunk
changeset: 316516:0a83ac366962
user:      adam <adam%pkgsrc.org@localhost>
date:      Fri Dec 14 12:37:21 2018 +0000

description:
py-gobject: Use PEP 3147 filenames

diffstat:

 devel/py-gobject/Makefile                 |   5 +-
 devel/py-gobject/distinfo                 |   3 +-
 devel/py-gobject/patches/patch-py-compile |  49 +++++++++++++++++++++++++++++++
 3 files changed, 53 insertions(+), 4 deletions(-)

diffs (89 lines):

diff -r b65759caf6a0 -r 0a83ac366962 devel/py-gobject/Makefile
--- a/devel/py-gobject/Makefile Fri Dec 14 12:25:15 2018 +0000
+++ b/devel/py-gobject/Makefile Fri Dec 14 12:37:21 2018 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.56 2018/01/23 11:23:13 adam Exp $
+# $NetBSD: Makefile,v 1.57 2018/12/14 12:37:21 adam Exp $
 
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME:S/^py//}
+PKGREVISION=   1
 
 DEPENDS+=      ${PYPKGPREFIX}-cairo-[0-9]*:../../graphics/py-cairo
 
@@ -28,8 +29,6 @@
 
 PYTHON_SELF_CONFLICT=  yes
 
-PY_PEP3147=    no
-
 BUILDLINK_API_DEPENDS.py-gobject-shared+=      py-gobject-shared>=${PKGVERSION_NOREV}
 
 CONFIGURE_ARGS+=       --disable-introspection
diff -r b65759caf6a0 -r 0a83ac366962 devel/py-gobject/distinfo
--- a/devel/py-gobject/distinfo Fri Dec 14 12:25:15 2018 +0000
+++ b/devel/py-gobject/distinfo Fri Dec 14 12:37:21 2018 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.27 2018/01/23 11:23:13 adam Exp $
+$NetBSD: distinfo,v 1.28 2018/12/14 12:37:21 adam Exp $
 
 SHA1 (pygobject-2.28.7.tar.xz) = 8e3cb8621c2e1d8dbeba5c3c007c7421b936a36c
 RMD160 (pygobject-2.28.7.tar.xz) = e9fea538da79ad27c42434d4a2173b3eb636408b
@@ -9,4 +9,5 @@
 SHA1 (patch-dsextras.py) = 9ebb5b418ef902acea227d6d84691285ce2d1863
 SHA1 (patch-glib_Makefile.in) = 859360e5f5df3095236b002129feb4ad85546373
 SHA1 (patch-gobject_Makefile.in) = fa97ba35a52b890a4e7e0c16fc0cac1b215c91c2
+SHA1 (patch-py-compile) = 01584ae9ff16d3b7e29c35eecb5bce6cbac1abcc
 SHA1 (patch-pygi_info.c) = cd2d0f0b16a84c05b805edec89d4508507811c49
diff -r b65759caf6a0 -r 0a83ac366962 devel/py-gobject/patches/patch-py-compile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/py-gobject/patches/patch-py-compile Fri Dec 14 12:37:21 2018 +0000
@@ -0,0 +1,49 @@
+$NetBSD: patch-py-compile,v 1.1 2018/12/14 12:37:22 adam Exp $
+
+Use PEP 3147 filenames (taken from py-gobject3).
+
+--- py-compile.orig    2018-12-14 12:21:40.000000000 +0000
++++ py-compile
+@@ -117,7 +116,7 @@ else
+ fi
+ 
+ $PYTHON -c "
+-import sys, os, py_compile
++import sys, os, py_compile, imp
+ 
+ files = '''$files'''
+ 
+@@ -130,12 +129,19 @@ for file in files.split():
+           continue
+     sys.stdout.write(file)
+     sys.stdout.flush()
+-    py_compile.compile(filepath, filepath + 'c', path)
++    if hasattr(imp, 'get_tag'):
++        py_compile.compile(filepath, imp.cache_from_source(filepath), path)
++    else:
++        py_compile.compile(filepath, filepath + 'c', path)
+ sys.stdout.write('\n')" || exit $?
+ 
+ # this will fail for python < 1.5, but that doesn't matter ...
+ $PYTHON -O -c "
+-import sys, os, py_compile
++import sys, os, py_compile, imp
++
++# pypy does not use .pyo optimization
++if hasattr(sys, 'pypy_translation_info'):
++    sys.exit(0)
+ 
+ files = '''$files'''
+ sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
+@@ -147,7 +153,10 @@ for file in files.split():
+           continue
+     sys.stdout.write(file)
+     sys.stdout.flush()
+-    py_compile.compile(filepath, filepath + 'o', path)
++    if hasattr(imp, 'get_tag'):
++        py_compile.compile(filepath, imp.cache_from_source(filepath, False), path)
++    else:
++        py_compile.compile(filepath, filepath + 'o', path)
+ sys.stdout.write('\n')" 2>/dev/null || :
+ 
+ # Local Variables:



Home | Main Index | Thread Index | Old Index