python3Packages.diagrams: fix add missing pngs (#417585)

This commit is contained in:
Aleksana
2025-11-19 12:53:35 +00:00
committed by GitHub
3 changed files with 52 additions and 5 deletions
@@ -0,0 +1,21 @@
From 59b84698b142f5a0998ee9e395df717a1b77e9b2 Mon Sep 17 00:00:00 2001
From: Fabian Affolter <mail@fabian-affolter.ch>
Date: Wed, 1 Jan 2025 21:57:06 +0100
Subject: [PATCH] Add build-system section
---
pyproject.toml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/pyproject.toml b/pyproject.toml
index bcb1e65e3..00dc374fe 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -28,3 +28,7 @@ black = "^24.4"
[tool.black]
line-length=120
+
+[build-system]
+requires = ["poetry_core>=1.0.0"]
+build-backend = "poetry.core.masonry.api"
@@ -0,0 +1,28 @@
From 4ecaacf3fa93720a13cc06732d427415ae66d48f Mon Sep 17 00:00:00 2001
From: Nick Bathum <nickbathum@gmail.com>
Date: Fri, 14 Mar 2025 20:36:49 -0400
Subject: [PATCH] Fix packaging: Ensure resources are included in both sdist
and wheel
Poetry's `include` directive defaults to only including files in the sdist.
See https://github.com/python-poetry/poetry-core/pull/773
---
pyproject.toml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pyproject.toml b/pyproject.toml
index 0262552..c7deb2d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -7,7 +7,7 @@ authors = ["mingrammer <mingrammer@gmail.com>"]
readme = "README.md"
homepage = "https://diagrams.mingrammer.com"
repository = "https://github.com/mingrammer/diagrams"
-include = ["resources/**/*"]
+include = [{ path = "resources/**/*", format = ["sdist", "wheel"] }]
[tool.poetry.scripts]
diagrams="diagrams.cli:main"
--
2.47.2
@@ -29,11 +29,9 @@ buildPythonPackage rec {
patches = [
# Add build-system, https://github.com/mingrammer/diagrams/pull/1089
(fetchpatch {
name = "add-build-system.patch";
url = "https://github.com/mingrammer/diagrams/commit/59b84698b142f5a0998ee9e395df717a1b77e9b2.patch";
hash = "sha256-/zV5X4qgHJs+KO9gHyu6LqQ3hB8Zx+BzOFo7K1vQK78=";
})
./0001-Add-build-system-section.patch
# Fix poetry include, https://github.com/mingrammer/diagrams/pull/1128
./0002-Fix-packaging-Ensure-resources-are-included.patch
./remove-black-requirement.patch
];