summaryrefslogtreecommitdiff
path: root/dev-python/pslab
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-01-30 17:49:05 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-01-30 17:49:05 +0000
commit28d8acbb30a9ebda81447e5e3f5210a438ba7d24 (patch)
tree6d6b6b0a1aca19e8118845870c9e6a25bad27963 /dev-python/pslab
parent840a65e2af3f2cc7527e723a28f6e627a9592fb7 (diff)
gentoo auto-resync : 30:01:2024 - 17:49:05
Diffstat (limited to 'dev-python/pslab')
-rw-r--r--dev-python/pslab/Manifest3
-rw-r--r--dev-python/pslab/files/pslab-3.0.0-pytest_record.patch36
-rw-r--r--dev-python/pslab/pslab-3.0.0.ebuild51
3 files changed, 90 insertions, 0 deletions
diff --git a/dev-python/pslab/Manifest b/dev-python/pslab/Manifest
index adbfa7a70082..c780b3a6644e 100644
--- a/dev-python/pslab/Manifest
+++ b/dev-python/pslab/Manifest
@@ -1,4 +1,7 @@
AUX pslab-2.5.0-ad9833_sys_version.patch 302 BLAKE2B fba89ba6c99024b14106c6b9b1d0783a0d330b368237412043098f94bf3f53bee4a7c35933b66037fb2985aa0954a31171976625c3d1731f961d169d3153878f SHA512 822ae24fd8a02ae5c075a45a8cfd1c174f8cbe11ba2b6f97ef5724e7365942aa150837d7feeede38706b7d0c19f315e585090952bf2066a135acfc0eff65584b
+AUX pslab-3.0.0-pytest_record.patch 1395 BLAKE2B a835c781ce7dda59c0e6b591e432085115cf9f2295cb31914a43f88957eee4e8b70de552b92d03828e51bfc005cf29131d46488d3082690a68dcb192b90f233b SHA512 13ea71330e79e17493a8c063f772dbdf668e75430ef41a23bb4f23e9ea4d1d926712c6482baf9a93bc35c5a195196f424ae2a884cab14033059b68b28e088947
DIST pslab-python-2.5.0.gh.tar.gz 353493 BLAKE2B 4eae07fec800dc357041578a75e48812848588e49e14b75425ee4b24c62b1116d0493055564188e33e4d934f4d572708c811ec9bb7fbf5d437befedfcad5da1a SHA512 e8e4f53dc8c1d6aa4385cdbdc8a82bac21d9de15643980fed42a2b16c10ff56e0836371368840c9207d6bd6f8d73900a344507b8bce8b197f0580373137c0f1f
+DIST pslab-python-3.0.0.gh.tar.gz 357657 BLAKE2B 34d8817dd47588a488359b53a7c3737afc0b3d14c5a751990a6030a17f30cb99d65f235a7eaf26b5a4f7f41931ea20bff086a5463563faa189e6cc46336366b6 SHA512 fdb5180e6fb55b2b6262997981c1d9b56652fbd902cfb4e8c347dff87d32d234a61f5a3ff50e5fb55eb0fecc6d2cb09df5cbc9e747df00e5973c19fba7f3c554
EBUILD pslab-2.5.0.ebuild 1014 BLAKE2B a9e037f3fd1bc6a970e1485b976c381ea2815d87eeb128967a3e0dd9a05abe70ef479ca3a31fd24d4327d47f1036636d5cf7d5cc93d3863e16de5271dc8f6d02 SHA512 3b3b16619dcc116c0e7d14e3c7b6c48fdca3e1107573ca98c657dccfd4f83f7714cf92208b459c3c78ec6e4144c0126e56ed11ce17406a5ce4d372bc539ad462
+EBUILD pslab-3.0.0.ebuild 1106 BLAKE2B 96064e9058d8ae67ff4782d277ceb0bdd35fc6d680b2837add9bd7696d4054d4e68887f4e883ba0d4ad7ae9f6869bffc22f6cb3c8955e744e269c67593ff35b3 SHA512 b05701d10c43fc6d2feb07b02c7be22a2730ebebf87735b13bb2c3f47111ce469bec27dc773fb478e4a86e5593fd625b53855a100b4fc19450b6a75e51d54fa4
MISC metadata.xml 375 BLAKE2B 4ed4369e2e20e367360202a3445fa7a101c0e906386241faa8a30b2d40856ae5345192497cee07f24f557ee2740e9cc6b6e05d6f9fdf9b453e4324e286818d23 SHA512 9fd08112fe7af647304d5db7a4b174cb5cf57f253537b163eb261c3fcc1511144a8366a92caf6a7abf4036b104a12ac806b89bed28aa84c9c6f5ac1d7e4a1536
diff --git a/dev-python/pslab/files/pslab-3.0.0-pytest_record.patch b/dev-python/pslab/files/pslab-3.0.0-pytest_record.patch
new file mode 100644
index 000000000000..90d5448998a8
--- /dev/null
+++ b/dev-python/pslab/files/pslab-3.0.0-pytest_record.patch
@@ -0,0 +1,36 @@
+Now that dev-python/pslab indirectly depends on pytest-reserial
+(it is a test dependency of dev-python/mcbootflash), the option name --record
+produces a collision.
+
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -8,9 +8,9 @@
+ Additionally, certain pins must be connected in a specific manner. Refer to the
+ individual test modules in the tests package.
+
+-By calling pytest with the --record flag, the serial traffic generated by the
++By calling pytest with the --record-serial flag, the serial traffic generated by the
+ integration tests will be recorded to JSON files, which are played back during
+-unit testing. The --record flag implies --integration.
++unit testing. The --record-serial flag implies --integration.
+ """
+
+ import json
+@@ -23,7 +23,7 @@
+
+ def pytest_addoption(parser):
+ parser.addoption("--integration", action="store_true", default=False)
+- parser.addoption("--record", action="store_true", default=False)
++ parser.addoption("--record-serial", action="store_true", default=False)
+
+
+ @pytest.fixture(scope="module")
+@@ -38,7 +38,7 @@
+
+ When running unit tests, the SerialHandler is a MockHandler.
+ """
+- record = request.config.getoption("--record")
++ record = request.config.getoption("--record-serial")
+ integration = request.config.getoption("--integration") or record
+ logfile = os.path.join(logdir, request.node.name + ".json")
+
diff --git a/dev-python/pslab/pslab-3.0.0.ebuild b/dev-python/pslab/pslab-3.0.0.ebuild
new file mode 100644
index 000000000000..d7fb6b512c37
--- /dev/null
+++ b/dev-python/pslab/pslab-3.0.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=flit
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1
+
+MY_P=pslab-python-${PV}
+DESCRIPTION="Python library for communicating with Pocket Science Lab"
+HOMEPAGE="
+ https://pslab.io/
+ https://github.com/fossasia/pslab-python/
+ https://pypi.org/project/pslab/
+"
+SRC_URI="
+ https://github.com/fossasia/pslab-python/archive/v${PV}.tar.gz
+ -> ${MY_P}.gh.tar.gz
+"
+S=${WORKDIR}/${MY_P}
+
+LICENSE="GPL-3+"
+SLOT="0"
+KEYWORDS="~amd64"
+
+RDEPEND="
+ >=dev-python/mcbootflash-8.0.0[${PYTHON_USEDEP}]
+ >=dev-python/numpy-1.16.3[${PYTHON_USEDEP}]
+ >=dev-python/pyserial-3.4[${PYTHON_USEDEP}]
+ >=dev-python/scipy-1.3.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/pytest-mock[${PYTHON_USEDEP}]
+ )
+"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-2.5.0-ad9833_sys_version.patch
+ "${FILESDIR}"/${PN}-3.0.0-pytest_record.patch
+)
+
+EPYTEST_DESELECT=(
+ # Flaky in 2.5.0
+ tests/test_logic_analyzer.py::test_stop
+)
+
+distutils_enable_sphinx docs dev-python/recommonmark
+distutils_enable_tests pytest