#26952: Mention the need to install libffi-dev prior to installing packages for
tests
-------------------------------+--------------------
Reporter: edmorley | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------+--------------------
The contributing guide explains how to install the Python packages
required to run the tests in a couple of places:
https://docs.djangoproject.com/en/dev/intro/contributing/#running-django-s
-test-suite-for-the-first-time
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code
/unit-tests/#running-all-the-tests
However the `pip install tests/requirements/py*.txt` will fail during the
installation of `argon2-cffi` unless `libffi-dev` is installed, with a
delightful error like:
{{{
$ pip install -r requirements/py2.txt
Collecting argon2-cffi>=16.1.0 (from -r requirements/base.txt (line 1))
Downloading argon2_cffi-16.1.0.tar.gz (1.2MB)
100% |################################| 1.2MB 1.1MB/s
Complete output from command python setup.py egg_info:
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
compilation terminated.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-PCA0QU/argon2-cffi/setup.py", line 160, in
<module>
extras_require=EXTRAS_REQUIRE,
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/home/vagrant/.virtualenvs/django/local/lib/python2.7/site-
packages/setuptools/dist.py", line 348, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/home/vagrant/.virtualenvs/django/local/lib/python2.7/site-
packages/setuptools/dist.py", line 394, in fetch_build_eggs
replace_conflicting=True,
File "/home/vagrant/.virtualenvs/django/local/lib/python2.7/site-
packages/pkg_resources/__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/home/vagrant/.virtualenvs/django/local/lib/python2.7/site-
packages/pkg_resources/__init__.py", line 1092, in best_match
return self.obtain(req, installer)
File "/home/vagrant/.virtualenvs/django/local/lib/python2.7/site-
packages/pkg_resources/__init__.py", line 1104, in obtain
return installer(requirement)
File "/home/vagrant/.virtualenvs/django/local/lib/python2.7/site-
packages/setuptools/dist.py", line 461, in fetch_build_egg
return cmd.easy_install(req)
File "/home/vagrant/.virtualenvs/django/local/lib/python2.7/site-
packages/setuptools/command/easy_install.py", line 664, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "/home/vagrant/.virtualenvs/django/local/lib/python2.7/site-
packages/setuptools/command/easy_install.py", line 694, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/home/vagrant/.virtualenvs/django/local/lib/python2.7/site-
packages/setuptools/command/easy_install.py", line 875, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/home/vagrant/.virtualenvs/django/local/lib/python2.7/site-
packages/setuptools/command/easy_install.py", line 1114, in
build_and_install
self.run_setup(setup_script, setup_base, args)
File "/home/vagrant/.virtualenvs/django/local/lib/python2.7/site-
packages/setuptools/command/easy_install.py", line 1102, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error:
command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-
build-PCA0QU/argon2-cffi/
}}}
Many people will know immediately what the issue is (or one would hope
after Googling), however it would probably be good to state the
requirement explicitly and also mention in the troubleshooting section
:-)
--
Ticket URL: <https://code.djangoproject.com/ticket/26952>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/051.ebf8b5dbd5483c1fd0e6ca6161190d64%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.