ofek/coincurve

Failed to build coincurve

MioYvo opened this issue · 2 comments

I try to install coincurve==14.0.0 in alpine linux in a Docker image
Dockerfile

FROM python:3.7-alpine3.12

RUN apk add --no-cache --virtual .build-deps \
    build-base libffi-dev automake pkgconfig libtool python3-dev \
    && pip install --no-cache-dir coincurve==14.0.0 \
    && apk del --no-cache --purge .build-deps

Got this:

Building wheels for collected packages: coincurve, cffi
  Building wheel for coincurve (PEP 517): started
  Building wheel for coincurve (PEP 517): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmp4xuwlrkr
       cwd: /tmp/pip-install-f8meoi0r/coincurve_3edadcc6065f494387001b4d3336c4c3
  Complete output (60 lines):
  running bdist_wheel
  The [wheel] section is deprecated. Use [bdist_wheel] instead.
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/coincurve
  copying coincurve/_windows_libsecp256k1.py -> build/lib.linux-x86_64-3.7/coincurve
  copying coincurve/flags.py -> build/lib.linux-x86_64-3.7/coincurve
  copying coincurve/ecdsa.py -> build/lib.linux-x86_64-3.7/coincurve
  copying coincurve/utils.py -> build/lib.linux-x86_64-3.7/coincurve
  copying coincurve/__init__.py -> build/lib.linux-x86_64-3.7/coincurve
  copying coincurve/keys.py -> build/lib.linux-x86_64-3.7/coincurve
  copying coincurve/context.py -> build/lib.linux-x86_64-3.7/coincurve
  running build_clib
  /tmp/pip-install-f8meoi0r/coincurve_3edadcc6065f494387001b4d3336c4c3/libsecp256k1/autogen.sh: line 3: autoreconf: not found
  Traceback (most recent call last):
    File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
      main()
    File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/usr/local/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 205, in build_wheel
      metadata_directory)
    File "/tmp/pip-build-env-nbj51yia/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 217, in build_wheel
      wheel_directory, config_settings)
    File "/tmp/pip-build-env-nbj51yia/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 202, in _build_with_temp_dir
      self.run_setup()
    File "/tmp/pip-build-env-nbj51yia/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 254, in run_setup
      self).run_setup(setup_script=setup_script)
    File "/tmp/pip-build-env-nbj51yia/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 145, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 301, in <module>
      **setup_kwargs
    File "/tmp/pip-build-env-nbj51yia/overlay/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/usr/local/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/local/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "setup.py", line 93, in run
      _bdist_wheel.run(self)
    File "/tmp/pip-build-env-nbj51yia/overlay/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 299, in run
      self.run_command('build')
    File "/usr/local/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/local/lib/python3.7/distutils/command/build.py", line 135, in run
      self.run_command(cmd_name)
    File "/usr/local/lib/python3.7/distutils/cmd.py", line 313, in run_command
      self.distribution.run_command(command)
    File "/usr/local/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "setup.py", line 150, in run
      subprocess.check_call([autogen], cwd=absolute('libsecp256k1'))
    File "/usr/local/lib/python3.7/subprocess.py", line 363, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['/tmp/pip-install-f8meoi0r/coincurve_3edadcc6065f494387001b4d3336c4c3/libsecp256k1/autogen.sh']' returned non-zero exit status 127.
  ----------------------------------------
  ERROR: Failed building wheel for coincurve
  Building wheel for cffi (setup.py): started
  Building wheel for cffi (setup.py): finished with status 'done'
  Created wheel for cffi: filename=cffi-1.14.4-cp37-cp37m-linux_x86_64.whl size=187529 sha256=7a4388a6046eded4cc891334a292db06990fcb939ce840cde6969985eb8aa892
  Stored in directory: /tmp/pip-ephem-wheel-cache-bv7m4gd7/wheels/4c/8f/78/524debc9b29535cf42e590c9f2e4c41b6dfeb782128a1564e2
Successfully built cffi
Failed to build coincurve
ERROR: Could not build wheels for coincurve which use PEP 517 and cannot be installed directly

@MioYvo Can you please try: https://ofek.dev/coincurve/install/#alpine

Thanks for your reply, the image is successfully built (autoconf is required)