I repro with the following for example (which I think is what you're
describing):
jsirois@gill ~/dev/apache/aurora-packaging (master) $ git checkout
origin/rel/0.12.x
jsirois@gill ~/dev/apache/aurora-packaging ((7c1732f...)) $
./build-artifact.sh builder/deb/debian-jessie
~/desktop/apache-aurora-0.12.0.tar.gz 0.12.0
...

It looks like lockfile's setup depends on pbr with no version bounding:
There was a 1.9.1 pbr release on X/Y/Z that appears to break lockfile, and
thus older pants (pants no longer uses lockfile) :/

I was able to work around by creating a new aurora tarball from the aurora
repo like so:
jsirois@gill ~/dev/apache/aurora (master) $ git checkout rel/0.12.0
jsirois@gill ~/dev/apache/jsirois-aurora ((rel/0.12.0) *) $ git diff
diff --git a/pants b/pants
index 0ce4114..b974351 100755
--- a/pants
+++ b/pants
@@ -83,7 +83,7 @@ function bootstrap_pants {
       staging_dir=$(tempdir "${PANTS_BOOTSTRAP}") && \
       "${PYTHON}" "${venv_path}/virtualenv.py" "${staging_dir}/install" &&
\
       source "${staging_dir}/install/bin/activate" && \
-      pip install "${pants_requirement}" && \
+      pip install "${pants_requirement}" pbr==1.9.0 && \
       ln -s "${staging_dir}/install" "${staging_dir}/${pants_version}" && \
       mv "${staging_dir}/${pants_version}"
"${PANTS_BOOTSTRAP}/${pants_version}"
     ) 1>&2
jsirois@gill ~/dev/apache/jsirois-aurora ((rel/0.12.0) *) $ git commit -am
'Work around lockfile floating dep on pbr.'
[detached HEAD f57377a] Work around lockfile floating dep on pbr.
 1 file changed, 1 insertion(+), 1 deletion(-)
jsirois@gill ~/dev/apache/jsirois-aurora ((f57377a...)) $ git archive
--prefix=apache-aurora-$(cat .auroraversion)/ -o snapshot.tar.gz HEAD

Then, in aurora-packaging I used this:
jsirois@gill ~/dev/apache/aurora-packaging ((7c1732f...))
$ ./build-artifact.sh builder/deb/debian-jessie
~/dev/apache/jsirois-aurora/snapshot.tar.gz 0.12.0
... pants install fine and the build proceeds ...



On Tue, Apr 26, 2016 at 8:12 AM, Mauricio Garavaglia <
mauriciogaravag...@gmail.com> wrote:

> Hi guys, I'm trying to build the 0.12 client from within the vagrant
> environment and aurora-packaging. I'm constantly getting the following
> error message, I already tried cleaning pants cache without success. Any
> ideas? it always seem to fail on lockfile-0.10.2. Thanks.
>
> **** Failed to install lockfile-0.10.2. stdout:
>
> Installed /tmp/tmpVFt3Mh/lockfile-0.10.2/pbr-1.9.1-py2.7.egg
>
> **** Failed to install lockfile-0.10.2. stderr:
> ERROR:root:Error parsing
> Traceback (most recent call last):
>   File "/tmp/tmpVFt3Mh/lockfile-0.10.2/pbr-1.9.1-py2.7.egg/pbr/core.py",
> line 111, in pbr
>     attrs = util.cfg_to_args(path, dist.script_args)
>   File "/tmp/tmpVFt3Mh/lockfile-0.10.2/pbr-1.9.1-py2.7.egg/pbr/util.py",
> line 264, in cfg_to_args
>     wrap_commands(kwargs)
>   File "/tmp/tmpVFt3Mh/lockfile-0.10.2/pbr-1.9.1-py2.7.egg/pbr/util.py",
> line 573, in wrap_commands
>     cmdclass = ep.load(False)
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/lib/python2.7/site-packages/pkg_resources.py",
> line 2190, in load
>     ['__name__'])
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/lib/python2.7/site-packages/pex/commands/bdist_pex.py",
> line 6, in <module>
>     from pex.bin.pex import build_pex, configure_clp
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/lib/python2.7/site-packages/pex/bin/pex.py",
> line 21, in <module>
>     from pex.crawler import Crawler
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/lib/python2.7/site-packages/pex/crawler.py",
> line 12, in <module>
>     from .http import Context
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/lib/python2.7/site-packages/pex/http.py",
> line 19, in <module>
>     import requests
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/lib/python2.7/site-packages/requests/__init__.py",
> line 53, in <module>
>     from .packages.urllib3.contrib import pyopenssl
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/lib/python2.7/site-packages/requests/packages/__init__.py",
> line 49, in load_module
>     if name in sys.modules:
> AttributeError: 'NoneType' object has no attribute 'modules'
> error in setup command: Error parsing
> /tmp/tmpVFt3Mh/lockfile-0.10.2/setup.cfg: AttributeError: 'NoneType' object
> has no attribute 'modules'
>
> Exception caught: (<class 'pex.resolver.Untranslateable'>)
>   File "/aurora/.cache/pants/setup/bootstrap/0.0.70/bin/pants", line 11, in
> <module>
>     sys.exit(main())
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/local/lib/python2.7/site-packages/pants/bin/pants_exe.py",
> line 44, in main
>     PantsRunner(exiter).run()
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/local/lib/python2.7/site-packages/pants/bin/pants_runner.py",
> line 53, in run
>     options_bootstrapper=options_bootstrapper)
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/local/lib/python2.7/site-packages/pants/bin/pants_runner.py",
> line 43, in _run
>     return LocalPantsRunner(exiter, args, env,
> options_bootstrapper=options_bootstrapper).run()
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/local/lib/python2.7/site-packages/pants/bin/local_pants_runner.py",
> line 49, in run
>     self._maybe_profiled(self._run)
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/local/lib/python2.7/site-packages/pants/bin/local_pants_runner.py",
> line 46, in _maybe_profiled
>     runner()
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/local/lib/python2.7/site-packages/pants/bin/local_pants_runner.py",
> line 55, in _run
>     options, build_config = OptionsInitializer(options_bootstrapper,
> exiter=self._exiter).setup()
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/local/lib/python2.7/site-packages/pants/bin/goal_runner.py",
> line 58, in __init__
>     self._working_set = working_set or
> PluginResolver(self._options_bootstrapper).resolve()
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/local/lib/python2.7/site-packages/pants/bin/plugin_resolver.py",
> line 49, in resolve
>     for plugin_location in self._resolve_plugin_locations():
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/local/lib/python2.7/site-packages/pants/bin/plugin_resolver.py",
> line 73, in _resolve_exact_plugin_locations
>     for plugin in self._resolve_plugins():
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/local/lib/python2.7/site-packages/pants/bin/plugin_resolver.py",
> line 93, in _resolve_plugins
>     cache_ttl=self._python_setup.resolver_cache_ttl)
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/local/lib/python2.7/site-packages/pex/resolver.py",
> line 346, in resolve
>     return resolver.resolve(resolvables_from_iterable(requirements,
> builder))
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/local/lib/python2.7/site-packages/pex/resolver.py",
> line 200, in resolve
>     dist = self.build(package, resolvable.options)
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/local/lib/python2.7/site-packages/pex/resolver.py",
> line 257, in build
>     dist = super(CachingResolver, self).build(package, options)
>   File
>
> "/aurora/.cache/pants/setup/bootstrap/pants.A1leHT/install/local/lib/python2.7/site-packages/pex/resolver.py",
> line 168, in build
>     raise Untranslateable('Package %s is not translateable by %s' %
> (package, translator))
>
> Exception message: Package
>
> SourcePackage(u'file:///aurora/.cache/pants/plugins/lockfile-0.10.2.tar.gz')
> is not translateable by ChainedTranslator(EggTranslator, SourceTranslator)
>

Reply via email to