Package Details: python-coincurve 20.0.0-1

Git Clone URL: (read-only, click to copy)
Package Base: python-coincurve
Description: Cross-platform Python CFFI bindings for libsecp256k1
Upstream URL:
Licenses: MIT, Apache-2.0
Submitter: redfish
Maintainer: carlosal1015
Last Packager: carlosal1015
Votes: 3
Popularity: 0.000000
First Submitted: 2019-03-30 01:18 (UTC)
Last Updated: 2024-06-02 21:29 (UTC)

Pinned Comments

carlosal1015 commented on 2023-05-20 03:16 (UTC)

18.0.0 is not support with old libsecp256k1

Latest Comments

1 2 Next › Last »

592543475257 commented on 2024-06-17 03:35 (UTC)

Steps to Create a VENV in /tmp, Modify pyvenv.cfg, Activate VENV, and Build with Updated PKGBUILD Step 1: Create a Virtual Environment in /tmp

python -m venv /tmp/build_env

Step 2: Modify pyvenv.cfg to Include System Site Packages

sed -i 's/include-system-site-packages = false/include-system-site-packages = true/' /tmp/build_env/pyvenv.cfg

Step 3: Activate the Virtual Environment

source /tmp/build_env/bin/activate

Step 4: Install Necessary Python Packages

pip install --upgrade pip setuptools wheel hatchling scikit-build-core

Step 5: Clone the AUR Package and Update PKGBUILD

Create a new directory for the build and clone the AUR package into it:

mkdir -p /tmp/python-coincurve
cd /tmp/python-coincurve
trizen -G python-coincurve

Update the `PKGBUILD` as shown below and save it:

# Maintainer: Carlos Aznarán <>
# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: redfish <>
pkgdesc="Cross-platform Python CFFI bindings for libsecp256k1"
license=(Apache-2.0 MIT)
depends=(python-asn1crypto python-cffi libsecp256k1)
makedepends=(python-build python-installer python-setuptools python-wheel python-requests python-hatchling python-scikit-build-core)

prepare() {
  cd ${_base}-${pkgver}
  pip install --upgrade pip
  pip install --upgrade setuptools wheel hatchling scikit-build-core

build() {
  cd ${_base}-${pkgver}
  python -m build --wheel --no-isolation

package() {
  cd ${_base}-${pkgver}
  PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python -m installer --destdir="${pkgdir}" dist/*.whl
  install -Dm 644 LICENSE-{APACHE,MIT} -t "${pkgdir}/usr/share/licenses/${pkgname}"

Step 6: Build and Install the Package

makepkg -si

Full Example Script

Here’s a complete script that includes all the steps:

# Create a virtual environment in /tmp
python -m venv /tmp/build_env

# Modify pyvenv.cfg to include system site packages
sed -i 's/include-system-site-packages = false/include-system-site-packages = true/' /tmp/build_env/pyvenv.cfg

# Activate the virtual environment
source /tmp/build_env/bin/activate

# Install necessary Python packages
pip install --upgrade pip setuptools wheel hatchling scikit-build-core

# Prepare the build directory
mkdir -p /tmp/python-coincurve
cd /tmp/python-coincurve
trizen -G python-coincurve

# Update PKGBUILD as shown above
# Note: You can use an editor to make these changes or use a script to replace the content.

# Build and install the package
makepkg -si

This script ensures that the virtual environment is created and configured correctly, and the package is built and installed using the updated PKGBUILD.

than install with "sudo pacman -U ... "

kinoe commented on 2024-06-05 05:02 (UTC) (edited on 2024-06-05 05:02 (UTC) by kinoe)

Installing 'python-scikit-build-core' did the trick. It seems that python-hatchling and python-scikit-build-core are dependencies!?

kinoe commented on 2024-06-02 22:10 (UTC) (edited on 2024-06-05 04:55 (UTC) by kinoe)

Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/pyproject_hooks/", line 402, in _call_hook
    raise BackendUnavailable(
pyproject_hooks._impl.BackendUnavailable: Cannot import ''

ERROR Backend '' is not available.

after installing python-hatchling:

  File "/usr/lib/python3.12/site-packages/hatchling/builders/plugin/", line 386, in get_build_hooks
    raise UnknownPluginError(message)
hatchling.plugin.exceptions.UnknownPluginError: Unknown build hook: scikit-build

ERROR Backend subprocess exited when trying to invoke build_wheel

installing python-scikit-build doesn't make a difference

carlosal1015 commented on 2023-05-20 03:16 (UTC)

18.0.0 is not support with old libsecp256k1

whoami commented on 2021-10-01 04:49 (UTC)

==> Starting build()...
WARNING: The wheel package is not available.
/usr/bin/python: No module named pip
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/setuptools/", line 75, in fetch_build_egg
  File "/usr/lib/python3.9/", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp3dcdot4n', '--quiet', 'requests']' returned non-zero exit status 1.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/user/.cache/paru/clone/python-coincurve/src/coincurve-15.0.0/", line 260, in <module>
  File "/usr/lib/python3.9/site-packages/setuptools/", line 152, in setup
  File "/usr/lib/python3.9/site-packages/setuptools/", line 147, in _install_setup_requires
  File "/usr/lib/python3.9/site-packages/setuptools/", line 785, in fetch_build_eggs
    resolved_dists = pkg_resources.working_set.resolve(
  File "/usr/lib/python3.9/site-packages/pkg_resources/", line 766, in resolve
    dist = best[req.key] = env.best_match(
  File "/usr/lib/python3.9/site-packages/pkg_resources/", line 1051, in best_match
    return self.obtain(req, installer)
  File "/usr/lib/python3.9/site-packages/pkg_resources/", line 1063, in obtain
    return installer(requirement)
  File "/usr/lib/python3.9/site-packages/setuptools/", line 844, in fetch_build_egg
    return fetch_build_egg(self, req)
  File "/usr/lib/python3.9/site-packages/setuptools/", line 77, in fetch_build_egg
    raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp3dcdot4n', '--quiet', 'requests']' returned non-zero exit status 1.
==> ERROR: A failure occurred in build().
error: failed to build 'python-coincurve-15.0.0-1': 

Popolon commented on 2020-07-04 17:32 (UTC) (edited on 2020-07-04 17:33 (UTC) by Popolon)

With or without libsecp256k1, I have the following error (it links an internal version of this lib (CC src/libsecp256k1_la-secp256k1.lo ) :

running build_ext
generating cffi module 'build/temp.linux-x86_64-3.8/_libsecp256k1.c'
Traceback (most recent call last):
  File "", line 250, in <module>
  File "/usr/lib/python3.8/site-packages/setuptools/", line 164, in setup
    return distutils.core.setup(**attrs)
  File "/usr/lib/python3.8/site-packages/setuptools/_distutils/", line 148, in setup
  File "/usr/lib/python3.8/site-packages/setuptools/_distutils/", line 967, in run_commands
  File "/usr/lib/python3.8/site-packages/setuptools/_distutils/", line 986, in run_command
  File "/usr/lib/python3.8/site-packages/setuptools/_distutils/command/", line 135, in run
  File "/usr/lib/python3.8/site-packages/setuptools/_distutils/", line 313, in run_command
  File "/usr/lib/python3.8/site-packages/setuptools/_distutils/", line 986, in run_command
  File "/usr/lib/python3.8/site-packages/cffi/", line 142, in run
  File "", line 209, in run
  File "/usr/lib/python3.8/distutils/command/", line 340, in run
  File "/usr/lib/python3.8/distutils/command/", line 445, in build_extensions
  File "/usr/lib/python3.8/distutils/command/", line 362, in check_extensions_list
    raise DistutilsSetupError(
distutils.errors.DistutilsSetupError: each element of 'ext_modules' option must be an Extension instance or 2-tuple

redfish commented on 2020-05-24 03:59 (UTC)

@Ergo: did you try suggestions by @mborder below? Package builds for me.

Ergus commented on 2020-04-05 22:08 (UTC)

Still getting the same error:

build/temp.linux-x86_64-3.8/_libsecp256k1.c:541:10: fatal error: secp256k1_ecdh.h: No such file or directory 541 | #include <secp256k1_ecdh.h> | ^~~~~~~~~~~~~~~~~~ compilation terminated. error: command 'gcc' failed with exit status 1 ==> ERROR: A failure occurred in build(). Aborting... Error making: python-coincurve

sehraf commented on 2019-12-17 07:58 (UTC)

Thanks! That totally did the trick! Removing libsecp256k1 temporarily and python-coincurve builds fine.

Thank you for looking into this.