[Buildroot] [PATCH 4/4] package/python-git: new package
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Sun Sep 19 12:45:17 UTC 2021
The files added by this commit are associated both to Nicolas Carrier
and myself in the DEVELOPERS, as this commit is based on initial work
from Nicolas.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
---
DEVELOPERS | 6 ++++++
package/Config.in | 1 +
package/python-git/Config.in | 13 +++++++++++++
package/python-git/python-git.hash | 3 +++
package/python-git/python-git.mk | 13 +++++++++++++
support/testing/tests/package/sample_python_git.py | 1 +
support/testing/tests/package/test_python_git.py | 11 +++++++++++
7 files changed, 48 insertions(+)
create mode 100644 package/python-git/Config.in
create mode 100644 package/python-git/python-git.hash
create mode 100644 package/python-git/python-git.mk
create mode 100644 support/testing/tests/package/sample_python_git.py
create mode 100644 support/testing/tests/package/test_python_git.py
diff --git a/DEVELOPERS b/DEVELOPERS
index ee5ec1d0ef..db7521b578 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1982,12 +1982,15 @@ F: package/bmap-tools/
F: package/php-xdebug/
F: package/python-augeas/
F: package/python-flask-expects-json/
+F: package/python-git/
F: support/testing/tests/package/sample_bmap_tools.sh
F: support/testing/tests/package/sample_python_augeas.py
F: support/testing/tests/package/sample_python_flask_expects_json.py
+F: support/testing/tests/package/sample_python_git.py
F: support/testing/tests/package/test_bmap_tools.py
F: support/testing/tests/package/test_python_augeas.py
F: support/testing/tests/package/test_python_flask_expects_json.py
+F: support/testing/tests/package/test_python_git.py
N: Nicolas Cavallari <nicolas.cavallari at green-communications.fr>
F: package/libgit2/
@@ -2685,6 +2688,7 @@ F: package/python/
F: package/python3/
F: package/python-augeas/
F: package/python-flask-expects-json/
+F: package/python-git/
F: package/python-mad/
F: package/python-serial/
F: package/qextserialport/
@@ -2701,9 +2705,11 @@ F: support/testing/tests/boot/test_syslinux.py
F: support/testing/tests/package/sample_python_augeas.py
F: support/testing/tests/package/sample_python_flask.py
F: support/testing/tests/package/sample_python_flask_expects_json.py
+F: support/testing/tests/package/sample_python_git.py
F: support/testing/tests/package/test_python_augeas.py
F: support/testing/tests/package/test_python_flask.py
F: support/testing/tests/package/test_python_flask_expects_json.py
+F: support/testing/tests/package/test_python_git.py
F: toolchain/
N: Timo Ketola <timo.ketola at exertus.fi>
diff --git a/package/Config.in b/package/Config.in
index 0e80611cb6..785ba992e3 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1010,6 +1010,7 @@ menu "External python modules"
source "package/python-functools32/Config.in"
source "package/python-future/Config.in"
source "package/python-futures/Config.in"
+ source "package/python-git/Config.in"
source "package/python-gitdb2/Config.in"
source "package/python-gobject/Config.in"
source "package/python-gpiozero/Config.in"
diff --git a/package/python-git/Config.in b/package/python-git/Config.in
new file mode 100644
index 0000000000..b8dbc3a6c1
--- /dev/null
+++ b/package/python-git/Config.in
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_PYTHON_GIT
+ bool "python-git"
+ depends on BR2_PACKAGE_PYTHON3
+ depends on BR2_USE_MMU # git
+ select BR2_PACKAGE_GIT # runtime
+ select BR2_PACKAGE_PYTHON_GITDB2 # runtime
+ select BR2_PACKAGE_PYTHON_TYPING_EXTENSIONS # runtime
+ help
+ GitPython is a python library used to interact with git
+ repositories, high-level like git-porcelain, or low-level
+ like git-plumbing.
+
+ https://github.com/gitpython-developers/GitPython
diff --git a/package/python-git/python-git.hash b/package/python-git/python-git.hash
new file mode 100644
index 0000000000..5a75bc3592
--- /dev/null
+++ b/package/python-git/python-git.hash
@@ -0,0 +1,3 @@
+# locally computed hashes
+sha256 78baf9fc223536e38a6e0d9241536fedaecf79bc000b3a05962257d83571fc5d python-git-3.1.20.tar.gz
+sha256 fd657ffc2cef63d25c78cab7808d414dd03a282e63893491fd11c32f98be67fb LICENSE
diff --git a/package/python-git/python-git.mk b/package/python-git/python-git.mk
new file mode 100644
index 0000000000..0e158434fd
--- /dev/null
+++ b/package/python-git/python-git.mk
@@ -0,0 +1,13 @@
+################################################################################
+#
+# python-git
+#
+################################################################################
+
+PYTHON_GIT_VERSION = 3.1.20
+PYTHON_GIT_SITE = $(call github,gitpython-developers,GitPython,$(PYTHON_GIT_VERSION))
+PYTHON_GIT_LICENSE = BSD-3-Clause
+PYTHON_GIT_LICENSE_FILES = LICENSE
+PYTHON_GIT_SETUP_TYPE = setuptools
+
+$(eval $(python-package))
diff --git a/support/testing/tests/package/sample_python_git.py b/support/testing/tests/package/sample_python_git.py
new file mode 100644
index 0000000000..fa9ff23039
--- /dev/null
+++ b/support/testing/tests/package/sample_python_git.py
@@ -0,0 +1 @@
+from git import * # noqa
diff --git a/support/testing/tests/package/test_python_git.py b/support/testing/tests/package/test_python_git.py
new file mode 100644
index 0000000000..4d5489e974
--- /dev/null
+++ b/support/testing/tests/package/test_python_git.py
@@ -0,0 +1,11 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3Git(TestPythonPackageBase):
+ __test__ = True
+ config = TestPythonPackageBase.config + \
+ """
+ BR2_PACKAGE_PYTHON3=y
+ BR2_PACKAGE_PYTHON_GIT=y
+ """
+ sample_scripts = ["tests/package/sample_python_git.py"]
--
2.31.1
More information about the buildroot
mailing list