Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 397523 - dev-python/pypy-1.7: distutils broken
Summary: dev-python/pypy-1.7: distutils broken
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Dirkjan Ochtman (RETIRED)
URL:
Whiteboard:
Keywords:
: 397363 397365 397369 397371 397373 397381 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-03 17:10 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2012-02-01 20:46 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pypy-1.7-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch (pypy-1.7-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch,569 bytes, patch)
2012-01-03 17:15 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
pypy-1.7-distutils-fix_handling_of_executables_and_flags.patch (pypy-1.7-distutils-fix_handling_of_executables_and_flags.patch,17.41 KB, patch)
2012-01-03 17:18 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
pypy-1.7-distutils-fix_handling_of_executables_and_flags.patch (pypy-1.7-distutils-fix_handling_of_executables_and_flags.patch,17.64 KB, patch)
2012-02-01 20:32 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2012-01-03 17:10:40 UTC
distutils of PyPy incorrectly handles CFLAGS as 1 argument instead of space-separated list of arguments. distutils should respect environment variables, which set compiler, linker etc.

distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option() triggers exception during linking of extension modules:

  File "/usr/lib64/pypy1.7/lib-python/modified-2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib64/pypy1.7/lib-python/modified-2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib64/pypy1.7/lib-python/modified-2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib64/pypy1.7/lib-python/modified-2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
  File "/usr/lib64/pypy1.7/lib-python/modified-2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib64/pypy1.7/lib-python/modified-2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib64/pypy1.7/lib-python/modified-2.7/distutils/command/build_ext.py", line 345, in run
    self.build_extensions()
  File "/usr/lib64/pypy1.7/lib-python/modified-2.7/distutils/command/build_ext.py", line 454, in build_extensions
    self.build_extension(ext)
  File "/usr/lib64/pypy1.7/lib-python/modified-2.7/distutils/command/build_ext.py", line 536, in build_extension
    target_lang=language)
  File "/usr/lib64/pypy1.7/lib-python/modified-2.7/distutils/ccompiler.py", line 741, in link_shared_object
    extra_preargs, extra_postargs, build_temp, target_lang)
  File "/usr/lib64/pypy1.7/lib-python/modified-2.7/distutils/unixccompiler.py", line 233, in link
    libraries)
  File "/usr/lib64/pypy1.7/lib-python/modified-2.7/distutils/ccompiler.py", line 1121, in gen_lib_options
    opt = compiler.runtime_library_dir_option(dir)
  File "/usr/lib64/pypy1.7/lib-python/modified-2.7/distutils/unixccompiler.py", line 300, in runtime_library_dir_option
    compiler = os.path.basename(sysconfig.get_config_var("CC"))
  File "/usr/lib64/pypy1.7/lib-python/2.7/posixpath.py", line 112, in basename
    i = p.rfind('/') + 1
AttributeError: 'NoneType' object has no attribute 'rfind'
Comment 1 Arfrever Frehtes Taifersar Arahesis 2012-01-03 17:15:23 UTC
Created attachment 297815 [details, diff]
pypy-1.7-distutils.unixccompiler.UnixCCompiler.runtime_library_dir_option.patch
Comment 2 Arfrever Frehtes Taifersar Arahesis 2012-01-03 17:18:29 UTC
Created attachment 297817 [details, diff]
pypy-1.7-distutils-fix_handling_of_executables_and_flags.patch
Comment 3 Arfrever Frehtes Taifersar Arahesis 2012-01-03 17:33:46 UTC
*** Bug 397373 has been marked as a duplicate of this bug. ***
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2012-01-03 17:38:34 UTC
*** Bug 397363 has been marked as a duplicate of this bug. ***
Comment 5 Ian Delaney (RETIRED) gentoo-dev 2012-01-03 17:39:12 UTC
*** Bug 397365 has been marked as a duplicate of this bug. ***
Comment 6 Ian Delaney (RETIRED) gentoo-dev 2012-01-03 17:39:52 UTC
*** Bug 397369 has been marked as a duplicate of this bug. ***
Comment 7 Ian Delaney (RETIRED) gentoo-dev 2012-01-03 17:40:25 UTC
*** Bug 397371 has been marked as a duplicate of this bug. ***
Comment 8 Ian Delaney (RETIRED) gentoo-dev 2012-01-03 17:40:51 UTC
*** Bug 397381 has been marked as a duplicate of this bug. ***
Comment 9 Mike Gilbert gentoo-dev 2012-01-30 15:51:28 UTC
Patches applied, so closing.
Comment 10 Arfrever Frehtes Taifersar Arahesis 2012-02-01 20:31:57 UTC
Second patch was incomplete.
Comment 11 Arfrever Frehtes Taifersar Arahesis 2012-02-01 20:32:42 UTC
Created attachment 300717 [details, diff]
pypy-1.7-distutils-fix_handling_of_executables_and_flags.patch