summaryrefslogtreecommitdiff
blob: a2339af0b03331062d2c89a39130da936b998308 (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
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{8..10} )
PYTHON_REQ_USE='xml(+)'

inherit distutils-r1 git-r3

DESCRIPTION="Web-application vulnerability scanner"
HOMEPAGE="http://wapiti.sourceforge.net/"
EGIT_REPO_URI="https://git.code.sf.net/p/wapiti/git wapiti-git"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
# Requires httpx-ntlm (to package)
#IUSE="ntlm"

# httpx requires brotli and socks, so depending on
# dev-python/socksio and dev-python/brotlicffi
RDEPEND="dev-python/beautifulsoup4[${PYTHON_USEDEP}]
	dev-python/brotlicffi[${PYTHON_USEDEP}]
	dev-python/httpx[${PYTHON_USEDEP}]
	dev-python/lxml[${PYTHON_USEDEP}]
	dev-python/mako[${PYTHON_USEDEP}]
	>=dev-python/requests-1.2.3[${PYTHON_USEDEP}]
	dev-python/socksio[${PYTHON_USEDEP}]
	dev-python/tld[${PYTHON_USEDEP}]
	dev-python/yaswfp[${PYTHON_USEDEP}]"

distutils_enable_tests --install pytest
# Tests also require unpackaged respx
BDEPEND+=" test? (
				dev-python/pytest-asyncio[${PYTHON_USEDEP}]
				dev-python/pytest-cov[${PYTHON_USEDEP}]
				dev-python/responses[${PYTHON_USEDEP}]
				)"
# Many tests require execution of local test php server
RESTRICT="test"

python_prepare_all() {
	sed -e 's/"pytest-runner"//' \
		-e "/DOC_DIR =/s/wapiti/${PF}/" \
		-i setup.py || die
	distutils-r1_python_prepare_all
}