diff options
author | Marek Szuba <marecki@gentoo.org> | 2024-01-30 15:02:50 +0000 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2024-01-30 15:14:57 +0000 |
commit | dbd8ba325de9592f85434c9dd5134e36a5525d6d (patch) | |
tree | 99d22aa0039ff96b91c70c2648ea32d0f5f7de61 /dev-python/pslab | |
parent | dev-python/mcbootflash: new package, add 8.0.0 (diff) | |
download | gentoo-dbd8ba325de9592f85434c9dd5134e36a5525d6d.tar.gz gentoo-dbd8ba325de9592f85434c9dd5134e36a5525d6d.tar.bz2 gentoo-dbd8ba325de9592f85434c9dd5134e36a5525d6d.zip |
dev-python/pslab: add 3.0.0
Closes: https://bugs.gentoo.org/921434
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Diffstat (limited to 'dev-python/pslab')
-rw-r--r-- | dev-python/pslab/Manifest | 1 | ||||
-rw-r--r-- | dev-python/pslab/files/pslab-3.0.0-pytest_record.patch | 36 | ||||
-rw-r--r-- | dev-python/pslab/pslab-3.0.0.ebuild | 51 |
3 files changed, 88 insertions, 0 deletions
diff --git a/dev-python/pslab/Manifest b/dev-python/pslab/Manifest index 1b7fb58e68e3..0859906294fc 100644 --- a/dev-python/pslab/Manifest +++ b/dev-python/pslab/Manifest @@ -1 +1,2 @@ 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 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 |