Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 308781 - tahoe fails to build with python-2.6.4-r1
Summary: tahoe fails to build with python-2.6.4-r1
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-10 03:18 UTC by Oisin O Malley
Modified: 2010-09-10 06:22 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oisin O Malley 2010-03-10 03:18:27 UTC
Tahoe-1.6.1 (ebuild in bug 220018) fails to build with python-2.6.4-r1, with python-2.6.4 it built correctly. One of the patches in python-2.6.4-r1 is labeled "byte-compilation in Distutils now looks at sys.dont_write_bytecode" and I believe this is causing the problem.

When manually building tahoe and disable generating .py[oc], with python-2.6.4 with the following;
python -B setup.py build 
It builds correctly. But if the same command is used with python-2.6.4-r1 it throws the following error;

python -B setup.py build    
Not found: tahoe-deps
Not found: ../tahoe-deps
warning: build_py: byte-compiling is disabled, skipping.
warning: install_lib: byte-compiling is disabled, skipping.
Traceback (most recent call last):
  File "setup.py", line 384, in <module>
    **setup_args
  File "/usr/lib64/python2.6/distutils/core.py", line 113, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/lib64/python2.6/site-packages/setuptools/dist.py", line 221, in __init__
    self.fetch_build_eggs(attrs.pop('setup_requires'))
  File "/usr/lib64/python2.6/site-packages/setuptools/dist.py", line 245, in fetch_build_eggs
    parse_requirements(requires), installer=self.fetch_build_egg
  File "/usr/lib64/python2.6/site-packages/pkg_resources.py", line 538, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
  File "/usr/lib64/python2.6/site-packages/pkg_resources.py", line 780, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/usr/lib64/python2.6/site-packages/pkg_resources.py", line 792, in obtain
    return installer(requirement)
  File "/usr/lib64/python2.6/site-packages/setuptools/dist.py", line 293, in fetch_build_egg
    return cmd.easy_install(req)
  File "/usr/lib64/python2.6/site-packages/setuptools/command/easy_install.py", line 471, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/lib64/python2.6/site-packages/setuptools/command/easy_install.py", line 501, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/lib64/python2.6/site-packages/setuptools/command/easy_install.py", line 680, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/lib64/python2.6/site-packages/setuptools/command/easy_install.py", line 962, in build_and_install
    eggs.append(self.install_egg(dist.location, setup_base))
  File "/usr/lib64/python2.6/site-packages/setuptools/command/easy_install.py", line 718, in install_egg
    (os.path.basename(egg_path),os.path.dirname(destination)))
  File "/usr/lib64/python2.6/distutils/cmd.py", line 358, in execute
    util.execute(func, args, msg, dry_run=self.dry_run)
  File "/usr/lib64/python2.6/distutils/util.py", line 399, in execute
    apply(func, args)
  File "/usr/lib64/python2.6/site-packages/setuptools/command/easy_install.py", line 1024, in unpack_and_compile
    self.byte_compile(to_compile)
  File "/usr/lib64/python2.6/site-packages/setuptools/command/easy_install.py", line 1036, in byte_compile
    byte_compile(to_compile, optimize=0, force=1, dry_run=self.dry_run)
  File "/usr/lib64/python2.6/distutils/util.py", line 453, in byte_compile
    raise DistutilsByteCompileError('byte-compiling is disabled.')
distutils.errors.DistutilsByteCompileError: byte-compiling is disabled.
Comment 1 Howard B. Golden 2010-04-02 20:29:03 UTC
I'm getting the "byte-compiling is disabled" messages from python-2.6.5. I found that, on my system, /usr/portage/profiles/make.defaults contains:

PYTHONDONTWRITEBYTECODE="1"

I'm puzzled that this is the case. Is there some good reason for this that I'm overlooking?
Comment 2 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-04-04 16:52:08 UTC
It's not a bug in Python.
Comment 3 Howard B. Golden 2010-04-04 20:20:34 UTC
(In reply to comment #2)
> It's not a bug in Python.

Arfrever, respectfully, it would help me (and others IMO), if you would explain your reasoning a bit when you close bugs as invalid. The obvious, unanswered questions are: What is it that caused the traceback? Is it a bug in something else? Is it a misconfiguration? How should a user proceed who gets this result? Etc.

Also, my question in comment #1 wasn't answered. If this isn't a good place to answer, I will open a separate bug for it. 

(Thank you for all you do. I know you work very hard on this as a volunteer. My suggestion is that you communicate your knowledge to the rest of us a bit more. Thanks again.)
Comment 4 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-04-04 20:47:55 UTC
It might be a bug in tahoe or setuptools, but I haven't previously seen it (and I reinstalled many packages using setuptools), so I would assume that it's a bug in tahoe. If you can find a different package, which doesn't misuses setuptools and has similar problem, then report a bug in setuptools.

PYTHONDONTWRITEBYTECODE="1" is to avoid sandbox violations during installation of some packages.
Comment 5 Zooko O'Whielacronx 2010-09-10 06:22:42 UTC
It was this bug in distribute:

http://bitbucket.org/tarek/distribute/issue/147/respect-the-sysdont_write_bytecode-flag