From owner-svn-ports-all@FreeBSD.ORG Tue Jul 30 20:22:48 2013 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9BA049DC; Tue, 30 Jul 2013 20:22:48 +0000 (UTC) (envelope-from dbn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 883772927; Tue, 30 Jul 2013 20:22:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6UKMmu5054714; Tue, 30 Jul 2013 20:22:48 GMT (envelope-from dbn@svn.freebsd.org) Received: (from dbn@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6UKMmYK054711; Tue, 30 Jul 2013 20:22:48 GMT (envelope-from dbn@svn.freebsd.org) Message-Id: <201307302022.r6UKMmYK054711@svn.freebsd.org> From: David Naylor Date: Tue, 30 Jul 2013 20:22:47 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r323991 - head/lang/pypy/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Jul 2013 20:22:48 -0000 Author: dbn Date: Tue Jul 30 20:22:47 2013 New Revision: 323991 URL: http://svnweb.freebsd.org/changeset/ports/323991 Log: Fix lang/pypy library detection. The library detection orginally depended on sys.version however that tends to change a lot and thus a more robust method is used based on sys.pypy_version_info. This fixes installation using distutils and corrects output from sysconfig. Special thanks to Attila Nagy who reported the issue and tracked down the root issue (allowing me to deliver a quick solution). Reported by: Attila Nagy Modified: head/lang/pypy/files/patch-lib__pypyX.Y__distutils__command__install.py head/lang/pypy/files/patch-lib__pypyX.Y__distutils__sysconfig_pypy.py head/lang/pypy/files/patch-lib__pypyX.Y__sysconfig.py Modified: head/lang/pypy/files/patch-lib__pypyX.Y__distutils__command__install.py ============================================================================== --- head/lang/pypy/files/patch-lib__pypyX.Y__distutils__command__install.py Tue Jul 30 20:20:40 2013 (r323990) +++ head/lang/pypy/files/patch-lib__pypyX.Y__distutils__command__install.py Tue Jul 30 20:22:47 2013 (r323991) @@ -17,7 +17,7 @@ # about needing recursive variable expansion (shudder). py_version = (string.split(sys.version))[0] -+ pypy_version = sys.version[-6:-3] ++ pypy_version = '%s.%s.%s' % sys.pypy_version_info[: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(), Modified: head/lang/pypy/files/patch-lib__pypyX.Y__distutils__sysconfig_pypy.py ============================================================================== --- head/lang/pypy/files/patch-lib__pypyX.Y__distutils__sysconfig_pypy.py Tue Jul 30 20:20:40 2013 (r323990) +++ head/lang/pypy/files/patch-lib__pypyX.Y__distutils__sysconfig_pypy.py Tue Jul 30 20:22:47 2013 (r323991) @@ -5,7 +5,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.rsplit(' ', 1)[-1][:3]) ++ return j(sys.prefix, 'include', 'pypy%s.%s' % sys.pypy_version_info[:2]) def get_python_version(): """Return a string containing the major and minor Python version, @@ -15,8 +15,8 @@ if standard_lib: - return os.path.join(prefix, "lib-python", get_python_version()) - return os.path.join(prefix, 'site-packages') -+ return os.path.join(prefix, 'lib', 'pypy' + sys.version[-6:-3]) -+ return os.path.join(prefix, 'lib', 'pypy' + sys.version.rsplit(' ', 1)[-1][:3], 'site-packages') ++ return os.path.join(prefix, 'lib', 'pypy%s.%s' % sys.pypy_version_info[:2]) ++ return os.path.join(prefix, 'lib', 'pypy%s.%s' % sys.pypy_version_info[:2], 'site-packages') _config_vars = None Modified: head/lang/pypy/files/patch-lib__pypyX.Y__sysconfig.py ============================================================================== --- head/lang/pypy/files/patch-lib__pypyX.Y__sysconfig.py Tue Jul 30 20:20:40 2013 (r323990) +++ head/lang/pypy/files/patch-lib__pypyX.Y__sysconfig.py Tue Jul 30 20:22:47 2013 (r323991) @@ -23,7 +23,7 @@ 'scripts', 'data') _PY_VERSION = sys.version.split()[0] _PY_VERSION_SHORT = sys.version[:3] -+_PYPY_VERSION = sys.version.rsplit(' ', 1)[-1][:-1] ++_PYPY_VERSION = '%s.%s.%s' % sys.pypy_version_info[:3] +_PYPY_VERSION_SHORT = _PYPY_VERSION[:3] _PY_VERSION_SHORT_NO_DOT = _PY_VERSION[0] + _PY_VERSION[2] _PREFIX = os.path.normpath(sys.prefix)