*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-python / uranium / uranium-3.6.0-r1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=6
5
6 PYTHON_COMPAT=( python3_6 )
7
8 inherit cmake-utils python-single-r1
9
10 MY_PN="Uranium"
11
12 DESCRIPTION="A Python framework for building 3D printing related applications"
13 HOMEPAGE="https://github.com/Ultimaker/Uranium"
14 SRC_URI="https://github.com/Ultimaker/${MY_PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
15
16 LICENSE="LGPL-3"
17 SLOT="0"
18 KEYWORDS="~amd64 ~x86"
19 IUSE="doc test"
20 RESTRICT="!test? ( test )"
21 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
22
23 RDEPEND="${PYTHON_DEPS}
24         ~dev-libs/libarcus-${PV}:=[python,${PYTHON_USEDEP}]
25         dev-python/PyQt5[${PYTHON_USEDEP},declarative,network,svg]
26         dev-python/numpy[${PYTHON_USEDEP}]
27         >=sci-libs/scipy-1.1[${PYTHON_USEDEP}]
28         sci-libs/Shapely[${PYTHON_USEDEP}]
29         dev-qt/qtquickcontrols:5
30         dev-qt/qtquickcontrols2:5"
31
32 DEPEND="${RDEPEND}
33         sys-devel/gettext
34         doc? ( app-doc/doxygen )
35         test? ( dev-python/pytest[${PYTHON_USEDEP}] )"
36
37 DOCS=( README.md )
38
39 PATCHES=( "${FILESDIR}/${PN}-3.3.0-fix-install-paths.patch" )
40
41 S="${WORKDIR}/${MY_PN}-${PV}"
42
43 src_configure() {
44         local mycmakeargs=(
45                 -DPYTHON_SITE_PACKAGES_DIR="$(python_get_sitedir)" )
46         cmake-utils_src_configure
47 }
48
49 src_compile() {
50         cmake-utils_src_compile
51         if use doc; then
52                 cmake-utils_src_compile doc
53                 DOCS+=( html )
54         fi
55 }
56
57 src_test() {
58         emake -C "${BUILD_DIR}" tests
59 }
60
61 src_install() {
62         cmake-utils_src_install
63         python_optimize "${D}usr/$(get_libdir)"
64 }