Merge pull request #176269 from SuperSandro2000/secp256k1

python310Packages.secp256k1: cleanup
This commit is contained in:
Fabian Affolter 2022-06-04 23:25:05 +02:00 committed by GitHub
commit 6e8b274b3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,8 +2,7 @@
, buildPythonPackage
, fetchPypi
, pkg-config
, pytest
, pytest-runner
, pytestCheckHook
, cffi
, secp256k1
}:
@ -17,30 +16,27 @@ buildPythonPackage rec {
sha256 = "82c06712d69ef945220c8b53c1a0d424c2ff6a1f64aee609030df79ad8383397";
};
postPatch = ''
# don't do hacky tarball download + setuptools check
sed -i '38,54d' setup.py
substituteInPlace setup.py --replace ", 'pytest-runner==2.6.2'" ""
'';
nativeBuildInputs = [ pkg-config ];
checkInputs = [ pytest pytest-runner ];
propagatedBuildInputs = [ cffi secp256k1 ];
checkInputs = [ pytestCheckHook ];
# Tests are not included in archive
doCheck = false;
preConfigure = ''
cp -r ${secp256k1.src} libsecp256k1
touch libsecp256k1/autogen.sh
export INCLUDE_DIR=${secp256k1}/include
export LIB_DIR=${secp256k1}/lib
'';
checkPhase = ''
py.test tests
'';
postPatch = ''
# don't do hacky tarball download + setuptools check
sed -i '38,54d' setup.py
substituteInPlace setup.py --replace ", 'pytest-runner==2.6.2'" ""
'';
meta = {
homepage = "https://github.com/ludbb/secp256k1-py";
description = "Python FFI bindings for secp256k1";