pantsbuild.pants <= 0.0.79 install failure - lockfile break

89 views
Skip to first unread message

John Sirois

unread,
Apr 26, 2016, 11:24:38 AM4/26/16
to pants-devel
If you use pants <= 0.0.79, it has a dependency [1] on the lockfile package [2].  Although pants pins its dependency to a fixed version of lockfile, lockfile in turn depends on the pbr package and, unfortunately, the lockfile dep on pbr is unbounded [3][4].  As a result, a pbr release (1.9.1) on 4/14/2016 rendered pants <= 0.0.79 unable to install [5].  Install errors look like so:

"/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'

If you use pants <= 0.0.79 you can work around install issues by either upgrading pants to 0.0.80 or beyond where the lockfile dependency is removed, or you can pin the pbr dependency on lockfile's behalf.  If you use the standard pants bootstrap script [6] this edit accomplished the goal:

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

Here we ask pip to install both pants and pbr at version 1.9.0 - the version before the breaking 4/14 release.

Please speak up if you are hitting the issue and are unable to apply the above workaround due to a custom pants setup procedure, we may be able to help.

Reply all
Reply to author
Forward
0 new messages