aboutsummaryrefslogtreecommitdiff
path: root/dev-python/openfoodfacts/openfoodfacts-0.3.0.ebuild
blob: 44f2b833a799a2769f16642e2c836ca8c9ed3770 (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
# Copyright 2023-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

PYTHON_COMPAT=( python3_{10..12} )
DISTUTILS_USE_PEP517=poetry

inherit distutils-r1

DESCRIPTION="Python package for Open Food Facts"
HOMEPAGE="
	https://github.com/openfoodfacts/openfoodfacts-python
	https://pypi.org/project/openfoodfacts/
	http://openfoodfacts.org/
"
# Tests not packaged in pypi
SRC_URI="https://github.com/openfoodfacts/openfoodfacts-python/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz"
S="${WORKDIR}/${PN}-python-${PV}"

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

RDEPEND="
	>=dev-python/requests-2.20.0[${PYTHON_USEDEP}]
	>=dev-python/pydantic-2.0.0[${PYTHON_USEDEP}]
	<dev-python/pydantic-3.0.0[${PYTHON_USEDEP}]
	>=dev-python/tqdm-4.0.0[${PYTHON_USEDEP}]
	<dev-python/tqdm-5.0.0[${PYTHON_USEDEP}]

	test? (
		dev-python/requests-mock[${PYTHON_USEDEP}]
		dev-python/types-requests[${PYTHON_USEDEP}]
	)
"
DEPEND="${RDEPEND}"

distutils_enable_tests unittest