blob: 6376ed6ed966a70e56ab4316249656e0a43bd2b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..11} )
inherit distutils-r1
DESCRIPTION="Python scrapper to access ModDB mods, games and more as objects"
HOMEPAGE="https://github.com/ClementJ18/moddb"
SRC_URI="https://github.com/ClementJ18/moddb/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
# Connects to moddb.com
PROPERTIES="test_network"
RESTRICT="test"
RDEPEND="
dev-python/beautifulsoup4[${PYTHON_USEDEP}]
dev-python/requests[${PYTHON_USEDEP}]
dev-python/toolz[${PYTHON_USEDEP}]
dev-python/pyrate-limiter[${PYTHON_USEDEP}]
"
BDEPEND="test? (
dev-python/pytest-rerunfailures[${PYTHON_USEDEP}]
)"
EPYTEST_DESELECT=(
# These tests require valid moddb.com login information
"tests/test_base.py::TestLogin::test_login"
"tests/test_client.py::TestClient::test_get_watched"
"tests/test_client.py::TestClient::test_get_updates"
"tests/test_client.py::TestClient::test_posts"
"tests/test_client.py::TestClient::test_friends"
"tests/test_client.py::TestClient::test_messages"
)
distutils_enable_sphinx docs/source dev-python/sphinx-autodoc-typehints
distutils_enable_tests pytest
python_test() {
# Dummy moddb.com login information
export USERNAME="portage"
export SENDER_USERNAME="portage"
export PASSWORD="testing"
export SENDER_PASSWORD="testing"
epytest
}
|