lovelysystems / lovely.buildouthttp

zc.buildout extension to add http authentication for find-links and download recipies
Other
4 stars 9 forks source link

Don't work with zc.buildout == 2.4.1 #20

Open Cykooz opened 9 years ago

Cykooz commented 9 years ago
$ ./bin/buildout
While:
  Installing.
  Loading extensions.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/home/cykooz/buildout-eggs/zc.buildout-2.4.1-py2.7.egg/zc/buildout/buildout.py", line 1987, in main
    getattr(buildout, command)(args)
  File "/home/cykooz/buildout-eggs/zc.buildout-2.4.1-py2.7.egg/zc/buildout/buildout.py", line 509, in install
    self._load_extensions()
  File "/home/cykooz/buildout-eggs/zc.buildout-2.4.1-py2.7.egg/zc/buildout/buildout.py", line 1041, in _load_extensions
    ep.load()(self)
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2355, in load
    return self.resolve()
  File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 2361, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/cykooz/buildout-eggs/lovely.buildouthttp-0.6.1-py2.7.egg/lovely/buildouthttp/buildouthttp.py", line 331, in <module>
    class URLOpener(download.URLOpener):
AttributeError: 'module' object has no attribute 'URLOpener'

Process finished with exit code 1
jukart commented 9 years ago

Thanks for the hint. It seems this need some work to be fixed because URLOpener is no longer used when running with python 2 but out patch is based on URLOpener.

jukart commented 9 years ago

Workaround: run bootstrap with -v option and provide a working zc.buildout version.

Example: python bootstrap.py -v 2.0.0

Cykooz commented 9 years ago

Yes, I will be use this workaround, and I hope what you can a quick fix errors in the lovely.buildouthttp :)

petri commented 9 years ago

@jukart got any timeframe for fixing this?

petri commented 9 years ago

Apparently zc.buildout == 2.4.0 also works. I also needed to pin six to new version and make sure setuptools is recent enough. Sigh.

I then managed to have buildout run - up to the point of basic auth with remote PyPI server, at which point I now always get unauthorized 401. Switching back to lovely.buildouthttp 0.5.0 works.

Given all this, from my point of view, lovely.buildouthttp > 0.50 is currently completely useless on Python2. Cannot make it work.

ubmarco commented 8 years ago

I'm using zc.buildout 2.5.1 and lovely.buildouthttp 0.6.1 on Python 3.5. I'm getting:

File "/<buildout_path>/eggs/lovely.buildouthttp-0.6.1-py3.5.egg/lovely/buildouthttp/buildouthttp.py", line 331, in <module>
    class URLOpener(download.URLOpener):
AttributeError: module 'zc.buildout.download' has no attribute 'URLOpener'

Is there a fix to this?

Cykooz commented 8 years ago

@marcoBanse you can try cykooz.buildout.basicauth. It is my fork of isotoma.buildout.basicauth and it has support of Python 3+.

ubmarco commented 8 years ago

@Cykooz Man, thanks a lot, I could install it and it works out of the box with my ~/.pypirc. Now I can go to weekend!