Securedrop: latest setuptools breaking the securedrop-admin setup

Created on 29 Apr 2020  路  6Comments  路  Source: freedomofpress/securedrop

Description

When I am trying to setup securedrop-admin in Tails 4.5 fresh, the latest setuptools breaks MarkupSafe installation in the virtual environment.

Steps to Reproduce

  • [ ] Fresh Tails 4.5, run ./securedrop-admin setup

Expected Behavior

It should install all dependencies properly.

Actual Behavior

Collecting ansible==2.7.13
  Using cached ansible-2.7.13.tar.gz (11.9 MB)
Collecting asn1crypto==0.24.0
  Using cached asn1crypto-0.24.0-py2.py3-none-any.whl (101 kB)
Collecting bcrypt==3.1.4
  Using cached bcrypt-3.1.4.tar.gz (42 kB)
Collecting cffi==1.11.4
  Using cached cffi-1.11.4.tar.gz (436 kB)
Collecting cryptography==2.7
  Using cached cryptography-2.7-cp34-abi3-manylinux1_x86_64.whl (2.3 MB)
Collecting jinja2==2.10.1
  Using cached Jinja2-2.10.1-py2.py3-none-any.whl (124 kB)
Collecting markupsafe==1.0
  Using cached MarkupSafe-1.0.tar.gz (14 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/amnesia/Persistent/securedrop/admin/.venv3/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-jltc9g_o/markupsafe/setup.py'"'"'; __file__='"'"'/tmp/pip-install-jltc9g_o/markupsafe/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-1wpm35w7
         cwd: /tmp/pip-install-jltc9g_o/markupsafe/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-jltc9g_o/markupsafe/setup.py", line 6, in <module>
        from setuptools import setup, Extension, Feature
    ImportError: cannot import name 'Feature' from 'setuptools' (/home/amnesia/Persistent/securedrop/admin/.venv3/lib/python3.7/site-packages/setuptools/__init__.py)
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Comments

There is already an upstream bug https://github.com/pypa/setuptools/issues/2017. If I manually downgrade the version of setuptools to 45.3.0, everything works smooth.

Release

All 6 comments

Those dependencies seem out of date, see latest develop where we're using Markupsafe==1.1.1: https://github.com/freedomofpress/securedrop/blob/develop/admin/requirements.txt#L63 - is this on an older branch?

I was installing from 1.2.0 branch for a fresh install.

This seems like issue #5155, can you try on 1.2.2? (should be resolved there)

Closing as the issue was in my side.

Closing as the issue was in my side.

Kushal - if you have time, always good to document what went wrong, for future generations of issue archaeologists. :)

Was this page helpful?
0 / 5 - 0 ratings