All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/python-poetry-core: new host package
@ 2023-06-27  7:26 James Hilliard
  2023-06-27  7:26 ` [Buildroot] [PATCH 2/2] package/python-terminaltables: fix build backend James Hilliard
  0 siblings, 1 reply; 13+ messages in thread
From: James Hilliard @ 2023-06-27  7:26 UTC (permalink / raw)
  To: buildroot; +Cc: James Hilliard, Asaf Kahlon, Thomas Petazzoni

We need to add a patch to prevent poetry core from matching a bogus
git directory when determining which files should be ignored.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
---
 ...atching-bogus-parent-git-directories.patch | 49 +++++++++++++++++++
 .../python-poetry-core.hash                   |  5 ++
 .../python-poetry-core/python-poetry-core.mk  | 14 ++++++
 3 files changed, 68 insertions(+)
 create mode 100644 package/python-poetry-core/0001-Prevent-matching-bogus-parent-git-directories.patch
 create mode 100644 package/python-poetry-core/python-poetry-core.hash
 create mode 100644 package/python-poetry-core/python-poetry-core.mk

diff --git a/package/python-poetry-core/0001-Prevent-matching-bogus-parent-git-directories.patch b/package/python-poetry-core/0001-Prevent-matching-bogus-parent-git-directories.patch
new file mode 100644
index 0000000000..6b52ff9612
--- /dev/null
+++ b/package/python-poetry-core/0001-Prevent-matching-bogus-parent-git-directories.patch
@@ -0,0 +1,49 @@
+From 77924f1347d773bb3d60f5351045527377489984 Mon Sep 17 00:00:00 2001
+From: James Hilliard <james.hilliard1@gmail.com>
+Date: Mon, 26 Jun 2023 23:45:45 -0600
+Subject: [PATCH] Prevent matching bogus parent git directories
+
+Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
+[Upstream status:
+https://github.com/python-poetry/poetry-core/pull/611]
+---
+ src/poetry/core/vcs/__init__.py | 21 ++++++++++++++-------
+ 1 file changed, 14 insertions(+), 7 deletions(-)
+
+diff --git a/src/poetry/core/vcs/__init__.py b/src/poetry/core/vcs/__init__.py
+index f4096ec..b4899b3 100644
+--- a/src/poetry/core/vcs/__init__.py
++++ b/src/poetry/core/vcs/__init__.py
+@@ -17,15 +17,22 @@ def get_vcs(directory: Path) -> Git | None:
+     try:
+         from poetry.core.vcs.git import executable
+ 
+-        git_dir = (
+-            subprocess.check_output(
+-                [executable(), "rev-parse", "--show-toplevel"], stderr=subprocess.STDOUT
++        check_ignore = subprocess.run(
++            [executable(), "check-ignore", "."],
++        ).returncode
++
++        if check_ignore == 0:
++            vcs = None
++        else:
++            git_dir = (
++                subprocess.check_output(
++                    [executable(), "rev-parse", "--show-toplevel"], stderr=subprocess.STDOUT
++                )
++                .decode()
++                .strip()
+             )
+-            .decode()
+-            .strip()
+-        )
+ 
+-        vcs = Git(Path(git_dir))
++            vcs = Git(Path(git_dir))
+ 
+     except (subprocess.CalledProcessError, OSError, RuntimeError):
+         vcs = None
+-- 
+2.41.0
+
diff --git a/package/python-poetry-core/python-poetry-core.hash b/package/python-poetry-core/python-poetry-core.hash
new file mode 100644
index 0000000000..5e62cb1aaf
--- /dev/null
+++ b/package/python-poetry-core/python-poetry-core.hash
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/poetry-core/json
+md5  37e1a9d3d3c97c9670aed62108f2d5cb  poetry_core-1.6.1.tar.gz
+sha256  0f9b0de39665f36d6594657e7d57b6f463cc10f30c28e6d1c3b9ff54c26c9ac3  poetry_core-1.6.1.tar.gz
+# Locally computed sha256 checksums
+sha256  f1978133782b90f4733bc308ddb19267c3fe04797c88d9ed3bc219032495a982  LICENSE
diff --git a/package/python-poetry-core/python-poetry-core.mk b/package/python-poetry-core/python-poetry-core.mk
new file mode 100644
index 0000000000..05d321a54d
--- /dev/null
+++ b/package/python-poetry-core/python-poetry-core.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-poetry-core
+#
+################################################################################
+
+PYTHON_POETRY_CORE_VERSION = 1.6.1
+PYTHON_POETRY_CORE_SOURCE = poetry_core-$(PYTHON_POETRY_CORE_VERSION).tar.gz
+PYTHON_POETRY_CORE_SITE = https://files.pythonhosted.org/packages/20/e8/e0a80cc355bc207fb1760160344e978f39d683c35e1230f71b8916bf3a50
+PYTHON_POETRY_CORE_SETUP_TYPE = pep517
+PYTHON_POETRY_CORE_LICENSE = MIT
+PYTHON_POETRY_CORE_LICENSE_FILES = LICENSE
+
+$(eval $(host-python-package))
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2023-07-11 14:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-27  7:26 [Buildroot] [PATCH 1/2] package/python-poetry-core: new host package James Hilliard
2023-06-27  7:26 ` [Buildroot] [PATCH 2/2] package/python-terminaltables: fix build backend James Hilliard
2023-07-10 18:01   ` Thomas Petazzoni via buildroot
2023-07-10 19:58     ` James Hilliard
2023-07-11  7:32       ` Thomas Petazzoni via buildroot
2023-07-11  7:35         ` James Hilliard
2023-07-11  8:00           ` Thomas Petazzoni via buildroot
2023-07-11  9:43             ` James Hilliard
2023-07-11  9:54               ` Thomas Petazzoni via buildroot
2023-07-11  9:57                 ` Thomas Petazzoni via buildroot
2023-07-11 10:50                 ` James Hilliard
2023-07-11 12:29                   ` Thomas Petazzoni via buildroot
2023-07-11 14:42                     ` James Hilliard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.