ofek / coincurve

Cross-platform Python bindings for libsecp256k1
https://ofek.dev/coincurve/
Apache License 2.0
151 stars 46 forks source link

Cannot build on Windows 11 arm64 #123

Open kigawas opened 1 year ago

kigawas commented 1 year ago

From https://github.com/ecies/py/issues/304#issue-1609837250

Windows 11 ARM Version: 10.0.22621.1265 Python3 ARM Version: 3.11.2

C:\Users\hauntek>pip list
Package            Version
------------------ ---------
certifi            2022.12.7
charset-normalizer 3.0.1
idna               3.4
pip                23.0.1
requests           2.28.2
setuptools         67.4.0
urllib3            1.26.14
C:\Users\hauntek>pip install eciespy
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
Collecting eciespy
  Using cached https://mirrors.aliyun.com/pypi/packages/e0/88/baee21b6d0a44a9d33a8913cff5a6a52459fd8128b2982c0e4b88f5b98d4/eciespy-0.3.13-py3-none-any.whl (11 kB)
Collecting coincurve<18,>=13
  Using cached https://mirrors.aliyun.com/pypi/packages/a8/8d/74eb01cbf256ecb10140bf67e1a2e0f5ac1751fbc1347bc7e52f399f2b89/coincurve-17.0.0.tar.gz (2.5 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Collecting eth-keys<0.5.0,>=0.4.0
  Using cached https://mirrors.aliyun.com/pypi/packages/32/37/bf429c57076d129c02316a3bdd7a513478396e302b40f20edc70704338af/eth_keys-0.4.0-py3-none-any.whl (21 kB)
Collecting pycryptodome<4.0.0,>=3.15.0
  Using cached https://mirrors.aliyun.com/pypi/packages/b8/2e/cf9cfd1ae6429381d3d9c14c8df79d91ae163929972f245a76058ea9d37d/pycryptodome-3.17.tar.gz (4.6 MB)
  Preparing metadata (setup.py) ... done
Collecting asn1crypto
  Using cached https://mirrors.aliyun.com/pypi/packages/c9/7f/09065fd9e27da0eda08b4d6897f1c13535066174cc023af248fc2a8d5e5a/asn1crypto-1.5.1-py2.py3-none-any.whl (105 kB)
Collecting cffi>=1.3.0
  Using cached https://mirrors.aliyun.com/pypi/packages/2b/a8/050ab4f0c3d4c1b8aaa805f70e26e84d0e27004907c5b8ecc1d31815f92a/cffi-1.15.1.tar.gz (508 kB)
  Preparing metadata (setup.py) ... done
Collecting eth-utils<3.0.0,>=2.0.0
  Using cached https://mirrors.aliyun.com/pypi/packages/f6/0e/f764539995186b032581473a537c3fe2f4cb7e8f4b722397be8410fbb769/eth_utils-2.1.0-py3-none-any.whl (24 kB)
Collecting eth-typing<4,>=3.0.0
  Using cached https://mirrors.aliyun.com/pypi/packages/32/82/1d22c53ca83861ead17b761d371e0f0372adb220dd1be2ff2fd0feb26f8f/eth_typing-3.2.0-py3-none-any.whl (6.3 kB)
Collecting pycparser
  Using cached https://mirrors.aliyun.com/pypi/packages/62/d5/5f610ebe421e85889f2e55e33b7f9a6795bd982198517d912eb1c76e1a53/pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting eth-hash>=0.3.1
  Using cached https://mirrors.aliyun.com/pypi/packages/b4/e7/bf4d54952c1665a2a84990b998e2cbf4bf2bcc96099a10e150ff8344122c/eth_hash-0.5.1-py3-none-any.whl (9.0 kB)
Collecting cytoolz>=0.10.1
  Using cached cytoolz-0.12.1-cp311-cp311-win_arm64.whl
Collecting toolz>=0.8.0
  Using cached https://mirrors.aliyun.com/pypi/packages/7f/5c/922a3508f5bda2892be3df86c74f9cf1e01217c2b1f8a0ac4841d903e3e9/toolz-0.12.0-py3-none-any.whl (55 kB)
Building wheels for collected packages: coincurve
  Building wheel for coincurve (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for coincurve (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [17 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-arm64-cpython-311
      creating build\lib.win-arm64-cpython-311\coincurve
      copying coincurve\context.py -> build\lib.win-arm64-cpython-311\coincurve
      copying coincurve\ecdsa.py -> build\lib.win-arm64-cpython-311\coincurve
      copying coincurve\flags.py -> build\lib.win-arm64-cpython-311\coincurve
      copying coincurve\keys.py -> build\lib.win-arm64-cpython-311\coincurve
      copying coincurve\types.py -> build\lib.win-arm64-cpython-311\coincurve
      copying coincurve\utils.py -> build\lib.win-arm64-cpython-311\coincurve
      copying coincurve\_windows_libsecp256k1.py -> build\lib.win-arm64-cpython-311\coincurve
      copying coincurve\__init__.py -> build\lib.win-arm64-cpython-311\coincurve
      copying coincurve\py.typed -> build\lib.win-arm64-cpython-311\coincurve
      running build_clib
      error: [WinError 193] %1 is not a valid Win32 application
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for coincurve
Failed to build coincurve
ERROR: Could not build wheels for coincurve, which is required to install pyproject.toml-based projects