2022-10-30 15:09:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitLab
|
|
|
|
, pythonOlder
|
|
|
|
, flit-core
|
|
|
|
, setuptools-scm
|
|
|
|
, tomli
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "flit-scm";
|
|
|
|
version = "1.7.0";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
owner = "WillDaSilva";
|
|
|
|
repo = "flit_scm";
|
2023-01-20 10:41:00 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-03-04 12:14:45 +00:00
|
|
|
hash = "sha256-2nx9kWq/2TzauOW+c67g9a3JZ2dhBM4QzKyK/sqWOPo=";
|
2022-10-30 15:09:59 +00:00
|
|
|
};
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
flit-core
|
|
|
|
setuptools-scm
|
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
tomli
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
flit-core
|
|
|
|
setuptools-scm
|
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
tomli
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"flit_scm"
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
doCheck = false; # no tests
|
2022-10-30 15:09:59 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A PEP 518 build backend that uses setuptools_scm to generate a version file from your version control system, then flit to build the package.";
|
|
|
|
homepage = "https://gitlab.com/WillDaSilva/flit_scm";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ cpcloud ];
|
|
|
|
};
|
|
|
|
}
|