f6b940d010dc2fda1b3050c403e4da051532866c
[gentoo.git] / dev-python / pyserial / pyserial-3.4.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 PYTHON_COMPAT=( python2_7 python3_{6,7,8} )
6
7 inherit distutils-r1
8
9 DESCRIPTION="Python Serial Port extension"
10 HOMEPAGE="https://github.com/pyserial/pyserial https://pypi.org/project/pyserial/"
11 SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
12
13 LICENSE="PSF-2"
14 SLOT="0"
15 KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 s390 sparc x86"
16 IUSE="examples"
17
18 BDEPEND="
19         dev-python/setuptools[${PYTHON_USEDEP}]
20 "
21
22 DOCS=( CHANGES.rst README.rst )
23
24 distutils_enable_sphinx documentation --no-autodoc
25
26 python_test() {
27         "${EPYTHON}" test/run_all_tests.py loop:// -v || die "Testing failed with ${EPYTHON}"
28 }
29
30 python_install_all() {
31         distutils-r1_python_install_all
32         if use examples; then
33                 dodoc -r examples
34                 docompress -x /usr/share/doc/${PF}/examples
35         fi
36 }