Skip to contentSkip to conversation

package/python-gitdb2: new package

PATCH New aduskett at gmail.com 2 participants 7 messages Nov 29, 2019 – Dec 28, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 package/python-gitdb2: new package

From: Adam Duskett <[email protected]>

GitDB allows you to access bare git repositories for reading and writing. It aims at allowing full access to loose objects as well as packs with performance and scalability in mind. It operates exclusively on streams, allowing to handle large objects with a small memory footprint.

---
 DEVELOPERS                               |  1 +
 package/Config.in                        |  1 +
 package/python-gitdb2/Config.in          | 13 +++++++++++++
 package/python-gitdb2/python-gitdb2.hash |  5 +++++
 package/python-gitdb2/python-gitdb2.mk   | 14 ++++++++++++++
 5 files changed, 34 insertions(+)
 create mode 100644 package/python-gitdb2/Config.in
 create mode 100644 package/python-gitdb2/python-gitdb2.hash
 create mode 100644 package/python-gitdb2/python-gitdb2.mk
DEVELOPERS +1 -0
index 16e8510b0a..7397c80a83 100644
@@ -61,6 +61,7 @@ F:	package/python-channels-redis/
 F:	package/python-daphne/
 F:	package/python-django-enumfields/
 F:	package/python-flask-sqlalchemy/
+F:	package/python-gitdb2/
 F:	package/python-mutagen/
 F:	package/python-pip/
 F:	package/python-psycopg2/
package/Config.in +1 -0
index 37861387e8..15abe0871c 100644
@@ -923,6 +923,7 @@ menu "External python modules"
 	source "package/python-future/Config.in"
 	source "package/python-futures/Config.in"
 	source "package/python-gobject/Config.in"
+	source "package/python-gitdb2/Config.in"
 	source "package/python-gunicorn/Config.in"
 	source "package/python-h2/Config.in"
 	source "package/python-hiredis/Config.in"
package/python-gitdb2/Config.in new file +13 -0
new file mode 100644
index 0000000000..a5962e7b77
@@ -0,0 +1,13 @@
+config BR2_PACKAGE_PYTHON_GITDB2
+	bool "python-gitdb2"
+	select BR2_PACKAGE_PYTHON_SMMAP2 # runtime
+	select BR2_PACKAGE_PYTHON_ZLIB if BR2_PACKAGE_PYTHON  # runtime
+	select BR2_PACKAGE_PYTHON3_ZLIB if BR2_PACKAGE_PYTHON3  # runtime
+	help
+	  GitDB allows you to access bare git repositories for reading
+	  and writing. It aims at allowing full access to loose objects
+	  as well as packs with performance and scalability in mind. It
+	  operates exclusively on streams, allowing to handle large
+	  objects with a small memory footprint.
+
+	  https://github.com/gitpython-developers/gitdb
package/python-gitdb2/python-gitdb2.hash new file +5 -0
new file mode 100644
index 0000000000..e97d25cf4f
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/gitdb2/json
+md5	1a7ea3362e405f8a5634f7ee53636094  gitdb2-2.0.6.tar.gz
+sha256	1b6df1433567a51a4a9c1a5a0de977aa351a405cc56d7d35f3388bad1f630350  gitdb2-2.0.6.tar.gz
+# Locally computed sha256 checksums
+sha256	efd29f596a08e8857e68e7694a50bcda72839792da7c3f041bcbff5f18009239  LICENSE
package/python-gitdb2/python-gitdb2.mk new file +14 -0
new file mode 100644
index 0000000000..d5293a2bd1
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-gitdb2
+#
+################################################################################
+
+PYTHON_GITDB2_VERSION = 2.0.6
+PYTHON_GITDB2_SOURCE = gitdb2-$(PYTHON_GITDB2_VERSION).tar.gz
+PYTHON_GITDB2_SITE = https://files.pythonhosted.org/packages/c5/62/ed7205331e8d7cc377e2512cb32f8f8f075c0defce767551d0a76e102ce2
+PYTHON_GITDB2_SETUP_TYPE = setuptools
+PYTHON_GITDB2_LICENSE = Sebastian Thiel and contributors
+PYTHON_GITDB2_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
Signature · 1 line
2.23.0
#1 lore raw

PATCH 2/4 support/testing: add gitdb2 test

From: Adam Duskett <[email protected]>

Add a simple test case that imports the module.

---
 .gitlab-ci.yml                                |  2 ++
 .../tests/package/sample_python_gitdb2.py     |  4 ++++
 .../tests/package/test_python_gitdb2.py       | 21 +++++++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 100644 support/testing/tests/package/sample_python_gitdb2.py
 create mode 100644 support/testing/tests/package/test_python_gitdb2.py
.gitlab-ci.yml +2 -0
index 22befa0427..af41a94427 100644
@@ -448,6 +448,8 @@ tests.package.test_python_constantly.TestPythonPy3Constantly: { extends: .runtim
 tests.package.test_python_crossbar.TestPythonPy3Crossbar: { extends: .runtime_test }
 tests.package.test_python_cryptography.TestPythonPy2Cryptography: { extends: .runtime_test }
 tests.package.test_python_cryptography.TestPythonPy3Cryptography: { extends: .runtime_test }
+tests.package.test_python_gitdb2.TestPythonPy2Gitdb2: { extends: .runtime_test }
+tests.package.test_python_gitdb2.TestPythonPy3Gitdb2: { extends: .runtime_test }
 tests.package.test_python_incremental.TestPythonPy2Incremental: { extends: .runtime_test }
 tests.package.test_python_incremental.TestPythonPy3Incremental: { extends: .runtime_test }
 tests.package.test_python_passlib.TestPythonPy2Passlib: { extends: .runtime_test }
support/testing/tests/package/sample_python_gitdb2.py new file +4 -0
new file mode 100644
index 0000000000..b5c43cd858
@@ -0,0 +1,4 @@
+# Taken from smmap/test/test_tutorial.py
+
+from gitdb import *
+
support/testing/tests/package/test_python_gitdb2.py new file +21 -0
new file mode 100644
index 0000000000..fc55f20821
@@ -0,0 +1,21 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy2Gitdb2(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON=y
+        BR2_PACKAGE_PYTHON_GITDB2=y
+        """
+    sample_scripts = ["tests/package/sample_python_gitdb2.py"]
+
+
+class TestPythonPy3Gitdb2(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_GITDB2=y
+        """
+    sample_scripts = ["tests/package/sample_python_gitdb2.py"]
Signature · 1 line
2.23.0
#2 lore raw

PATCH 2/4 support/testing: add gitdb2 test

Quoted 5 lines · On Fri, 29 Nov 2019 13:29:08 -0800 aduskett at gmail.com wrote:

From: Adam Duskett <[email protected]>

Add a simple test case that imports the module.

I've applied to master, after tweaking one thing.

support/testing/tests/package/sample_python_gitdb2.py line 1

Quoted 7 lines
support/testing/tests/package/sample_python_gitdb2.py new file +1 -0
new file mode 100644
index 0000000000..b5c43cd858
@@ -0,0 +1,4 @@
+# Taken from smmap/test/test_tutorial.py

This really smells like a bad copy/paste from the python-smmap2 test script, so I dropped this line :-)

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#3 lore raw

PATCH 2/4 support/testing: add gitdb2 test

In reply to aduskett at gmail.com

Hello Adam,

support/testing/tests/package/sample_python_gitdb2.py line 3

Quoted 8 lines · On Fri, 29 Nov 2019 13:29:08 -0800 aduskett at gmail.com wrote:

new file mode 100644
index 0000000000..b5c43cd858

support/testing/tests/package/sample_python_gitdb2.py new file +3 -0
@@ -0,0 +1,4 @@
+# Taken from smmap/test/test_tutorial.py
+
+from gitdb import *

This causes a flake8 warning:

support/testing/tests/package/sample_python_gitdb2.py:1:1: F403 'from gitdb import *' used; unable to detect undefined names

See https://lintlyci.github.io/Flake8Rules/rules/F403.html for more details about this, and
https://gitlab.com/buildroot.org/buildroot/-/jobs/389451584 for the GitlabCI job that reported this.

Could you have a look ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 3/4 package/python-gitpython: new package

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

GitPython is a python library used to interact with git repositories, high-level like git-porcelain, or low-level like git-plumbing.

It provides abstractions of git objects for easy access of repository data, and additionally allows you to access the git repository more directly using either a pure python implementation, or the faster, but more resource intensive git command implementation.

The object database implementation is optimized for handling large quantities of objects and large datasets, which is achieved by using low-level structures and data streaming.

---
 package/Config.in                             |  1 +
 package/python-gitpython/Config.in            | 21 +++++++++++++++++++
 .../python-gitpython/python-gitpython.hash    |  5 +++++
 package/python-gitpython/python-gitpython.mk  | 14 +++++++++++++
 4 files changed, 41 insertions(+)
 create mode 100644 package/python-gitpython/Config.in
 create mode 100644 package/python-gitpython/python-gitpython.hash
 create mode 100644 package/python-gitpython/python-gitpython.mk
package/Config.in +1 -0
index 15abe0871c..f01810b2cd 100644
@@ -924,6 +924,7 @@ menu "External python modules"
 	source "package/python-futures/Config.in"
 	source "package/python-gobject/Config.in"
 	source "package/python-gitdb2/Config.in"
+	source "package/python-gitpython/Config.in"
 	source "package/python-gunicorn/Config.in"
 	source "package/python-h2/Config.in"
 	source "package/python-hiredis/Config.in"
package/python-gitpython/Config.in new file +21 -0
new file mode 100644
index 0000000000..3cd813a142
@@ -0,0 +1,21 @@
+config BR2_PACKAGE_PYTHON_GITPYTHON
+	bool "python-gitpython"
+	depends on BR2_PACKAGE_PYTHON3 # runtime
+	select BR2_PACKAGE_PYTHON_GITDB2 # runtime
+	select BR2_PACKAGE_GIT # runtime
+	help
+	  GitPython is a python library used to interact with git
+	  repositories, high-level like git-porcelain, or low-level like
+	  git-plumbing.
+
+	  It provides abstractions of git objects for easy access of
+	  repository data, and additionally allows you to access the git
+	  repository more directly using either a pure python
+	  implementation, or the faster, but more resource intensive git
+	  command implementation.
+
+	  The object database implementation is optimized for handling
+	  large quantities of objects and large datasets, which is
+	  achieved by using low-level structures and data streaming.
+
+	  https://github.com/gitpython-developers/GitPython
package/python-gitpython/python-gitpython.hash new file +5 -0
new file mode 100644
index 0000000000..928839d7fe
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/gitpython/json
+md5	7555ad89a22f663c25cced5f623bdef0  GitPython-3.0.5.tar.gz
+sha256	9c2398ffc3dcb3c40b27324b316f08a4f93ad646d5a6328cafbb871aa79f5e42  GitPython-3.0.5.tar.gz
+# Locally computed sha256 checksums
+sha256	fd657ffc2cef63d25c78cab7808d414dd03a282e63893491fd11c32f98be67fb  LICENSE
package/python-gitpython/python-gitpython.mk new file +14 -0
new file mode 100644
index 0000000000..107cc8afa2
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-gitpython
+#
+################################################################################
+
+PYTHON_GITPYTHON_VERSION = 3.0.5
+PYTHON_GITPYTHON_SOURCE = GitPython-$(PYTHON_GITPYTHON_VERSION).tar.gz
+PYTHON_GITPYTHON_SITE = https://files.pythonhosted.org/packages/d2/e8/0bd80cc9e1422f5449d663479459c3c032ff7acaf6609a63324d23bde9ac
+PYTHON_GITPYTHON_SETUP_TYPE = setuptools
+PYTHON_GITPYTHON_LICENSE = BSD-3-Clause
+PYTHON_GITPYTHON_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
Signature · 1 line
2.23.0
#5 lore raw

PATCH 4/4 support/testing: add gitpython test

In reply to aduskett at gmail.com

From: Adam Duskett <[email protected]>

Add a simple test case that imports the module.

---
 .gitlab-ci.yml                                        |  1 +
 .../testing/tests/package/sample_python_gitpython.py  |  2 ++
 .../testing/tests/package/test_python_gitpython.py    | 11 +++++++++++
 3 files changed, 14 insertions(+)
 create mode 100644 support/testing/tests/package/sample_python_gitpython.py
 create mode 100644 support/testing/tests/package/test_python_gitpython.py
.gitlab-ci.yml +1 -0
index af41a94427..3b57af0aba 100644
@@ -450,6 +450,7 @@ tests.package.test_python_cryptography.TestPythonPy2Cryptography: { extends: .ru
 tests.package.test_python_cryptography.TestPythonPy3Cryptography: { extends: .runtime_test }
 tests.package.test_python_gitdb2.TestPythonPy2Gitdb2: { extends: .runtime_test }
 tests.package.test_python_gitdb2.TestPythonPy3Gitdb2: { extends: .runtime_test }
+tests.package.test_python_gitpython.TestPythonPy3GitPython: { extends: .runtime_test }
 tests.package.test_python_incremental.TestPythonPy2Incremental: { extends: .runtime_test }
 tests.package.test_python_incremental.TestPythonPy3Incremental: { extends: .runtime_test }
 tests.package.test_python_passlib.TestPythonPy2Passlib: { extends: .runtime_test }
support/testing/tests/package/sample_python_gitpython.py new file +2 -0
new file mode 100644
index 0000000000..3ffd6843f3
@@ -0,0 +1,2 @@
+from git import *
+
support/testing/tests/package/test_python_gitpython.py new file +11 -0
new file mode 100644
index 0000000000..651453c577
@@ -0,0 +1,11 @@
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3GitPython(TestPythonPackageBase):
+    __test__ = True
+    config = TestPythonPackageBase.config + \
+        """
+        BR2_PACKAGE_PYTHON3=y
+        BR2_PACKAGE_PYTHON_GITPYTHON=y
+        """
+    sample_scripts = ["tests/package/sample_python_gitpython.py"]
Signature · 1 line
2.23.0
#6 lore raw

PATCH 1/4 package/python-gitdb2: new package

In reply to aduskett at gmail.com
Quoted 8 lines · On Fri, 29 Nov 2019 13:29:07 -0800 aduskett at gmail.com wrote:

From: Adam Duskett <[email protected]>

GitDB allows you to access bare git repositories for reading and writing. It aims at allowing full access to loose objects as well as packs with performance and scalability in mind. It operates exclusively on streams, allowing to handle large objects with a small memory footprint.

I've applied, with one change. See below.

Quoted 1 line

+PYTHON_GITDB2_LICENSE = Sebastian Thiel and contributors

This clearly isn't a license. The license is BSD-3-Clause, as a quick inspection to the LICENSE file reveals. I fixed that when applying.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com