*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / mysql-python / mysql-python-1.2.5-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=5
5
6 PYTHON_COMPAT=( python2_7 )
7
8 inherit distutils-r1 flag-o-matic
9
10 MY_PN="MySQL-python"
11 MY_P="${MY_PN}-${PV}"
12
13 DESCRIPTION="Python interface to MySQL"
14 HOMEPAGE="https://sourceforge.net/projects/mysql-python/ https://pypi.org/project/MySQL-python/"
15 SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.zip"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="alpha amd64 arm arm64 hppa ia64 ppc ppc64 s390 ~sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
20 IUSE="doc"
21
22 RDEPEND="virtual/mysql"
23 DEPEND="${RDEPEND}
24         app-arch/unzip
25         dev-python/setuptools[${PYTHON_USEDEP}]
26         doc? ( dev-python/sphinx[${PYTHON_USEDEP}] )"
27
28 S="${WORKDIR}/${MY_P}"
29
30 DOCS=( HISTORY README.md doc/{FAQ,MySQLdb}.rst )
31
32 python_configure_all() {
33         append-flags -fno-strict-aliasing
34 }
35
36 python_compile_all() {
37         use doc && sphinx-build -b html doc doc/_build/
38 }
39
40 python_install_all() {
41         use doc && local HTML_DOCS=( doc/_build/. )
42         distutils-r1_python_install_all
43 }