python311Packages.cypherpunkpay: switch to pythonRelaxDepsHook
- disable on unsupported Python releases - relax yoyo-migrations - add pythonImportsCheck - ignore deprecation warning
This commit is contained in:
parent
df4d327e59
commit
3733d82840
|
@ -1,25 +1,26 @@
|
||||||
{ stdenv
|
{ lib
|
||||||
, lib
|
, stdenv
|
||||||
, buildPythonPackage
|
|
||||||
, fetchFromGitHub
|
|
||||||
, poetry-core
|
|
||||||
, apscheduler
|
, apscheduler
|
||||||
, bitstring
|
, bitstring
|
||||||
|
, buildPythonPackage
|
||||||
, cffi
|
, cffi
|
||||||
, ecdsa
|
, ecdsa
|
||||||
|
, fetchFromGitHub
|
||||||
, monero
|
, monero
|
||||||
|
, poetry-core
|
||||||
, pypng
|
, pypng
|
||||||
, pyqrcode
|
, pyqrcode
|
||||||
, pyramid
|
, pyramid
|
||||||
, pyramid_jinja2
|
, pyramid_jinja2
|
||||||
, pysocks
|
, pysocks
|
||||||
|
, pytestCheckHook
|
||||||
|
, pythonOlder
|
||||||
|
, pythonRelaxDepsHook
|
||||||
, requests
|
, requests
|
||||||
, tzlocal
|
, tzlocal
|
||||||
, waitress
|
, waitress
|
||||||
, yoyo-migrations
|
|
||||||
, pytestCheckHook
|
|
||||||
, pytest-cov
|
|
||||||
, webtest
|
, webtest
|
||||||
|
, yoyo-migrations
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -27,6 +28,8 @@ buildPythonPackage rec {
|
||||||
version = "1.0.16";
|
version = "1.0.16";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "CypherpunkPay";
|
owner = "CypherpunkPay";
|
||||||
repo = "CypherpunkPay";
|
repo = "CypherpunkPay";
|
||||||
|
@ -34,17 +37,18 @@ buildPythonPackage rec {
|
||||||
hash = "sha256-X0DB0PVwR0gRnt3jixFzglWAOPKBMvqTOG6pK6OJ03w=";
|
hash = "sha256-X0DB0PVwR0gRnt3jixFzglWAOPKBMvqTOG6pK6OJ03w=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
pythonRelaxDeps = [
|
||||||
substituteInPlace pyproject.toml \
|
"bitstring"
|
||||||
--replace "bitstring = '^3.1.9'" "bitstring = '>=3.1.9'" \
|
"cffi"
|
||||||
--replace 'cffi = "1.15.0"' 'cffi = ">=1.15.0"' \
|
"ecdsa"
|
||||||
--replace 'ecdsa = "^0.17.0"' 'ecdsa = ">=0.17.0"' \
|
"pypng"
|
||||||
--replace 'pypng = "^0.0.20"' 'pypng = ">=0.0.20"' \
|
"tzlocal"
|
||||||
--replace 'tzlocal = "2.1"' 'tzlocal = ">=2.1"'
|
"yoyo-migrations"
|
||||||
'';
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
poetry-core
|
poetry-core
|
||||||
|
pythonRelaxDepsHook
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
@ -66,10 +70,14 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
pytest-cov
|
|
||||||
webtest
|
webtest
|
||||||
];
|
];
|
||||||
|
|
||||||
|
pytestFlagsArray = [
|
||||||
|
"-W"
|
||||||
|
"ignore::DeprecationWarning"
|
||||||
|
];
|
||||||
|
|
||||||
disabledTestPaths = [
|
disabledTestPaths = [
|
||||||
# performance test
|
# performance test
|
||||||
"tests/unit/tools/pbkdf2_test.py"
|
"tests/unit/tools/pbkdf2_test.py"
|
||||||
|
@ -94,9 +102,14 @@ buildPythonPackage rec {
|
||||||
"tests/acceptance/views_dummystore"
|
"tests/acceptance/views_dummystore"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [
|
||||||
|
"cypherpunkpay"
|
||||||
|
];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Modern self-hosted software for accepting Bitcoin";
|
description = "Modern self-hosted software for accepting Bitcoin";
|
||||||
homepage = "https://cypherpunkpay.org";
|
homepage = "https://github.com/CypherpunkPay/CypherpunkPay";
|
||||||
|
changelog = "https://github.com/CypherpunkPay/CypherpunkPay/releases/tag/v${version}";
|
||||||
license = with licenses; [ mit /* or */ unlicense ];
|
license = with licenses; [ mit /* or */ unlicense ];
|
||||||
maintainers = with maintainers; [ prusnak ];
|
maintainers = with maintainers; [ prusnak ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue