python3Packages.zeversolarlocal: switch to pypaBuildHook
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, fetchpatch
|
||||
, flit-core
|
||||
, dos2unix
|
||||
, httpx
|
||||
, pytest-asyncio
|
||||
, pytest-mock
|
||||
@@ -12,7 +14,7 @@
|
||||
buildPythonPackage rec {
|
||||
pname = "zeversolarlocal";
|
||||
version = "1.1.0";
|
||||
format = "flit";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
@@ -23,6 +25,7 @@ buildPythonPackage rec {
|
||||
|
||||
nativeBuildInputs = [
|
||||
flit-core
|
||||
dos2unix
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
@@ -35,6 +38,20 @@ buildPythonPackage rec {
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
# the patch below won't apply unless we fix the line endings
|
||||
prePatch = ''
|
||||
dos2unix pyproject.toml
|
||||
'';
|
||||
|
||||
patches = [
|
||||
# Raise the flit-core limit
|
||||
# https://github.com/sander76/zeversolarlocal/pull/4
|
||||
(fetchpatch {
|
||||
url = "https://github.com/sander76/zeversolarlocal/commit/bff072ea046de07eced77bc79eb8e90dfef1f53f.patch";
|
||||
hash = "sha256-tzFCwPzhAfwVfN5mLY/DMwRv7zGzx3ScBe+kKzkYcvo=";
|
||||
})
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace "--cov zeversolarlocal --cov-report xml:cov.xml --cov-report term-missing -vv" ""
|
||||
|
||||
Reference in New Issue
Block a user