From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/mgorny:master commit in: dev-python/pypy-bin/, dev-python/pypy/, dev-python/pypy-binpackage/, ...
Date: Sun, 21 Jul 2013 11:16:59 +0000 (UTC) [thread overview]
Message-ID: <1374395453.29c2376d84e331b9d1922246baf454c6db6c40bc.mgorny@gentoo> (raw)
commit: 29c2376d84e331b9d1922246baf454c6db6c40bc
Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Jul 21 08:30:53 2013 +0000
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Jul 21 08:30:53 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=29c2376d
Reuse pypy source package in pypy-bin.
This reduces the size of binpackages since the only changing file is
the 'pypy-c' executable.
---
dev-python/pypy-bin/Manifest | 2 +
....UnixCCompiler.runtime_library_dir_option.patch | 11 +
.../pypy-bin/files/1.9-scripts-location.patch | 11 +
...ils-fix_handling_of_executables_and_flags.patch | 323 +++++++++++++++++++++
dev-python/pypy-bin/pypy-bin-2.0.2.ebuild | 41 ++-
.../pypy-binpackage/pypy-binpackage-2.0.2.ebuild | 8 +-
dev-python/pypy/pypy-2.0.2.ebuild | 5 +-
7 files changed, 384 insertions(+), 17 deletions(-)
diff --git a/dev-python/pypy-bin/Manifest b/dev-python/pypy-bin/Manifest
index 606e981..27d0715 100644
--- a/dev-python/pypy-bin/Manifest
+++ b/dev-python/pypy-bin/Manifest
@@ -1,3 +1,5 @@
DIST pypy-2.0.2-src.tar.bz2 14819848 SHA256 1991c90d6b98e2408b3790d4b57b71ec1c69346328b8321505ce8f6ab4544c3c SHA512 5b8b56194dff468dd249dea0014fadafb791eb69858ffae0b9c7638f087df277a84ddadc7d5b0fdb48a12ca8e6b70eb95cb5b7a5f56fe8fe3396820b814ecfd7 WHIRLPOOL bb1f71e0b2d3e145edcb1baa17b0a13c09f5229cf1b0532edbb3d0d5c87ef39543c0ef6b9dc7ce2778c4a3336d4a1580fce9cf960f82b72ddfed02e06d10d8af
DIST pypy-bin-2.0.2+bzip2+jit+ncurses+shadowstack+ssl.tar.xz 15089652 SHA256 8e0faf6cb87311b267ef05728da335483892f5454e0ecb0044350bc02e86ba9e SHA512 594b665305e3b4727b6229e4173179836fe70c12a217740ae6e34fa9c960875496492ea60791b879a88e47b3f9ae9887f5671d14bd8396ca3691856408658afd WHIRLPOOL d9a052843cf75beca10e16ba011f96f440f8f0f63eabf82320e0a45b2ca04d71a6fe07f14f67ff4388af709b8a47ee1176b4311bcbe956b5d4bc297673e657d3
+DIST pypy-bin-2.0.2+bzip2+jit+ncurses+ssl.tar.xz 16714288 SHA256 e9f49d213a8872ae9f8797a079e35ba4f3bb1c2e54bca8bab65eea15d5067382 SHA512 95970c568fa24a1c9b183b629a2f94548053d2e90a8f47f890bb65f14ce679945760e8f4e05b03b2911b496cc98f03c1061cdb9a19b85a095f3f5146ce1fdceb WHIRLPOOL c5a0f92c093ea50a2a8b71fcb0697ddd8ef7b4a8ef5cc90f6b46dbc9cd205cd4e1fea4d6660cc4e4488284193402220c8105a36bb5f15bfe7f8f406a53335212
+DIST pypy-bin-2.0.2+bzip2+ncurses+ssl.tar.xz 11306824 SHA256 76f6458a00c22613e2f5a0f5f69728ad69762ce64a47231628a50967f9350b5c SHA512 e2257c1e7a03d468b6e238e17b1cd9578aa6edabb531559120f229475d69be22958badad60f50371ade9aeb67d10990afa6ab338da0f4d7c360f650a306b4a22 WHIRLPOOL d52c15cdf700c9f4c28110c43fcff3cb2e05fe239531bdd00068c5e567fad0b6a56f36694149eafa8e814dec938fb0c9b4336a200fc85285cb6168cca11cdf97
DIST pypy-bin-2.0.2-doc.tar.xz 1160968 SHA256 65a5859e230d45c363ead08381951b202c15a0669feb0d54ff90c0d683e2ec34 SHA512 20d651f9ba1176314e5c63dea9c992abf74fba211bd1a2ed41a0a0f9c879fd1e126e56407cd07a400e544ee9e9032b229b189741c6344b6e90757d871cd9bb94 WHIRLPOOL 0673deba43481abbb6d138b64b6fa9eef22871088d5c3d9aa64aa06ae829772ebd5874877e00fe8422c5503dd3016e7308b85ecfffc3b5bcec4bef0e1ef118b9
diff --git a/dev-python/pypy-bin/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch b/dev-python/pypy-bin/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch
new file mode 100644
index 0000000..b3d5235
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch
@@ -0,0 +1,11 @@
+--- lib-python/2.7/distutils/unixccompiler.py
++++ lib-python/2.7/distutils/unixccompiler.py
+@@ -297,7 +297,7 @@
+ # this time, there's no way to determine this information from
+ # the configuration data stored in the Python installation, so
+ # we use this hack.
+- compiler = os.path.basename(sysconfig.get_config_var("CC"))
++ compiler = os.path.basename(self.compiler[0])
+ if sys.platform[:6] == "darwin":
+ # MacOSX's linker doesn't understand the -R flag at all
+ return "-L" + dir
diff --git a/dev-python/pypy-bin/files/1.9-scripts-location.patch b/dev-python/pypy-bin/files/1.9-scripts-location.patch
new file mode 100644
index 0000000..5f0190d
--- /dev/null
+++ b/dev-python/pypy-bin/files/1.9-scripts-location.patch
@@ -0,0 +1,11 @@
+--- pypy-pypy-release-1.7/lib-python/2.7/distutils/command/install.py
++++ pypy-pypy-release-1.7/lib-python/2.7/distutils/command/install.py
+@@ -87,7 +87,7 @@
+ 'purelib': '$base/site-packages',
+ 'platlib': '$base/site-packages',
+ 'headers': '$base/include',
+- 'scripts': '$base/bin',
++ 'scripts': '/usr/bin',
+ 'data' : '$base',
+ },
+ }
diff --git a/dev-python/pypy-bin/files/2.0.2-distutils-fix_handling_of_executables_and_flags.patch b/dev-python/pypy-bin/files/2.0.2-distutils-fix_handling_of_executables_and_flags.patch
new file mode 100644
index 0000000..db7db3b
--- /dev/null
+++ b/dev-python/pypy-bin/files/2.0.2-distutils-fix_handling_of_executables_and_flags.patch
@@ -0,0 +1,323 @@
+http://bugs.python.org/issue1222585
+
+--- lib-python/2.7/distutils/cygwinccompiler.py
++++ lib-python/2.7/distutils/cygwinccompiler.py
+@@ -132,9 +132,13 @@
+ self.set_executables(compiler='gcc -mcygwin -O -Wall',
+ compiler_so='gcc -mcygwin -mdll -O -Wall',
+ compiler_cxx='g++ -mcygwin -O -Wall',
++ compiler_so_cxx='g++ -mcygwin -mdll -O -Wall',
+ linker_exe='gcc -mcygwin',
+ linker_so=('%s -mcygwin %s' %
+- (self.linker_dll, shared_option)))
++ (self.linker_dll, shared_option)),
++ linker_exe_cxx='g++ -mcygwin',
++ linker_so_cxx=('%s -mcygwin %s' %
++ (self.linker_dll, shared_option)))
+
+ # cygwin and mingw32 need different sets of libraries
+ if self.gcc_version == "2.91.57":
+@@ -160,8 +164,12 @@
+ raise CompileError, msg
+ else: # for other files use the C-compiler
+ try:
+- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
+- extra_postargs)
++ if self.detect_language(src) == 'c++':
++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
++ extra_postargs)
++ else:
++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
++ extra_postargs)
+ except DistutilsExecError, msg:
+ raise CompileError, msg
+
+@@ -322,10 +330,15 @@
+ self.set_executables(compiler='gcc -mno-cygwin -O -Wall',
+ compiler_so='gcc -mno-cygwin -mdll -O -Wall',
+ compiler_cxx='g++ -mno-cygwin -O -Wall',
++ compiler_so_cxx='g++ -mno-cygwin -mdll -O -Wall',
+ linker_exe='gcc -mno-cygwin',
+ linker_so='%s -mno-cygwin %s %s'
+ % (self.linker_dll, shared_option,
+- entry_point))
++ entry_point),
++ linker_exe_cxx='g++ -mno-cygwin',
++ linker_so_cxx='%s -mno-cygwin %s %s'
++ % (self.linker_dll, shared_option,
++ entry_point))
+ # Maybe we should also append -mthreads, but then the finished
+ # dlls need another dll (mingwm10.dll see Mingw32 docs)
+ # (-mthreads: Support thread-safe exception handling on `Mingw32')
+--- lib-python/2.7/distutils/emxccompiler.py
++++ lib-python/2.7/distutils/emxccompiler.py
+@@ -65,8 +65,12 @@
+ # XXX optimization, warnings etc. should be customizable.
+ self.set_executables(compiler='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
+ compiler_so='gcc -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
++ compiler_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
++ compiler_so_cxx='g++ -Zomf -Zmt -O3 -fomit-frame-pointer -mprobe -Wall',
+ linker_exe='gcc -Zomf -Zmt -Zcrtdll',
+- linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll')
++ linker_so='gcc -Zomf -Zmt -Zcrtdll -Zdll',
++ linker_exe_cxx='g++ -Zomf -Zmt -Zcrtdll',
++ linker_so_cxx='g++ -Zomf -Zmt -Zcrtdll -Zdll')
+
+ # want the gcc library statically linked (so that we don't have
+ # to distribute a version dependent on the compiler we have)
+@@ -83,8 +87,12 @@
+ raise CompileError, msg
+ else: # for other files use the C-compiler
+ try:
+- self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
+- extra_postargs)
++ if self.detect_language(src) == 'c++':
++ self.spawn(self.compiler_so_cxx + cc_args + [src, '-o', obj] +
++ extra_postargs)
++ else:
++ self.spawn(self.compiler_so + cc_args + [src, '-o', obj] +
++ extra_postargs)
+ except DistutilsExecError, msg:
+ raise CompileError, msg
+
+--- lib-python/2.7/distutils/sysconfig_cpython.py
++++ lib-python/2.7/distutils/sysconfig_cpython.py
+@@ -150,10 +150,12 @@
+ varies across Unices and is stored in Python's Makefile.
+ """
+ if compiler.compiler_type == "unix":
+- (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
+- get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
+- 'CCSHARED', 'LDSHARED', 'SO', 'AR',
+- 'ARFLAGS')
++ (cc, cxx, ccshared, ldshared, ldcxxshared, so_ext, ar, ar_flags) = \
++ get_config_vars('CC', 'CXX', 'CCSHARED', 'LDSHARED', 'LDCXXSHARED',
++ 'SO', 'AR', 'ARFLAGS')
++
++ cflags = ''
++ cxxflags = ''
+
+ newcc = None
+ if 'CC' in os.environ:
+@@ -191,19 +193,27 @@
+ cxx = os.environ['CXX']
+ if 'LDSHARED' in os.environ:
+ ldshared = os.environ['LDSHARED']
++ if 'LDCXXSHARED' in os.environ:
++ ldcxxshared = os.environ['LDCXXSHARED']
+ if 'CPP' in os.environ:
+ cpp = os.environ['CPP']
+ else:
+ cpp = cc + " -E" # not always
+ if 'LDFLAGS' in os.environ:
+ ldshared = ldshared + ' ' + os.environ['LDFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
+ if 'CFLAGS' in os.environ:
+- cflags = opt + ' ' + os.environ['CFLAGS']
++ cflags = os.environ['CFLAGS']
+ ldshared = ldshared + ' ' + os.environ['CFLAGS']
++ if 'CXXFLAGS' in os.environ:
++ cxxflags = os.environ['CXXFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
+ if 'CPPFLAGS' in os.environ:
+ cpp = cpp + ' ' + os.environ['CPPFLAGS']
+ cflags = cflags + ' ' + os.environ['CPPFLAGS']
++ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
+ ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
+ if 'AR' in os.environ:
+ ar = os.environ['AR']
+ if 'ARFLAGS' in os.environ:
+@@ -212,13 +222,17 @@
+ archiver = ar + ' ' + ar_flags
+
+ cc_cmd = cc + ' ' + cflags
++ cxx_cmd = cxx + ' ' + cxxflags
+ compiler.set_executables(
+ preprocessor=cpp,
+ compiler=cc_cmd,
+ compiler_so=cc_cmd + ' ' + ccshared,
+- compiler_cxx=cxx,
++ compiler_cxx=cxx_cmd,
++ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
+ linker_so=ldshared,
+ linker_exe=cc,
++ linker_so_cxx=ldcxxshared,
++ linker_exe_cxx=cxx,
+ archiver=archiver)
+
+ compiler.shared_lib_extension = so_ext
+@@ -530,7 +544,7 @@
+ for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
+ # a number of derived variables. These need to be
+ # patched up as well.
+- 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
++ 'CFLAGS', 'CXXFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
+ flags = _config_vars[key]
+ flags = re.sub('-arch\s+\w+\s', ' ', flags)
+ flags = re.sub('-isysroot [^ \t]*', ' ', flags)
+@@ -549,7 +563,7 @@
+ for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
+ # a number of derived variables. These need to be
+ # patched up as well.
+- 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
++ 'CFLAGS', 'CXXFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
+
+ flags = _config_vars[key]
+ flags = re.sub('-arch\s+\w+\s', ' ', flags)
+@@ -573,7 +587,7 @@
+ for key in ('LDFLAGS', 'BASECFLAGS', 'LDSHARED',
+ # a number of derived variables. These need to be
+ # patched up as well.
+- 'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
++ 'CFLAGS', 'CXXFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
+
+ flags = _config_vars[key]
+ flags = re.sub('-isysroot\s+\S+(\s|$)', ' ', flags)
+--- lib-python/2.7/distutils/sysconfig_pypy.py
++++ lib-python/2.7/distutils/sysconfig_pypy.py
+@@ -114,13 +114,56 @@
+ optional C speedup components.
+ """
+ if compiler.compiler_type == "unix":
+- compiler.compiler_so.extend(['-O2', '-fPIC', '-Wimplicit'])
++ cc = ' '.join(compiler.compiler)
++ cxx = ' '.join(compiler.compiler_cxx)
++ ldshared = ' '.join(compiler.linker_so)
++ ldcxxshared = ' '.join(compiler.linker_so_cxx)
++
++ cflags = ''
++ cxxflags = ''
++ ccshared = '-fPIC'
++
++ if 'CC' in os.environ:
++ cc = os.environ['CC']
++ if 'CXX' in os.environ:
++ cxx = os.environ['CXX']
++ if 'LDSHARED' in os.environ:
++ ldshared = os.environ['LDSHARED']
++ if 'LDCXXSHARED' in os.environ:
++ ldcxxshared = os.environ['LDCXXSHARED']
++ if 'CPP' in os.environ:
++ cpp = os.environ['CPP']
++ else:
++ cpp = cc + " -E" # not always
++ if 'LDFLAGS' in os.environ:
++ ldshared = ldshared + ' ' + os.environ['LDFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['LDFLAGS']
++ if 'CFLAGS' in os.environ:
++ cflags = os.environ['CFLAGS']
++ ldshared = ldshared + ' ' + os.environ['CFLAGS']
++ if 'CXXFLAGS' in os.environ:
++ cxxflags = os.environ['CXXFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CXXFLAGS']
++ if 'CPPFLAGS' in os.environ:
++ cpp = cpp + ' ' + os.environ['CPPFLAGS']
++ cflags = cflags + ' ' + os.environ['CPPFLAGS']
++ cxxflags = cxxflags + ' ' + os.environ['CPPFLAGS']
++ ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
++ ldcxxshared = ldcxxshared + ' ' + os.environ['CPPFLAGS']
++
++ cc_cmd = cc + ' ' + cflags
++ cxx_cmd = cxx + ' ' + cxxflags
++ compiler.set_executables(
++ preprocessor=cpp,
++ compiler=cc_cmd,
++ compiler_so=cc_cmd + ' ' + ccshared,
++ compiler_cxx=cxx_cmd,
++ compiler_so_cxx=cxx_cmd + ' ' + ccshared,
++ linker_so=ldshared,
++ linker_exe=cc,
++ linker_so_cxx=ldcxxshared,
++ linker_exe_cxx=cxx)
+ compiler.shared_lib_extension = get_config_var('SO')
+- if "CFLAGS" in os.environ:
+- cflags = os.environ["CFLAGS"]
+- compiler.compiler.append(cflags)
+- compiler.compiler_so.append(cflags)
+- compiler.linker_so.append(cflags)
+
+
+ from sysconfig_cpython import (
+--- lib-python/2.7/distutils/unixccompiler.py
++++ lib-python/2.7/distutils/unixccompiler.py
+@@ -114,14 +114,17 @@
+ # are pretty generic; they will probably have to be set by an outsider
+ # (eg. using information discovered by the sysconfig about building
+ # Python extensions).
+- executables = {'preprocessor' : None,
+- 'compiler' : ["cc"],
+- 'compiler_so' : ["cc"],
+- 'compiler_cxx' : ["cc"],
+- 'linker_so' : ["cc", "-shared"],
+- 'linker_exe' : ["cc"],
+- 'archiver' : ["ar", "-cr"],
+- 'ranlib' : None,
++ executables = {'preprocessor' : None,
++ 'compiler' : ["cc"],
++ 'compiler_so' : ["cc"],
++ 'compiler_cxx' : ["c++"],
++ 'compiler_so_cxx' : ["c++"],
++ 'linker_so' : ["cc", "-shared"],
++ 'linker_exe' : ["cc"],
++ 'linker_so_cxx' : ["c++", "-shared"],
++ 'linker_exe_cxx' : ["c++"],
++ 'archiver' : ["ar", "-cr"],
++ 'ranlib' : None,
+ }
+
+ if sys.platform[:6] == "darwin":
+@@ -171,11 +174,18 @@
+
+ def _compile(self, obj, src, ext, cc_args, extra_postargs, pp_opts):
+ compiler_so = self.compiler_so
++ compiler_so_cxx = self.compiler_so_cxx
+ if sys.platform == 'darwin':
+ compiler_so = _darwin_compiler_fixup(compiler_so, cc_args + extra_postargs)
++ compiler_so_cxx = _darwin_compiler_fixup(compiler_so_cxx, cc_args +
++ extra_postargs)
+ try:
+- self.spawn(compiler_so + cc_args + [src, '-o', obj] +
+- extra_postargs)
++ if self.detect_language(src) == 'c++':
++ self.spawn(compiler_so_cxx + cc_args + [src, '-o', obj] +
++ extra_postargs)
++ else:
++ self.spawn(compiler_so + cc_args + [src, '-o', obj] +
++ extra_postargs)
+ except DistutilsExecError, msg:
+ raise CompileError, msg
+
+@@ -232,23 +242,16 @@
+ ld_args.extend(extra_postargs)
+ self.mkpath(os.path.dirname(output_filename))
+ try:
+- if target_desc == CCompiler.EXECUTABLE:
+- linker = self.linker_exe[:]
++ if target_lang == "c++":
++ if target_desc == CCompiler.EXECUTABLE:
++ linker = self.linker_exe_cxx[:]
++ else:
++ linker = self.linker_so_cxx[:]
+ else:
+- linker = self.linker_so[:]
+- if target_lang == "c++" and self.compiler_cxx:
+- # skip over environment variable settings if /usr/bin/env
+- # is used to set up the linker's environment.
+- # This is needed on OSX. Note: this assumes that the
+- # normal and C++ compiler have the same environment
+- # settings.
+- i = 0
+- if os.path.basename(linker[0]) == "env":
+- i = 1
+- while '=' in linker[i]:
+- i = i + 1
+-
+- linker[i] = self.compiler_cxx[i]
++ if target_desc == CCompiler.EXECUTABLE:
++ linker = self.linker_exe[:]
++ else:
++ linker = self.linker_so[:]
+
+ if sys.platform == 'darwin':
+ linker = _darwin_compiler_fixup(linker, ld_args)
diff --git a/dev-python/pypy-bin/pypy-bin-2.0.2.ebuild b/dev-python/pypy-bin/pypy-bin-2.0.2.ebuild
index 26dd013..61639b5 100644
--- a/dev-python/pypy-bin/pypy-bin-2.0.2.ebuild
+++ b/dev-python/pypy-bin/pypy-bin-2.0.2.ebuild
@@ -12,14 +12,15 @@ BINHOST="http://dev.gentoo.org/~mgorny/dist/${PN}"
DESCRIPTION="A fast, compliant alternative implementation of the Python language (binary package)"
HOMEPAGE="http://pypy.org/"
-SRC_URI="
+SRC_URI="mirror://bitbucket/pypy/pypy/downloads/pypy-${PV}-src.tar.bz2
amd64? (
bzip2? ( jit? ( ncurses? ( shadowstack? ( ssl? (
${BINHOST}/${P}+bzip2+jit+ncurses+shadowstack+ssl.tar.xz
) ) ) ) )
- )
- doc? ( ${BINHOST}/${P}-doc.tar.xz )
- test? ( mirror://bitbucket/pypy/pypy/downloads/pypy-${PV}-src.tar.bz2 )"
+ bzip2? ( !jit? ( ncurses? ( !shadowstack? ( ssl? (
+ ${BINHOST}/${P}+bzip2+ncurses+ssl.tar.xz
+ ) ) ) ) )
+ )"
LICENSE="MIT"
SLOT=$(get_version_component_range 1-2 ${PV})
@@ -36,20 +37,36 @@ RDEPEND="
sqlite? ( dev-db/sqlite:3 )
ssl? ( ~dev-libs/openssl-1.0.1e )
!dev-python/pypy:${SLOT}"
-DEPEND="test? ( ${RDEPEND} )"
+DEPEND="doc? ( dev-python/sphinx )
+ test? ( ${RDEPEND} )"
PDEPEND="app-admin/python-updater"
# Supported variants
-REQUIRED_USE="bzip2 jit ncurses !sandbox shadowstack ssl"
+REQUIRED_USE="bzip2 ncurses !sandbox ssl
+ jit? ( shadowstack )"
+
+S=${WORKDIR}/pypy-${PV}-src
pkg_setup() {
- use test && python-any-r1_pkg_setup
+ use doc && python-any-r1_pkg_setup
}
-src_test() {
- # Move necessary libs and tools.
- mv "${WORKDIR}"/pypy-${PV}-src/{_pytest,py,pypy,pytest*,rpython} . || die
+src_prepare() {
+ epatch "${FILESDIR}/1.9-scripts-location.patch"
+ epatch "${FILESDIR}/1.9-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch"
+ epatch "${FILESDIR}/2.0.2-distutils-fix_handling_of_executables_and_flags.patch"
+
+ epatch_user
+}
+src_compile() {
+ # Tadaam! PyPy compiled!
+ mv "${WORKDIR}"/${P}*/pypy-c . || die
+
+ use doc && emake -C pypy/doc/ html
+}
+
+src_test() {
PYTHONDONTWRITEBYTECODE=1 \
./pypy-c ./pypy/test_all.py --pypy=./pypy-c lib-python || die
}
@@ -76,6 +93,8 @@ src_install() {
einfo "Generating caches and byte-compiling ..."
+ cd .. || die
+
# Generate Grammar and PatternGrammar pickles.
"${PYTHON}" -c "import lib2to3.pygram, lib2to3.patcomp; lib2to3.patcomp.PatternCompiler()" \
|| die "Generation of Grammar and PatternGrammar pickles failed"
@@ -90,7 +109,7 @@ src_install() {
python_optimize "${ED%/}${INSDESTTREE}"
# Install docs
- use doc && dohtml -r "${WORKDIR}"/${P}-doc/.
+ use doc && dohtml -r pypy/doc/_build/html/
echo "EPYTHON='${EPYTHON}'" > epython.py
python_domodule epython.py
diff --git a/dev-python/pypy-binpackage/pypy-binpackage-2.0.2.ebuild b/dev-python/pypy-binpackage/pypy-binpackage-2.0.2.ebuild
index de489b4..e8fa0fc 100644
--- a/dev-python/pypy-binpackage/pypy-binpackage-2.0.2.ebuild
+++ b/dev-python/pypy-binpackage/pypy-binpackage-2.0.2.ebuild
@@ -102,11 +102,11 @@ src_install() {
local BIN_P=pypy-bin-${PV}
einfo "Zipping PyPy ..."
- mkdir ${BIN_P} || die
- mv README.rst include lib_pypy lib-python pypy-c ${BIN_P}/ || die
- chmod +x ${BIN_P}/pypy-c || die
+ mkdir "${BIN_P}${suffix}" || die
+ mv pypy-c "${BIN_P}${suffix}"/ || die
+ chmod +x "${BIN_P}${suffix}"/pypy-c || die
- tar -cf "${BIN_P}${suffix}.tar" ${BIN_P} || die
+ tar -cf "${BIN_P}${suffix}.tar" "${BIN_P}${suffix}" || die
xz -vz9 "${BIN_P}${suffix}.tar" || die
if use doc; then
diff --git a/dev-python/pypy/pypy-2.0.2.ebuild b/dev-python/pypy/pypy-2.0.2.ebuild
index 56f1982..99e170f 100644
--- a/dev-python/pypy/pypy-2.0.2.ebuild
+++ b/dev-python/pypy/pypy-2.0.2.ebuild
@@ -26,6 +26,7 @@ RDEPEND=">=sys-libs/zlib-1.1.3
sqlite? ( dev-db/sqlite:3 )
ssl? ( dev-libs/openssl )"
DEPEND="${RDEPEND}
+ doc? ( dev-python/sphinx )
${PYTHON_DEPS}"
PDEPEND="app-admin/python-updater"
@@ -88,7 +89,7 @@ src_compile() {
echo -e "\033[1m${@}\033[0m"
"${@}" || die "compile error"
- use doc && emake -C ${PN}/doc/ html
+ use doc && emake -C pypy/doc/ html
}
src_test() {
@@ -132,7 +133,7 @@ src_install() {
python_optimize "${ED%/}${INSDESTTREE}"
# Install docs
- use doc && dohtml -r ${PN}/doc/_build/html/
+ use doc && dohtml -r pypy/doc/_build/html/
echo "EPYTHON='${EPYTHON}'" > epython.py
python_domodule epython.py
next reply other threads:[~2013-07-21 11:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-21 11:16 Michał Górny [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-07-21 7:00 [gentoo-commits] dev/mgorny:master commit in: dev-python/pypy-bin/, dev-python/pypy/, dev-python/pypy-binpackage/, Michał Górny
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1374395453.29c2376d84e331b9d1922246baf454c6db6c40bc.mgorny@gentoo \
--to=mgorny@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox