This still does not complile without adjusting the PKGBUILD per comments from myself and from @Xeonacid.
Search Criteria
Package Details: python-coincurve 21.0.0-2
Package Actions
Git Clone URL: | https://aur.archlinux.org/python-coincurve.git (read-only, click to copy) |
---|---|
Package Base: | python-coincurve |
Description: | Cross-platform Python CFFI bindings for libsecp256k1 |
Upstream URL: | https://github.com/ofek/coincurve |
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: | 2025-03-16 16:46 (UTC) |
Dependencies (8)
- libsecp256k1 (libsecp256k1-gitAUR)
- python (python37AUR, python311AUR, python310AUR)
- python-build (make)
- python-cffi (make)
- python-hatchling (python-hatchling-gitAUR) (make)
- python-installer (make)
- python-scikit-build-core (make)
- python-wheel (make)
Required by (8)
Sources (1)
frankspace commented on 2025-03-15 13:41 (UTC)
Xeonacid commented on 2025-01-19 13:59 (UTC)
The PKGBUILD should adhere to Python package guidelines and some other improvements:
- It may not use --skip-dependency-check
when building
- It should use check()
to run tests
- What does PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/"
use for? It builds fine wihout it.
- Docs can be built with sphinx
- (make)depends should be depends=(glibc python python-asn1crypto python-cffi)
makedepends=(python-build python-installer python-setuptools python-wheel python-hatchling python-scikit-build-core)
My adjusted PKGBUILD can be used as a reference.
I'd like to co-maintain the package if applicable.
frankspace commented on 2024-09-06 13:41 (UTC)
Okay, I've solved it, everyone.
First: this package depends on python-hatchling
and python-scikit-build-core
, both of which should be added to the makedeps in the PKGBUILD. But also...
Second, as it turns out, this depends on the current version of python-scikit-build-core
, which, as of this writing, is 0.10.5; unfortunately, the version in Arch's repo is the out-of-date version 0.9.3, which does not work. (I'm about to go flag it as out of date.) But if you compile your own current version of python-scikit-build-core
, which doesn't seem to require any changes to Arch's PKGBUILD beyond the usual updating the version and hashes, and you install that in your chroot, this package compiles just fine.
frankspace commented on 2024-09-05 11:56 (UTC)
As an additional data point, removing the skip-dependency-check switch from the build() function and just going with python -m build --wheel --no-isolation
breaks with the following error:
==> Starting build()...
* Getting build dependencies for wheel...
Could not determine CMake version, got '{"debugger":true,"fileApi":{"requests":[{"kind":"codemodel","version":[{"major":2,"minor":7}]},{"kind":"configureLog","version":[{"major":1,"minor":0}]},{"kind":"cache","version":[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":[{"major":1,"minor":1}]},{"kind":"toolchains","version":[{"major":1,"minor":0}]}]},"generators":[{"extraGenerators":[],"name":"Watcom WMake","platformSupport":false,"toolsetSupport":false},{"extraGenerators":["Kate"],"name":"Ninja Multi-Config","platformSupport":false,"toolsetSupport":false},{"extraGenerators":["CodeBlocks","CodeLite","Eclipse CDT4","Kate","Sublime Text 2"],"name":"Ninja","platformSupport":false,"toolsetSupport":false},{"extraGenerators":["CodeBlocks","CodeLite","Eclipse CDT4","Kate","Sublime Text 2"],"name":"Unix Makefiles","platformSupport":false,"toolsetSupport":false},{"extraGenerators":[],"name":"Green Hills MULTI","platformSupport":true,"toolsetSupport":true}],"serverMode":false,"tls":true,"version":{"isDirty":true,"major":3,"minor":30,"patch":3,"string":"3.30.3-dirty","suffix":""}}\n'
ERROR Missing dependencies:
cmake>=3.15
==> ERROR: A failure occurred in build().
Aborting...
Which still makes no sense, because cmake is definitely installed in my chroot, and the exact same thing happens if I just use makepkg
outside of a chroot. I wonder if this is actually something wrong with python-scikit-build-core
, though, which this package explicitly needs.
frankspace commented on 2024-08-19 11:30 (UTC)
I have the same problem as @Spixmaster. If I install python-hatchling
and python-scikit-build-core
, compilation gets only slightly further, failing with the following:
==> Starting build()...
* Building wheel...
2024-08-19 11:22:25,088 - scikit_build_core - WARNING - Could not determine CMake version, got '{"debugger":true,"fileApi":{"requests":[{"kind":"codemodel","version":[{"major":2,"minor":7}]},{"kind":"configureLog","version":[{"major":1,"minor":0}]},{"kind":"cache","version":[{"major":2,"minor":0}]},{"kind":"cmakeFiles","version":[{"major":1,"minor":1}]},{"kind":"toolchains","version":[{"major":1,"minor":0}]}]},"generators":[{"extraGenerators":[],"name":"Watcom WMake","platformSupport":false,"toolsetSupport":false},{"extraGenerators":["Kate"],"name":"Ninja Multi-Config","platformSupport":false,"toolsetSupport":false},{"extraGenerators":["CodeBlocks","CodeLite","Eclipse CDT4","Kate","Sublime Text 2"],"name":"Ninja","platformSupport":false,"toolsetSupport":false},{"extraGenerators":["CodeBlocks","CodeLite","Eclipse CDT4","Kate","Sublime Text 2"],"name":"Unix Makefiles","platformSupport":false,"toolsetSupport":false},{"extraGenerators":[],"name":"Green Hills MULTI","platformSupport":true,"toolsetSupport":true}],"serverMode":false,"tls":true,"version":{"isDirty":true,"major":3,"minor":30,"patch":2,"string":"3.30.2-dirty","suffix":""}}\n'
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
main()
File "/usr/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 271, in build_wheel
return _build_backend().build_wheel(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/hatchling/build.py", line 58, in build_wheel
return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard'])))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/hatchling/builders/plugin/interface.py", line 147, in build
build_hook.initialize(version, build_data)
File "/usr/lib/python3.12/site-packages/scikit_build_core/hatch/plugin.py", line 125, in initialize
self._initialize(build_data=build_data)
File "/usr/lib/python3.12/site-packages/scikit_build_core/hatch/plugin.py", line 143, in _initialize
cmake = CMake.default_search(version=settings.cmake.version, env=os.environ)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/scikit_build_core/cmake.py", line 63, in default_search
raise CMakeNotFoundError(msg)
scikit_build_core.errors.CMakeNotFoundError: Could not find CMake with version >=3.15
ERROR Backend subprocess exited when trying to invoke build_wheel
Cmake is definitely installed in my chroot. Bafflingly, searching for the phrase "could not determine cmake version" gets almost no results whatsoever.
Spixmaster commented on 2024-08-17 09:07 (UTC) (edited on 2024-08-17 09:12 (UTC) by Spixmaster)
Does not build. python-hatchling
is a missing dependency.
==> Beginne build()...
* Building wheel...
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/pyproject_hooks/_impl.py", line 402, in _call_hook
raise BackendUnavailable(
pyproject_hooks._impl.BackendUnavailable: Cannot import 'hatchling.build'
ERROR Backend 'hatchling.build' is not available.
Even with pyhton-hatchling
installed, there is still something missing.
==> Beginne build()...
* Building wheel...
Traceback (most recent call last):
File "/usr/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
main()
File "/usr/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 271, in build_wheel
return _build_backend().build_wheel(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/hatchling/build.py", line 58, in build_wheel
return os.path.basename(next(builder.build(directory=wheel_directory, versions=['standard'])))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/hatchling/builders/plugin/interface.py", line 116, in build
configured_build_hooks = self.get_build_hooks(directory)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/site-packages/hatchling/builders/plugin/interface.py", 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
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 <caznaranl@uni.pe>
# Contributor: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: redfish <redfish@galactica.pw>
_base=coincurve
pkgname=python-${_base}
pkgver=20.0.0
pkgrel=1
pkgdesc="Cross-platform Python CFFI bindings for libsecp256k1"
arch=(x86_64)
url="https://github.com/ofek/${_base}"
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)
source=(${_base}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz)
sha512sums=('f956502eb5614be62579b1eeec356e286bdd74c93699f8d21698f5f510d00dbde89258baab92e9bb917c9c2f51898fc0d0dc66a2e98dc54b6996e0262b055d3b')
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:
#!/bin/bash
# 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/_impl.py", line 402, in _call_hook
raise BackendUnavailable(
pyproject_hooks._impl.BackendUnavailable: Cannot import 'hatchling.build'
ERROR Backend 'hatchling.build' is not available.
after installing python-hatchling:
File "/usr/lib/python3.12/site-packages/hatchling/builders/plugin/interface.py", 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
Pinned Comments
carlosal1015 commented on 2023-05-20 03:16 (UTC)
18.0.0 is not support with old libsecp256k1