Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Jul 2012 19:08:21 +0000 (UTC)
From:      Marcus von Appen <mva@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r301025 - in head/lang/pypy: . files
Message-ID:  <201207171908.q6HJ8La4084547@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mva
Date: Tue Jul 17 19:08:21 2012
New Revision: 301025
URL: http://svn.freebsd.org/changeset/ports/301025

Log:
  - Fix site-packages path
  
  Discussed with:	David Naylor <naylor.b.david@gmail.com>
  Approved by:	David Naylor <naylor.b.david@gmail.com>
  Obtained from:	https://github.com/DragonSA/pypy/tree/fix-1.9-2

Added:
  head/lang/pypy/files/patch-lib__pypy1.9__distutils__command__install.py   (contents, props changed)
  head/lang/pypy/files/patch-lib__pypy1.9__distutils__sysconfig_pypy.py   (contents, props changed)
  head/lang/pypy/files/patch-lib__pypy1.9__sysconfig.py   (contents, props changed)
Modified:
  head/lang/pypy/Makefile   (contents, props changed)
  head/lang/pypy/pkg-plist   (contents, props changed)

Modified: head/lang/pypy/Makefile
==============================================================================
--- head/lang/pypy/Makefile	Tue Jul 17 18:48:09 2012	(r301024)
+++ head/lang/pypy/Makefile	Tue Jul 17 19:08:21 2012	(r301025)
@@ -7,6 +7,7 @@
 
 PORTNAME=	pypy
 DISTVERSION=	1.9
+PORTREVISION=	1
 CATEGORIES=	lang python java
 MASTER_SITES=	https://bitbucket.org/pypy/pypy/get/
 DISTNAME=	release-${DISTVERSION}
@@ -203,6 +204,9 @@ post-extract:
 	${MV} ${WRKSRC}/lib-python/${PYTHON_IMPL_VER} ${WRKSRC}/${PYPY_LIBDIR}
 	${MV} ${WRKSRC}/lib_pypy ${WRKSRC}/${PYPY_LIBDIR}/
 
+post-patch:
+	${FIND} ${WRKSRC}/lib -name '*.orig' -delete
+
 do-configure:
 	${SED} -e 's|%%PREFIX%%|${PREFIX}|g' \
 		-e 's|%%PYPY_NAMES%%|${PYPY_NAMES}|g' \

Added: head/lang/pypy/files/patch-lib__pypy1.9__distutils__command__install.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/pypy/files/patch-lib__pypy1.9__distutils__command__install.py	Tue Jul 17 19:08:21 2012	(r301025)
@@ -0,0 +1,33 @@
+--- lib/pypy1.9/distutils/command/install.py.orig	2012-07-15 10:10:18.000000000 +0200
++++ lib/pypy1.9/distutils/command/install.py	2012-07-15 10:13:15.000000000 +0200
+@@ -84,9 +84,9 @@
+         'data'   : '$userbase',
+         },
+     'pypy': {
+-        'purelib': '$base/site-packages',
+-        'platlib': '$base/site-packages',
+-        'headers': '$base/include',
++        'purelib': '$base/lib/pypy$pypy_version_short/site-packages',
++        'platlib': '$platbase/lib/pypy$pypy_version_short/site-packages',
++        'headers': '$base/include/pypy$pypy_version_short/$dist_name',
+         'scripts': '$base/bin',
+         'data'   : '$base',
+         },
+@@ -304,6 +304,7 @@
+         # about needing recursive variable expansion (shudder).
+ 
+         py_version = (string.split(sys.version))[0]
++        pypy_version = sys.version[-6:-3]
+         (prefix, exec_prefix) = get_config_vars('prefix', 'exec_prefix')
+         self.config_vars = {'dist_name': self.distribution.get_name(),
+                             'dist_version': self.distribution.get_version(),
+@@ -311,6 +312,9 @@
+                             'py_version': py_version,
+                             'py_version_short': py_version[0:3],
+                             'py_version_nodot': py_version[0] + py_version[2],
++                            'pypy_version': pypy_version,
++                            'pypy_version_short': pypy_version[0:3],
++                            'pypy_version_nodot': pypy_version[0] + pypy_version[2],
+                             'sys_prefix': prefix,
+                             'prefix': prefix,
+                             'sys_exec_prefix': exec_prefix,

Added: head/lang/pypy/files/patch-lib__pypy1.9__distutils__sysconfig_pypy.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/pypy/files/patch-lib__pypy1.9__distutils__sysconfig_pypy.py	Tue Jul 17 19:08:21 2012	(r301025)
@@ -0,0 +1,20 @@
+--- lib/pypy1.9/distutils/sysconfig_pypy.py.orig	2012-07-13 22:52:04.000000000 +0200
++++ lib/pypy1.9/distutils/sysconfig_pypy.py	2012-07-13 22:58:35.000000000 +0200
+@@ -15,7 +15,7 @@
+ 
+ def get_python_inc(plat_specific=0, prefix=None):
+     from os.path import join as j
+-    return j(sys.prefix, 'include')
++    return j(sys.prefix, 'include', 'pypy' + sys.version[-6:-3])
+ 
+ def get_python_version():
+     """Return a string containing the major and minor Python version,
+@@ -44,7 +44,7 @@
+             "calls to get_python_lib(standard_lib=1) cannot succeed")
+     if prefix is None:
+         prefix = PREFIX
+-    return os.path.join(prefix, 'site-packages')
++    return os.path.join(prefix, 'lib', 'pypy' + sys.version[-6:-3], 'site-packages')
+ 
+ 
+ _config_vars = None

Added: head/lang/pypy/files/patch-lib__pypy1.9__sysconfig.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/lang/pypy/files/patch-lib__pypy1.9__sysconfig.py	Tue Jul 17 19:08:21 2012	(r301025)
@@ -0,0 +1,40 @@
+--- lib/pypy1.9/sysconfig.py.orig	2012-07-15 09:57:14.000000000 +0200
++++ lib/pypy1.9/sysconfig.py	2012-07-15 10:03:25.000000000 +0200
+@@ -27,12 +27,12 @@
+         'data'   : '{base}',
+         },
+     'pypy': {
+-        'stdlib': '{base}/lib-python',
+-        'platstdlib': '{base}/lib-python',
+-        'purelib': '{base}/lib-python',
+-        'platlib': '{base}/lib-python',
+-        'include': '{base}/include',
+-        'platinclude': '{base}/include',
++        'stdlib': '{base}/lib/pypy{pypy_version_short}',
++        'platstdlib': '{platbase}/lib/pypy{pypy_version_short}',
++        'purelib': '{base}/lib/pypy{pypy_version_short}',
++        'platlib': '{platbase}/lib/pypy{pypy_version_short}',
++        'include': '{base}/include{pypy_version_short}',
++        'platinclude': '{platbase}/include/pypy{pypy_version_short}',
+         'scripts': '{base}/bin',
+         'data'   : '{base}',
+         },
+@@ -98,6 +98,8 @@
+                 'scripts', 'data')
+ _PY_VERSION = sys.version.split()[0]
+ _PY_VERSION_SHORT = sys.version[:3]
++_PYPY_VERSION = sys.version[-6:-1]
++_PYPY_VERSION_SHORT = sys.version[-6:-3]
+ _PY_VERSION_SHORT_NO_DOT = _PY_VERSION[0] + _PY_VERSION[2]
+ _PREFIX = os.path.normpath(sys.prefix)
+ _EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
+@@ -304,6 +306,9 @@
+         _CONFIG_VARS['py_version'] = _PY_VERSION
+         _CONFIG_VARS['py_version_short'] = _PY_VERSION_SHORT
+         _CONFIG_VARS['py_version_nodot'] = _PY_VERSION[0] + _PY_VERSION[2]
++        _CONFIG_VARS['py_version'] = _PYPY_VERSION
++        _CONFIG_VARS['pypy_version_short'] = _PYPY_VERSION_SHORT
++        _CONFIG_VARS['pypy_version_nodot'] = _PYPY_VERSION[0] + _PYPY_VERSION[2]
+         _CONFIG_VARS['base'] = _PREFIX
+         _CONFIG_VARS['platbase'] = _EXEC_PREFIX
+         _CONFIG_VARS['projectbase'] = _PROJECT_BASE

Modified: head/lang/pypy/pkg-plist
==============================================================================
--- head/lang/pypy/pkg-plist	Tue Jul 17 18:48:09 2012	(r301024)
+++ head/lang/pypy/pkg-plist	Tue Jul 17 19:08:21 2012	(r301025)
@@ -1555,7 +1555,6 @@
 %%PYPY_LIBDIR%%/lib_pypy/ctypes_config_cache/locale.ctc.py
 %%PYPY_LIBDIR%%/lib_pypy/ctypes_config_cache/locale.ctc.pyc
 %%PYPY_LIBDIR%%/lib_pypy/ctypes_config_cache/rebuild.py
-%%PYPY_LIBDIR%%/lib_pypy/ctypes_config_cache/rebuild.py.orig
 %%PYPY_LIBDIR%%/lib_pypy/ctypes_config_cache/rebuild.pyc
 %%PYPY_LIBDIR%%/lib_pypy/ctypes_config_cache/resource.ctc.py
 %%PYPY_LIBDIR%%/lib_pypy/ctypes_config_cache/resource.ctc.pyc
@@ -2384,7 +2383,6 @@
 %%PYPY_LIBDIR%%/shutil.pyc
 %%PYPY_LIBDIR%%/site-packages/README
 %%PYPY_LIBDIR%%/site.py
-%%PYPY_LIBDIR%%/site.py.orig
 %%PYPY_LIBDIR%%/site.pyc
 %%PYPY_LIBDIR%%/smtpd.py
 %%PYPY_LIBDIR%%/smtpd.pyc



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201207171908.q6HJ8La4084547>