diff options
author | Marek Szuba <marecki@gentoo.org> | 2019-06-28 19:38:52 +0100 |
---|---|---|
committer | Marek Szuba <marecki@gentoo.org> | 2019-06-28 19:39:40 +0100 |
commit | 1abca237df4ea8babf6b00af64b5bde541915493 (patch) | |
tree | bb886e8ba56ff144535856d4d75d341bb4160cef /dev-python | |
parent | sys-boot/silo: 1.4.14_p20170829 stable on sparc (diff) | |
download | gentoo-1abca237df4ea8babf6b00af64b5bde541915493.tar.gz gentoo-1abca237df4ea8babf6b00af64b5bde541915493.tar.bz2 gentoo-1abca237df4ea8babf6b00af64b5bde541915493.zip |
dev-python/pslab-python: new package
Official library for communicating with the Pocket Science Lab, a
universal USB-powered board featuring an oscilloscope, multimeter, logic
analyser and many more.
Signed-off-by: Marek Szuba <marecki@gentoo.org>
Package-Manager: Portage-2.3.66, Repoman-2.3.11
Diffstat (limited to 'dev-python')
5 files changed, 72 insertions, 0 deletions
diff --git a/dev-python/pslab-python/Manifest b/dev-python/pslab-python/Manifest new file mode 100644 index 000000000000..607e84c133d8 --- /dev/null +++ b/dev-python/pslab-python/Manifest @@ -0,0 +1 @@ +DIST pslab-python-1.0.1.tar.gz 15460183 BLAKE2B 6837c40352eecdf563fa700617ee1712997fc0532483357d889d0fb03645732e0febf5ac83cdc8c766b7ec6d9ac9a436a313d0f44221c2ea69044be6f4c11fa6 SHA512 939f3649a0060a59a39ee97b57134075f8602b966fb3d14250c8ae96c340a4ab33e9fa8d7c5d8cf09ae9297b762c203e4a256bc29b9ff6006ce6ff254c468ad2 diff --git a/dev-python/pslab-python/files/pslab-python-1.0.1-no_install_udev_rules.patch b/dev-python/pslab-python/files/pslab-python-1.0.1-no_install_udev_rules.patch new file mode 100644 index 000000000000..b721e8a8ab03 --- /dev/null +++ b/dev-python/pslab-python/files/pslab-python-1.0.1-no_install_udev_rules.patch @@ -0,0 +1,9 @@ +--- a/setup.py ++++ b/setup.py +@@ -50,6 +50,5 @@ + packages=find_packages(), + #scripts=["PSL/bin/"+a for a in os.listdir("PSL/bin/")], + package_data={'': ['*.css','*.png','*.gif','*.html','*.css','*.js','*.png','*.jpg','*.jpeg','*.htm','99-pslab.rules']}, +- cmdclass={'install': CustomInstall}, + ) + diff --git a/dev-python/pslab-python/files/pslab-python-1.0.1-sys_version.patch b/dev-python/pslab-python/files/pslab-python-1.0.1-sys_version.patch new file mode 100644 index 000000000000..474850a34b08 --- /dev/null +++ b/dev-python/pslab-python/files/pslab-python-1.0.1-sys_version.patch @@ -0,0 +1,11 @@ +--- a/PSL/SENSORS/AD9833.py ++++ b/PSL/SENSORS/AD9833.py +@@ -3,7 +3,7 @@ + + + class AD9833: +- if sys.version.major == 3: ++ if sys.version_info.major == 3: + DDS_MAX_FREQ = 0xFFFFFFF - 1 # 24 bit resolution + else: + DDS_MAX_FREQ = eval("0xFFFFFFFL-1") # 24 bit resolution diff --git a/dev-python/pslab-python/metadata.xml b/dev-python/pslab-python/metadata.xml new file mode 100644 index 000000000000..d93b6e0e2749 --- /dev/null +++ b/dev-python/pslab-python/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>marecki@gentoo.org</email> + <name>Marek Szuba</name> + </maintainer> + <upstream> + <remote-id type="github">fossasia/pslab-python</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/pslab-python/pslab-python-1.0.1.ebuild b/dev-python/pslab-python/pslab-python-1.0.1.ebuild new file mode 100644 index 000000000000..b3feed3e6281 --- /dev/null +++ b/dev-python/pslab-python/pslab-python-1.0.1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{5,6} ) + +inherit distutils-r1 + +DESCRIPTION="Python library for communicating with Pocket Science Lab" +HOMEPAGE="https://pslab.io" +SRC_URI="https://github.com/fossasia/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="~amd64" +IUSE="doc" + +RDEPEND="${PYTHON_DEPS} + dev-python/numpy + dev-python/pyqtgraph + dev-python/pyserial + sci-libs/scipy" +DEPEND="${RDEPEND} + doc? ( dev-python/sphinx )" +BDEPEND="dev-python/setuptools" + +PATCHES=( + "${FILESDIR}"/${PN}-1.0.1-sys_version.patch + "${FILESDIR}"/${PN}-1.0.1-no_install_udev_rules.patch +) + +python_compile_all() { + use doc && esetup.py build_sphinx +} + +python_install_all() { + use doc && HTML_DOCS=( "${BUILD_DIR}"/sphinx/html/. ) + distutils-r1_python_install_all +} |