summaryrefslogtreecommitdiff
path: root/dev-python/factory-boy/factory-boy-3.3.3.ebuild
blob: 8f228e0ac98b12969611db3e792961a7bbdc7bc8 (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
55
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{13..14} )
DISTUTILS_USE_PEP517=setuptools

inherit distutils-r1

DESCRIPTION="Versatile test fixtures replacement based on thoughtbot's factory_bot"
HOMEPAGE="
	https://github.com/FactoryBoy/factory_boy
	https://pypi.org/project/factory-boy/
"
SRC_URI="https://github.com/FactoryBoy/factory_boy/archive/${PV}.tar.gz -> ${P}.gh.tar.gz"

S="${WORKDIR}/factory_boy-${PV}"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"

RDEPEND=">=dev-python/faker-0.7.0[${PYTHON_USEDEP}]"

BDEPEND="
	test? (
		${RDEPEND}
		dev-python/coverage[${PYTHON_USEDEP}]
		dev-python/django[${PYTHON_USEDEP}]
		dev-python/pillow[${PYTHON_USEDEP}]
		dev-python/sqlalchemy[${PYTHON_USEDEP}]
	)
"

EPYTEST_PLUGINS=( pytest-django )
EPYTEST_IGNORE=(
	# flask_sqlalchemy not packaged
	examples/flask_alchemy/test_demoapp.py
)
EPYTEST_DESELECT=(
	# completely broken ("setup_test_environment() was already called and can't
	# be called again without first calling teardown_test_environment().")
	tests/test_django.py
)
distutils_enable_tests pytest

src_install() {
	distutils-r1_src_install

	# Package installs broken "ChangeLog" symlink which points to changelog.rst,
	# so let's install that instead.
	rm "${ED}"/usr/share/doc/"${PF}"/ChangeLog || die
	dodoc docs/changelog.rst
}