mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-10 03:23:29 +03:00
python3Packages.cairosvg: cleanup
Build from GitHub, modernize build
This commit is contained in:
parent
980ae9854c
commit
c26e829bd4
1 changed files with 18 additions and 16 deletions
|
@ -1,14 +1,20 @@
|
|||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
||||
# build-system
|
||||
setuptools,
|
||||
|
||||
# dependencies
|
||||
cairocffi,
|
||||
cssselect2,
|
||||
defusedxml,
|
||||
fetchPypi,
|
||||
pillow,
|
||||
pytestCheckHook,
|
||||
setuptools,
|
||||
tinycss2,
|
||||
|
||||
# testing
|
||||
pytestCheckHook,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
|
@ -16,15 +22,16 @@ buildPythonPackage rec {
|
|||
version = "2.7.1";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "CairoSVG";
|
||||
inherit version;
|
||||
hash = "sha256-QyUx1yNHKRuanr+2d3AmtgdWP9hxnEbudC2wrvcnG6A=";
|
||||
src = fetchFromGitHub {
|
||||
owner = "Kozea";
|
||||
repo = "CairoSVG";
|
||||
rev = version;
|
||||
hash = "sha256-uam53zT2V7aR8daVNOWlZZiexIZPotJxLO2Jg2JQewQ=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ setuptools ];
|
||||
build-system = [ setuptools ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dependencies = [
|
||||
cairocffi
|
||||
cssselect2
|
||||
defusedxml
|
||||
|
@ -32,18 +39,13 @@ buildPythonPackage rec {
|
|||
tinycss2
|
||||
];
|
||||
|
||||
propagatedNativeBuildInputs = [ cairocffi ];
|
||||
nativeBuildInputs = [ cairocffi ];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.cfg \
|
||||
--replace "pytest-runner" "" \
|
||||
--replace "pytest-flake8" "" \
|
||||
--replace "pytest-isort" "" \
|
||||
--replace "pytest-cov" "" \
|
||||
--replace "--flake8" "" \
|
||||
--replace "--isort" ""
|
||||
--replace-fail "console-scripts" "console_scripts"
|
||||
'';
|
||||
|
||||
pytestFlagsArray = [ "cairosvg/test_api.py" ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue