dfmt: migrate to pyproject build
The package now uses pyproject format instead of setuptools, with poetry-core as the build system. The build configuration has been updated to replace the deprecated poetry.masonry.api backend with poetry.core.masonry.api. dfmt: add tests to dfmt dfmt: Use poetry-core
This commit is contained in:
@@ -1,25 +1,29 @@
|
||||
{
|
||||
lib,
|
||||
python3,
|
||||
python3Packages,
|
||||
fetchPypi,
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (python3.pkgs)
|
||||
buildPythonApplication
|
||||
pythonOlder
|
||||
;
|
||||
in
|
||||
buildPythonApplication rec {
|
||||
python3Packages.buildPythonApplication (finalAttrs: {
|
||||
pname = "dfmt";
|
||||
version = "1.2.0";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
build-system = [
|
||||
python3Packages.poetry-core
|
||||
];
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "7af6360ca8d556f1cfe82b97f03b8d1ea5a9d6de1fa3018290c844b6566d9d6e";
|
||||
inherit (finalAttrs) pname version;
|
||||
hash = "sha256-evY2DKjVVvHP6CuX8DuNHqWp1t4fowGCkMhEtlZtnW4=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail 'poetry.masonry.api' 'poetry.core.masonry.api' \
|
||||
--replace-fail 'poetry>=' 'poetry-core>=' \
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Format paragraphs, comments and doc strings";
|
||||
mainProgram = "dfmt";
|
||||
@@ -27,4 +31,4 @@ buildPythonApplication rec {
|
||||
license = lib.licenses.bsd3;
|
||||
maintainers = with lib.maintainers; [ cole-h ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user