* [Buildroot] [PATCH v2 0/4] package/python-pytest: new package with dependencies
@ 2020-09-01 17:16 Marcin Niestroj
2020-09-01 17:16 ` [Buildroot] [PATCH v2 1/4] package/python-pluggy: new package Marcin Niestroj
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Marcin Niestroj @ 2020-09-01 17:16 UTC (permalink / raw)
To: buildroot
Hi!
This is an updated patch series that adds pytest with all its required
dependencies. There is also a simple test provided to verify that pytest really
works.
changes v1 -> v2:
* remove python-packaging patch, which has been mainlined already
* bump version from 5.4.1 to 6.0.1
* add python-iniparser package, which is now required dependency
* fixed python-pluggy dependencies
* rebase on Buildroot master + next (locally merged) branches
Marcin Niestroj (4):
package/python-pluggy: new package
package/python-iniconfig: new package
package/python-pytest: new package
support/testing: add pytest test
DEVELOPERS | 5 ++++
package/Config.in | 3 +++
package/python-iniconfig/Config.in | 6 +++++
.../python-iniconfig/python-iniconfig.hash | 5 ++++
package/python-iniconfig/python-iniconfig.mk | 14 +++++++++++
package/python-pluggy/Config.in | 7 ++++++
package/python-pluggy/python-pluggy.hash | 5 ++++
package/python-pluggy/python-pluggy.mk | 15 +++++++++++
package/python-pytest/Config.in | 16 ++++++++++++
package/python-pytest/python-pytest.hash | 5 ++++
package/python-pytest/python-pytest.mk | 15 +++++++++++
.../tests/package/sample_python_pytest.py | 25 +++++++++++++++++++
.../tests/package/test_python_pytest.py | 19 ++++++++++++++
13 files changed, 140 insertions(+)
create mode 100644 package/python-iniconfig/Config.in
create mode 100644 package/python-iniconfig/python-iniconfig.hash
create mode 100644 package/python-iniconfig/python-iniconfig.mk
create mode 100644 package/python-pluggy/Config.in
create mode 100644 package/python-pluggy/python-pluggy.hash
create mode 100644 package/python-pluggy/python-pluggy.mk
create mode 100644 package/python-pytest/Config.in
create mode 100644 package/python-pytest/python-pytest.hash
create mode 100644 package/python-pytest/python-pytest.mk
create mode 100644 support/testing/tests/package/sample_python_pytest.py
create mode 100644 support/testing/tests/package/test_python_pytest.py
--
2.28.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 1/4] package/python-pluggy: new package
2020-09-01 17:16 [Buildroot] [PATCH v2 0/4] package/python-pytest: new package with dependencies Marcin Niestroj
@ 2020-09-01 17:16 ` Marcin Niestroj
2020-09-01 17:16 ` [Buildroot] [PATCH v2 2/4] package/python-iniconfig: " Marcin Niestroj
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Marcin Niestroj @ 2020-09-01 17:16 UTC (permalink / raw)
To: buildroot
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
changes v1 -> v2:
* add dependency on python3
* remove (broken) dependency on importlib-metadata, which is not needed with
Python 3.8+ (reported by Thomas)
DEVELOPERS | 1 +
package/Config.in | 1 +
package/python-pluggy/Config.in | 7 +++++++
package/python-pluggy/python-pluggy.hash | 5 +++++
package/python-pluggy/python-pluggy.mk | 15 +++++++++++++++
5 files changed, 29 insertions(+)
create mode 100644 package/python-pluggy/Config.in
create mode 100644 package/python-pluggy/python-pluggy.hash
create mode 100644 package/python-pluggy/python-pluggy.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index e550e5eb0e..1bafd26350 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1612,6 +1612,7 @@ F: package/murata-cyw-fw/
F: package/netdata/
F: package/python-ansicolors/
F: package/python-packaging/
+F: package/python-pluggy/
F: package/rs485conf/
F: package/turbolua/
F: support/testing/tests/package/test_netdata.py
diff --git a/package/Config.in b/package/Config.in
index b1df81d7f1..914f2b4d33 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1062,6 +1062,7 @@ menu "External python modules"
source "package/python-pigpio/Config.in"
source "package/python-pillow/Config.in"
source "package/python-pip/Config.in"
+ source "package/python-pluggy/Config.in"
source "package/python-ply/Config.in"
source "package/python-portend/Config.in"
source "package/python-posix-ipc/Config.in"
diff --git a/package/python-pluggy/Config.in b/package/python-pluggy/Config.in
new file mode 100644
index 0000000000..7179bc427c
--- /dev/null
+++ b/package/python-pluggy/Config.in
@@ -0,0 +1,7 @@
+config BR2_PACKAGE_PYTHON_PLUGGY
+ bool "python-pluggy"
+ depends on BR2_PACKAGE_PYTHON3
+ help
+ plugin and hook calling mechanisms for python.
+
+ https://github.com/pytest-dev/pluggy
diff --git a/package/python-pluggy/python-pluggy.hash b/package/python-pluggy/python-pluggy.hash
new file mode 100644
index 0000000000..24e207bfad
--- /dev/null
+++ b/package/python-pluggy/python-pluggy.hash
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/pluggy/json
+md5 7f610e28b8b34487336b585a3dfb803d pluggy-0.13.1.tar.gz
+sha256 15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0 pluggy-0.13.1.tar.gz
+# Locally computed sha256 checksums
+sha256 d6b65e6c213a5d0b577911d34d6e5949b9f59d76c238c5071a2f3fc16cfb2606 LICENSE
diff --git a/package/python-pluggy/python-pluggy.mk b/package/python-pluggy/python-pluggy.mk
new file mode 100644
index 0000000000..03cdecf4b9
--- /dev/null
+++ b/package/python-pluggy/python-pluggy.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# python-pluggy
+#
+################################################################################
+
+PYTHON_PLUGGY_VERSION = 0.13.1
+PYTHON_PLUGGY_SOURCE = pluggy-$(PYTHON_PLUGGY_VERSION).tar.gz
+PYTHON_PLUGGY_SITE = https://files.pythonhosted.org/packages/f8/04/7a8542bed4b16a65c2714bf76cf5a0b026157da7f75e87cc88774aa10b14
+PYTHON_PLUGGY_SETUP_TYPE = setuptools
+PYTHON_PLUGGY_LICENSE = MIT
+PYTHON_PLUGGY_LICENSE_FILES = LICENSE
+PYTHON_PLUGGY_DEPENDENCIES = host-python-setuptools-scm
+
+$(eval $(python-package))
--
2.28.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 2/4] package/python-iniconfig: new package
2020-09-01 17:16 [Buildroot] [PATCH v2 0/4] package/python-pytest: new package with dependencies Marcin Niestroj
2020-09-01 17:16 ` [Buildroot] [PATCH v2 1/4] package/python-pluggy: new package Marcin Niestroj
@ 2020-09-01 17:16 ` Marcin Niestroj
2020-09-01 17:16 ` [Buildroot] [PATCH v2 3/4] package/python-pytest: " Marcin Niestroj
2020-09-01 17:16 ` [Buildroot] [PATCH v2 4/4] support/testing: add pytest test Marcin Niestroj
3 siblings, 0 replies; 5+ messages in thread
From: Marcin Niestroj @ 2020-09-01 17:16 UTC (permalink / raw)
To: buildroot
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
changes v1 -> v2: added patch
DEVELOPERS | 1 +
package/Config.in | 1 +
package/python-iniconfig/Config.in | 6 ++++++
package/python-iniconfig/python-iniconfig.hash | 5 +++++
package/python-iniconfig/python-iniconfig.mk | 14 ++++++++++++++
5 files changed, 27 insertions(+)
create mode 100644 package/python-iniconfig/Config.in
create mode 100644 package/python-iniconfig/python-iniconfig.hash
create mode 100644 package/python-iniconfig/python-iniconfig.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 1bafd26350..bdbaf551f3 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1611,6 +1611,7 @@ F: package/luaossl/
F: package/murata-cyw-fw/
F: package/netdata/
F: package/python-ansicolors/
+F: package/python-iniconfig/
F: package/python-packaging/
F: package/python-pluggy/
F: package/rs485conf/
diff --git a/package/Config.in b/package/Config.in
index 914f2b4d33..3c5b5cb255 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -991,6 +991,7 @@ menu "External python modules"
source "package/python-incremental/Config.in"
source "package/python-inflection/Config.in"
source "package/python-influxdb/Config.in"
+ source "package/python-iniconfig/Config.in"
source "package/python-iniparse/Config.in"
source "package/python-iowait/Config.in"
source "package/python-ipaddr/Config.in"
diff --git a/package/python-iniconfig/Config.in b/package/python-iniconfig/Config.in
new file mode 100644
index 0000000000..a288da8a64
--- /dev/null
+++ b/package/python-iniconfig/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PYTHON_INICONFIG
+ bool "python-iniconfig"
+ help
+ iniconfig: brain-dead simple config-ini parsing.
+
+ http://github.com/RonnyPfannschmidt/iniconfig
diff --git a/package/python-iniconfig/python-iniconfig.hash b/package/python-iniconfig/python-iniconfig.hash
new file mode 100644
index 0000000000..708c0553ac
--- /dev/null
+++ b/package/python-iniconfig/python-iniconfig.hash
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/iniconfig/json
+md5 464179a74789d033b170101f6aa38c2a iniconfig-1.0.1.tar.gz
+sha256 e5f92f89355a67de0595932a6c6c02ab4afddc6fcdc0bfc5becd0d60884d3f69 iniconfig-1.0.1.tar.gz
+# Locally computed sha256 checksums
+sha256 2af680c39ef493fb82830356d1d3df1acb5a06033cba2dec7a19e21caa77a866 LICENSE
diff --git a/package/python-iniconfig/python-iniconfig.mk b/package/python-iniconfig/python-iniconfig.mk
new file mode 100644
index 0000000000..57f31c4194
--- /dev/null
+++ b/package/python-iniconfig/python-iniconfig.mk
@@ -0,0 +1,14 @@
+################################################################################
+#
+# python-iniconfig
+#
+################################################################################
+
+PYTHON_INICONFIG_VERSION = 1.0.1
+PYTHON_INICONFIG_SOURCE = iniconfig-$(PYTHON_INICONFIG_VERSION).tar.gz
+PYTHON_INICONFIG_SITE = https://files.pythonhosted.org/packages/aa/6e/60dafce419de21f2f3f29319114808cac9f49b6c15117a419737a4ce3813
+PYTHON_INICONFIG_SETUP_TYPE = setuptools
+PYTHON_INICONFIG_LICENSE = MIT
+PYTHON_INICONFIG_LICENSE_FILES = LICENSE
+
+$(eval $(python-package))
--
2.28.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 3/4] package/python-pytest: new package
2020-09-01 17:16 [Buildroot] [PATCH v2 0/4] package/python-pytest: new package with dependencies Marcin Niestroj
2020-09-01 17:16 ` [Buildroot] [PATCH v2 1/4] package/python-pluggy: new package Marcin Niestroj
2020-09-01 17:16 ` [Buildroot] [PATCH v2 2/4] package/python-iniconfig: " Marcin Niestroj
@ 2020-09-01 17:16 ` Marcin Niestroj
2020-09-01 17:16 ` [Buildroot] [PATCH v2 4/4] support/testing: add pytest test Marcin Niestroj
3 siblings, 0 replies; 5+ messages in thread
From: Marcin Niestroj @ 2020-09-01 17:16 UTC (permalink / raw)
To: buildroot
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/python-pytest/Config.in | 16 ++++++++++++++++
package/python-pytest/python-pytest.hash | 5 +++++
package/python-pytest/python-pytest.mk | 15 +++++++++++++++
5 files changed, 38 insertions(+)
create mode 100644 package/python-pytest/Config.in
create mode 100644 package/python-pytest/python-pytest.hash
create mode 100644 package/python-pytest/python-pytest.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index bdbaf551f3..928b259428 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1614,6 +1614,7 @@ F: package/python-ansicolors/
F: package/python-iniconfig/
F: package/python-packaging/
F: package/python-pluggy/
+F: package/python-pytest/
F: package/rs485conf/
F: package/turbolua/
F: support/testing/tests/package/test_netdata.py
diff --git a/package/Config.in b/package/Config.in
index 3c5b5cb255..4c64a0e944 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1118,6 +1118,7 @@ menu "External python modules"
source "package/python-pysocks/Config.in"
source "package/python-pytablereader/Config.in"
source "package/python-pytablewriter/Config.in"
+ source "package/python-pytest/Config.in"
source "package/python-pytrie/Config.in"
source "package/python-pytz/Config.in"
source "package/python-pyudev/Config.in"
diff --git a/package/python-pytest/Config.in b/package/python-pytest/Config.in
new file mode 100644
index 0000000000..ad57547a1b
--- /dev/null
+++ b/package/python-pytest/Config.in
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_PYTHON_PYTEST
+ bool "python-pytest"
+ depends on BR2_PACKAGE_PYTHON3
+ select BR2_PACKAGE_PYTHON_ATTRS # runtime
+ select BR2_PACKAGE_PYTHON_INICONFIG # runtime
+ select BR2_PACKAGE_PYTHON_MORE_ITERTOOLS # runtime
+ select BR2_PACKAGE_PYTHON_PACKAGING # runtime
+ select BR2_PACKAGE_PYTHON_PLUGGY # runtime
+ select BR2_PACKAGE_PYTHON_PY # runtime
+ select BR2_PACKAGE_PYTHON_TOML # runtime
+ help
+ pytest is a framework that makes building simple and scalable
+ tests easy. Tests are expressive and readable?no boilerplate
+ code required.
+
+ https://docs.pytest.org/en/latest/
diff --git a/package/python-pytest/python-pytest.hash b/package/python-pytest/python-pytest.hash
new file mode 100644
index 0000000000..6f3532a590
--- /dev/null
+++ b/package/python-pytest/python-pytest.hash
@@ -0,0 +1,5 @@
+# md5, sha256 from https://pypi.org/pypi/pytest/json
+md5 c3e7c811b2b74c60bb5fb951229ebce9 pytest-6.0.1.tar.gz
+sha256 85228d75db9f45e06e57ef9bf4429267f81ac7c0d742cc9ed63d09886a9fe6f4 pytest-6.0.1.tar.gz
+# Locally computer sha256
+sha256 7898b9b164d4f93fd9a562fd0f592935518b48c4745303964110eb7f7fe64faf LICENSE
diff --git a/package/python-pytest/python-pytest.mk b/package/python-pytest/python-pytest.mk
new file mode 100644
index 0000000000..c17d579f8c
--- /dev/null
+++ b/package/python-pytest/python-pytest.mk
@@ -0,0 +1,15 @@
+################################################################################
+#
+# python-pytest
+#
+################################################################################
+
+PYTHON_PYTEST_VERSION = 6.0.1
+PYTHON_PYTEST_SOURCE = pytest-$(PYTHON_PYTEST_VERSION).tar.gz
+PYTHON_PYTEST_SITE = https://files.pythonhosted.org/packages/20/4c/d7b19b8661be78461fff0392e33943784340424921578fe1bf300ef59831
+PYTHON_PYTEST_SETUP_TYPE = setuptools
+PYTHON_PYTEST_LICENSE = MIT
+PYTHON_PYTEST_LICENSE_FILES = LICENSE
+PYTHON_PYTEST_DEPENDENCIES = host-python-setuptools-scm
+
+$(eval $(python-package))
--
2.28.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Buildroot] [PATCH v2 4/4] support/testing: add pytest test
2020-09-01 17:16 [Buildroot] [PATCH v2 0/4] package/python-pytest: new package with dependencies Marcin Niestroj
` (2 preceding siblings ...)
2020-09-01 17:16 ` [Buildroot] [PATCH v2 3/4] package/python-pytest: " Marcin Niestroj
@ 2020-09-01 17:16 ` Marcin Niestroj
3 siblings, 0 replies; 5+ messages in thread
From: Marcin Niestroj @ 2020-09-01 17:16 UTC (permalink / raw)
To: buildroot
Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
---
changes v1 -> v2:
* remove .gitlab-ci.yml changes (not needed anymore)
DEVELOPERS | 2 ++
.../tests/package/sample_python_pytest.py | 25 +++++++++++++++++++
.../tests/package/test_python_pytest.py | 19 ++++++++++++++
3 files changed, 46 insertions(+)
create mode 100644 support/testing/tests/package/sample_python_pytest.py
create mode 100644 support/testing/tests/package/test_python_pytest.py
diff --git a/DEVELOPERS b/DEVELOPERS
index 928b259428..3ced195207 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1617,7 +1617,9 @@ F: package/python-pluggy/
F: package/python-pytest/
F: package/rs485conf/
F: package/turbolua/
+F: support/testing/tests/package/sample_python_pytest.py
F: support/testing/tests/package/test_netdata.py
+F: support/testing/tests/package/test_python_pytest.py
N: Marcus Folkesson <marcus.folkesson@gmail.com>
F: package/libostree/
diff --git a/support/testing/tests/package/sample_python_pytest.py b/support/testing/tests/package/sample_python_pytest.py
new file mode 100644
index 0000000000..870cc8512b
--- /dev/null
+++ b/support/testing/tests/package/sample_python_pytest.py
@@ -0,0 +1,25 @@
+import pytest
+
+
+x = 1
+
+
+ at pytest.fixture()
+def f1():
+ global x
+ x = 2
+ yield 15
+ x = 3
+
+
+def test_1():
+ assert x == 1
+
+
+def test_2(f1):
+ assert x == 2
+ assert f1 == 15
+
+
+def test_3():
+ assert x == 3
diff --git a/support/testing/tests/package/test_python_pytest.py b/support/testing/tests/package/test_python_pytest.py
new file mode 100644
index 0000000000..7fa7e44018
--- /dev/null
+++ b/support/testing/tests/package/test_python_pytest.py
@@ -0,0 +1,19 @@
+import os
+
+from tests.package.test_python import TestPythonPackageBase
+
+
+class TestPythonPy3Pytest(TestPythonPackageBase):
+ __test__ = True
+ config = TestPythonPackageBase.config + \
+ """
+ BR2_PACKAGE_PYTHON3=y
+ BR2_PACKAGE_PYTHON_PYTEST=y
+ """
+ sample_scripts = ["tests/package/sample_python_pytest.py"]
+
+ def run_sample_scripts(self):
+ for script in self.sample_scripts:
+ cmd = self.interpreter + " -m pytest " + os.path.basename(script)
+ _, exit_code = self.emulator.run(cmd, timeout=self.timeout)
+ self.assertEqual(exit_code, 0)
--
2.28.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-09-01 17:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-01 17:16 [Buildroot] [PATCH v2 0/4] package/python-pytest: new package with dependencies Marcin Niestroj
2020-09-01 17:16 ` [Buildroot] [PATCH v2 1/4] package/python-pluggy: new package Marcin Niestroj
2020-09-01 17:16 ` [Buildroot] [PATCH v2 2/4] package/python-iniconfig: " Marcin Niestroj
2020-09-01 17:16 ` [Buildroot] [PATCH v2 3/4] package/python-pytest: " Marcin Niestroj
2020-09-01 17:16 ` [Buildroot] [PATCH v2 4/4] support/testing: add pytest test Marcin Niestroj
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.