Keith Haddow | 6ac6298 | 2019-06-04 08:39:35 -0700 | [diff] [blame] | 1 | # Copyright 1999-2019 Gentoo Authors |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | |
| 4 | EAPI=6 |
| 5 | |
| 6 | PYTHON_COMPAT=( python2_7 python3_{5,6,7} pypy ) |
| 7 | |
| 8 | inherit distutils-r1 |
| 9 | |
| 10 | DESCRIPTION="Fork of MySQL-python" |
| 11 | HOMEPAGE="https://pypi.org/project/mysqlclient/ https://github.com/PyMySQL/mysqlclient-python" |
| 12 | SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.post1.tar.gz -> ${PF}.tar.gz" |
| 13 | S="${WORKDIR}/${P}.post1" |
| 14 | |
| 15 | SLOT="0" |
| 16 | LICENSE="GPL-2" |
| 17 | KEYWORDS="*" |
| 18 | IUSE="doc" |
| 19 | |
| 20 | RDEPEND=" |
| 21 | !dev-python/mysql-python |
| 22 | dev-db/mariadb-connector-c[mysqlcompat]" |
| 23 | DEPEND="${RDEPEND} |
| 24 | dev-python/setuptools[${PYTHON_USEDEP}] |
| 25 | doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )" |
| 26 | |
| 27 | DOCS=( README.md doc/{FAQ,MySQLdb}.rst ) |
| 28 | |
| 29 | python_compile_all() { |
| 30 | use doc && sphinx-build -b html doc doc/_build/ |
| 31 | } |
| 32 | |
| 33 | python_install_all() { |
| 34 | use doc && local HTML_DOCS=( doc/_build/. ) |
| 35 | distutils-r1_python_install_all |
| 36 | } |