*/*: Bump copyright on files touched this year
[gentoo.git] / dev-python / backports-os / backports-os-0.1.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 PYTHON_COMPAT=( python2_7 python3_{6,7} )
7 inherit distutils-r1
8
9 DESCRIPTION="Backport of new features in Python's os module"
10 HOMEPAGE="https://github.com/pjdelport/backports.os"
11 SRC_URI="https://github.com/pjdelport/backports.os/archive/v${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="PYTHON"
14 SLOT="0"
15 KEYWORDS="~alpha amd64 arm arm64 hppa ia64 ppc ppc64 sparc x86"
16 IUSE=""
17
18 DEPEND=""
19 RDEPEND="${DEPEND}
20         dev-python/backports[${PYTHON_USEDEP}]
21         dev-python/future[${PYTHON_USEDEP}]
22         dev-python/setuptools_scm[${PYTHON_USEDEP}]
23 "
24
25 S="${WORKDIR}/${P/-/.}"
26
27 src_prepare() {
28         export SETUPTOOLS_SCM_PRETEND_VERSION="${PV}"
29         distutils-r1_src_prepare
30 }
31
32 python_test() {
33         esetup.py test
34 }
35
36 python_install() {
37         distutils-r1_python_install
38         # main namespace provided by dev-python/backports
39         rm "${D}/$(python_get_sitedir)"/backports/__init__.py* || die
40         rm -rf "${D}/$(python_get_sitedir)"/backports/__pycache__ || die
41 }