Skip to content

Instantly share code, notes, and snippets.

@krislindgren
Created August 26, 2014 19:05
Show Gist options
  • Save krislindgren/6d758356acb6b4b840de to your computer and use it in GitHub Desktop.
Save krislindgren/6d758356acb6b4b840de to your computer and use it in GitHub Desktop.
[root@localhost anvil]# more /root/openstack/deps/output/py2rpm-python-subunit-0.0.19.tar.gz.log
Traceback (most recent call last):
File "<string>", line 31, in <module>
File "setup.py", line 37, in <module>
os.chdir(os.path.dirname(__file__))
OSError: [Errno 2] No such file or directory: ''
Command /home/anvil/anvil/.venv/bin/python -c
__file__ = 'setup.py'
from setuptools.command import egg_info
import pkg_resources
import os
# This is a fixed up run method that works better, it will be activated
# when the following (or equivalent) is ran $ python setup.py egg_info
def replacement_run(self):
self.mkpath(self.egg_info)
installer = self.distribution.fetch_build_egg
if self.distribution.has_ext_modules():
# TODO(harlowja): does this need to be better??
ext_modules_path = os.path.join(self.egg_info, 'ext_modules.txt')
self.write_file("extension modules", ext_modules_path, "")
for ep in pkg_resources.iter_entry_points('egg_info.writers'):
writer = ep.load(require=False)
if writer:
writer(self, ep.name, os.path.join(self.egg_info, ep.name))
self.find_sources()
if self.distribution.tests_require:
test_requires_path = os.path.join(self.egg_info, 'test-requires.txt')
test_requires = []
for line in pkg_resources.yield_lines(self.distribution.tests_require):
test_requires.append(line)
self.write_file("test requirements", test_requires_path,
'\n'.join(test_requires))
egg_info.egg_info.run = replacement_run
exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))
egg_info --egg-base pip-egg-info failed with error code 1 in /tmp/py2rpm-CGX4vj-unpack
These packages failed to build:
/root/openstack/deps/download/python-subunit-0.0.19.tar.gz:
Command /home/anvil/anvil/.venv/bin/python -c
__file__ = 'setup.py'
from setuptools.command import egg_info
import pkg_resources
import os
# This is a fixed up run method that works better, it will be activated
# when the following (or equivalent) is ran $ python setup.py egg_info
def replacement_run(self):
self.mkpath(self.egg_info)
installer = self.distribution.fetch_build_egg
if self.distribution.has_ext_modules():
# TODO(harlowja): does this need to be better??
ext_modules_path = os.path.join(self.egg_info, 'ext_modules.txt')
self.write_file("extension modules", ext_modules_path, "")
for ep in pkg_resources.iter_entry_points('egg_info.writers'):
writer = ep.load(require=False)
if writer:
writer(self, ep.name, os.path.join(self.egg_info, ep.name))
self.find_sources()
if self.distribution.tests_require:
test_requires_path = os.path.join(self.egg_info, 'test-requires.txt')
test_requires = []
for line in pkg_resources.yield_lines(self.distribution.tests_require):
test_requires.append(line)
self.write_file("test requirements", test_requires_path,
'\n'.join(test_requires))
egg_info.egg_info.run = replacement_run
exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))
egg_info --egg-base pip-egg-info failed with error code 1 in /tmp/py2rpm-CGX4vj-unpack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment