2020-07-18 16:06:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, pythonOlder
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, webencodings
|
2021-12-06 16:07:01 +00:00
|
|
|
, pytestCheckHook
|
2020-07-18 16:06:22 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "tinycss2";
|
2021-12-06 16:07:01 +00:00
|
|
|
version = "1.1.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
2021-12-06 16:07:01 +00:00
|
|
|
format = "flit";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kozea";
|
|
|
|
repo = "tinycss2";
|
|
|
|
rev = "v${version}";
|
|
|
|
# for tests
|
|
|
|
fetchSubmodules = true;
|
|
|
|
sha256 = "sha256-WA88EYolL76WqeA1UKR3Sfw11j8NuOGOxPezujYizH8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ webencodings ];
|
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
checkInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace "'pytest-cov', 'pytest-flake8', 'pytest-isort', 'coverage[toml]'" "" \
|
|
|
|
--replace "--isort --flake8 --cov" ""
|
2020-09-25 04:45:31 +00:00
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "Low-level CSS parser for Python";
|
|
|
|
homepage = "https://github.com/Kozea/tinycss2";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|