Загрузка, но не установка argon2-cffi

#python #pip #pypiserver

#python #pip #pypiserver

Вопрос:

Мы размещаем простой сервер pypi в нашей компании.

Эта команда работает для большинства пакетов pip, но для argon2-cffi :

 pypi@pypihost:~> pip install  -d packages argon2-cffi
Collecting argon2-cffi
  File was already downloaded packages/argon2_cffi-16.2.0.tar.gz
    Complete output from command python setup.py egg_info:
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    Package libffi was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libffi.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libffi' found
    c/_cffi_backend.c:15:17: fatal error: ffi.h: Datei oder Verzeichnis nicht gefunden
    compilation terminated.
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/pypi/tmp/pip-build-LJ1EjJ/argon2-cffi/setup.py", line 206, in <module>
        extras_require=EXTRAS_REQUIRE,
      File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "/home/pypi/lib/python2.7/site-packages/setuptools/dist.py", line 265, in __init__
        self.fetch_build_eggs(attrs['setup_requires'])
      File "/home/pypi/lib/python2.7/site-packages/setuptools/dist.py", line 310, in fetch_build_eggs
        replace_conflicting=True,
      File "/home/pypi/lib/python2.7/site-packages/pkg_resources/__init__.py", line 824, in resolve
        dist = best[req.key] = env.best_match(req, ws, installer)
      File "/home/pypi/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1069, in best_match
        return self.obtain(req, installer)
      File "/home/pypi/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1081, in obtain
        return installer(requirement)
      File "/home/pypi/lib/python2.7/site-packages/setuptools/dist.py", line 377, in fetch_build_egg
        return cmd.easy_install(req)
      File "/home/pypi/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 629, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/home/pypi/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 659, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/home/pypi/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 842, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/home/pypi/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1070, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/home/pypi/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1058, in run_setup
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /home/pypi/tmp/pip-build-LJ1EjJ/argon2-cffi/
 

Я не хочу, чтобы в этом случае запускался gcc, поскольку я хочу только загрузить его.

Что я делаю не так?

Я использую SuSE Linux 12.3

Комментарии:

1. Какая у вас операционная система? Кажется, вам нужно установить пакеты libffi-dev.

2. @alpert да, libffi-dev необходим для сборки пакета. Я просто хочу загрузить его и сделать доступным на нашем сервере pypi в локальной сети. Я думаю, что это ошибка, о которой говорится в сборке. Сборка должна начаться, если я установлю ее на хост в нашей сети с нашего локального сервера pypi.

Ответ №1:

Большое «спасибо» Хайнеку Шлаваку, он исправил эту проблему: https://github.com/hynek/argon2_cffi/issues/17

argon2_cffi теперь можно загрузить без запуска процесса компиляции.