diff options
Diffstat (limited to 'dev-python')
| -rw-r--r-- | dev-python/openfoodfacts/Manifest | 1 | ||||
| -rw-r--r-- | dev-python/openfoodfacts/metadata.xml | 30 | ||||
| -rw-r--r-- | dev-python/openfoodfacts/openfoodfacts-2.2.0.ebuild | 40 | 
3 files changed, 71 insertions, 0 deletions
diff --git a/dev-python/openfoodfacts/Manifest b/dev-python/openfoodfacts/Manifest new file mode 100644 index 0000000..57ab7b7 --- /dev/null +++ b/dev-python/openfoodfacts/Manifest @@ -0,0 +1 @@ +DIST openfoodfacts-2.2.0.gh.tar.gz 96949 BLAKE2B f7805faaa62384c7ecdd0a83de4f5d7bd4783418b198106b65742028c8fb0af52adc779b175cc48ce7c1309cda81822720620951d60fad69542a033b999e7731 SHA512 77c2eab79e4d46b86b11a3a4e3dc63cc7644303472548492efded5be521add4846e5d6f3b54c8cb2f0cf02bcc241bc42c4996539f63e9d12dc188bcebd015be5 diff --git a/dev-python/openfoodfacts/metadata.xml b/dev-python/openfoodfacts/metadata.xml new file mode 100644 index 0000000..cefde98 --- /dev/null +++ b/dev-python/openfoodfacts/metadata.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +	<maintainer type="person"> +		<name>Julien Roy</name> +		<email>julien@jroy.ca</email> +	</maintainer> +	<longdescription> +This is the official Python SDK for the Open Food Facts project. It provides a simple interface to the Open Food Facts API and allows you to: + +	Get information about a product +	Perform text search +	Create a new product or update an existing one + +It also provides some helper functions to make it easier to work with Open Food Facts data and APIs, such as: + +	getting translation of a taxonomized field in a given language +	downloading and iterating over the Open Food Facts data dump +	handling OCRs of Open Food Facts images generated by Google Cloud Vision + +Please note that this SDK is still in beta and the API is subject to change. Make sure to pin the version in your requirements file. +	</longdescription> +	<upstream> +		<bugs-to>https://github.com/openfoodfacts/openfoodfacts-python/issues</bugs-to> +		<changelog>https://github.com/openfoodfacts/openfoodfacts-python/releases</changelog> +		<doc>https://openfoodfacts.github.io/openfoodfacts-python/</doc> +		<remote-id type="github">openfoodfacts/openfoodfacts-python</remote-id> +		<remote-id type="pypi">openfoodfacts</remote-id> +	</upstream> +</pkgmetadata> diff --git a/dev-python/openfoodfacts/openfoodfacts-2.2.0.ebuild b/dev-python/openfoodfacts/openfoodfacts-2.2.0.ebuild new file mode 100644 index 0000000..08111a9 --- /dev/null +++ b/dev-python/openfoodfacts/openfoodfacts-2.2.0.ebuild @@ -0,0 +1,40 @@ +# Copyright 2023-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{10..13} ) +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}] +		dev-python/redis[${PYTHON_USEDEP}] +	) +" +DEPEND="${RDEPEND}" + +distutils_enable_tests unittest  | 
