Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 376546 Details for
Bug 509794
dev-python/pypy doesn't correctly install cffi module _tkinter
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
executable python script
import.py (text/x-python), 3.78 KB, created by
Ian Delaney (RETIRED)
on 2014-05-07 14:51:14 UTC
(
hide
)
Description:
executable python script
Filename:
MIME Type:
Creator:
Ian Delaney (RETIRED)
Created:
2014-05-07 14:51:14 UTC
Size:
3.78 KB
patch
obsolete
>#!/usr/bin/env python >""" A script that imports cffi modules as root provided that pypy is already built. >It is a cutdown from the script packages.py, located in pypy/tool/release >It uses 'pypy/goal/pypy-c' and parts of the rest of the working copy. >Usage: > > import.py root-pypy-dir >do: import.py ../../../ >""" > >import shutil >import sys >import os >#Add toplevel repository dir to sys.path >sys.path.insert(0,os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))) >import py >import fnmatch >from rpython.tool.udir import udir >import subprocess > >class PyPyCNotFound(Exception): > pass > >def fix_permissions(basedir): > if sys.platform != 'win32': > os.system("chmod -R a+rX %s" % basedir) > os.system("chmod -R g-w %s" % basedir) > >def import_modules(basedir, name='pypy-nightly', rename_pypy_c='pypy', > copy_to_dir=None, override_pypy_c=None, nostrip=False, > withouttk=False): > basedir = py.path.local(basedir) > if override_pypy_c is None: > basename = 'pypy-c' > pypy_c = basedir.join('pypy', 'goal', basename) > else: > pypy_c = py.path.local(override_pypy_c) > if not pypy_c.check(): > print pypy_c > if os.path.isdir(os.path.dirname(str(pypy_c))): > raise PyPyCNotFound( > 'Please compile pypy first, using translate.py,' > ' or check that you gave the correct path' > ' (see docstring for more info)') > else: > raise PyPyCNotFound( > 'Bogus path: %r does not exist (see docstring for more info)' > % (os.path.dirname(str(pypy_c)),)) > subprocess.check_call([str(pypy_c), '-c', 'import _sqlite3']) > if not sys.platform == 'win32': > subprocess.check_call([str(pypy_c), '-c', 'import _curses']) > subprocess.check_call([str(pypy_c), '-c', 'import syslog']) > if not withouttk: > try: > subprocess.check_call([str(pypy_c), '-c', 'import _tkinter']) > except subprocess.CalledProcessError: > print >>sys.stderr, """Building Tk bindings failed. >You can either install Tk development headers package or >add --without-tk option to skip packaging binary CFFI extension.""" > sys.exit(1) > #Can the dependencies be found from cffi somehow? > win_extras += ['tcl85.dll', 'tk85.dll'] > if sys.platform == 'win32' and not rename_pypy_c.lower().endswith('.exe'): > rename_pypy_c += '.exe' > binaries = [(pypy_c, rename_pypy_c)] > # > builddir = udir.ensure("build", dir=True) > pypydir = builddir.ensure(name, dir=True) > includedir = basedir.join('include') > # Recursively copy all headers, shutil has only ignore > # so we do a double-negative to include what we want > def copyonly(dirpath, contents): > return set(contents) - set( > shutil.ignore_patterns('*.h', '*.incl')(dirpath, contents), > ) > shutil.copytree(str(includedir), str(pypydir.join('include'))) > pypydir.ensure('include', dir=True) > >def print_usage(): > print >>sys.stderr, __doc__ > sys.exit(1) > > >if __name__ == '__main__': > if len(sys.argv) == 1: > print_usage() > > args = sys.argv[1:] > kw = {} > > for i, arg in enumerate(args): > if arg == '--nostrip': > kw['nostrip'] = True > elif arg == '--without-tk': > kw['withouttk'] = True > elif not arg.startswith('--'): > break > else: > print_usage() > > if os.environ.has_key("PYPY_PACKAGE_NOSTRIP"): > kw['nostrip'] = True > > if os.environ.has_key("PYPY_PACKAGE_WITHOUTTK"): > kw['withouttk'] = True > > if os.environ.has_key("PYPY_PACKAGE_NOSTRIP"): > kw['nostrip'] = True > > if os.environ.has_key("PYPY_PACKAGE_WITHOUTTK"): > kw['withouttk'] = True > ># args = args[i:] ># package(*args, **kw)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 509794
: 376546