#988 closed defect (fixed)

Build fails when byte-compiling is disabled

Reported by: nero37 Owned by: somebody
Priority: major Milestone: undecided
Component: packaging Version: 1.6.0
Keywords: gentoo install setuptools distutils Cc:
Launchpad Bug:

Description

I have written a gentoo ebuild to build and install tahoe on gentoo systems. In the latest version of python used in gentoo byte-compiling .py files to .pyc/.pyo has been disabled by default, as this functionality is automatically provided by the portage package manager itself when a python package is being installed.

Tahoe now fails to build, for example when building tahoe-1.6.1 with the follow;

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.

Change History (6)

comment:1 Changed at 2010-03-09T16:40:13Z by zooko

Thank you for the bug report. This is technically an issue in distutils, but some project (either the Tahoe-LAFS, distutils, setuptools, or distribute projects) need to figure out a work-around. The next step is to open a ticket against distutils on their tracker: http://bugs.python.org/ Please link to this ticket from that one.

comment:2 Changed at 2010-03-09T19:11:09Z by zooko

P.S. I'm excited that you've written an ebuild for Tahoe-LAFS! There are (at least) two more steps to making Tahoe-LAFS be fully supported on Gentoo:

  1. Set up a buildbot: the How To Contribute A Buildbot page
  2. Get your ebuild included in the standard http://packages.gentoo.org .

Having a Gentoo buildbot would enable us to know whether changes we make have introduced a regression on Gentoo. If someone contributes a Gentoo buildbot and it proves itself to be a stable build machine then we will promote it to Supported Platform status. Being a Supported Platform means that we know the current version works on that platform, and we try not to break it with new improvements.

comment:3 Changed at 2010-04-04T00:04:14Z by davidsarah

  • Component changed from unknown to packaging
  • Keywords gentoo install added
  • Owner changed from nobody to somebody

comment:4 Changed at 2010-04-04T00:04:55Z by davidsarah

  • Keywords setuptools distutils added

comment:5 Changed at 2010-04-12T17:31:54Z by zooko

The next step is for someone to open a ticket against distutils, which is the real culprit here, and link that ticket this Tahoe-LAFS ticket and to the Gentoo ticket. Start here: http://bugs.python.org/ Thanks!

Note: See TracTickets for help on using tickets.