From 43483f87d7f8409b0e437dad3a9383cfc96116d7 Mon Sep 17 00:00:00 2001 From: Julien Roy Date: Sat, 25 May 2024 14:46:21 -0400 Subject: dev-python/openfoodfacts: new package, add 0.3.0 Signed-off-by: Julien Roy --- dev-python/openfoodfacts/Manifest | 1 + dev-python/openfoodfacts/metadata.xml | 30 +++++++++++++++++ .../openfoodfacts/openfoodfacts-0.3.0.ebuild | 39 ++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 dev-python/openfoodfacts/Manifest create mode 100644 dev-python/openfoodfacts/metadata.xml create mode 100644 dev-python/openfoodfacts/openfoodfacts-0.3.0.ebuild diff --git a/dev-python/openfoodfacts/Manifest b/dev-python/openfoodfacts/Manifest new file mode 100644 index 0000000..dc334fd --- /dev/null +++ b/dev-python/openfoodfacts/Manifest @@ -0,0 +1 @@ +DIST openfoodfacts-0.3.0.gh.tar.gz 65284 BLAKE2B dff15408e803e217c6536dede62ca3abcc4511762571c7404d3f6b15971c2a4599c01dff7bc38c7c59d0bc2977962f20a375280093c2a54b1b31e1678bfd4950 SHA512 17b26e8ab46ea479edccb977f15d9f1f0ad5d4df7ffcbdfe592b2a70198e94ee31d8117622ac0b277c860b053ca51ad353851041411ca40bcb36fb89ac1edcf4 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 @@ + + + + + Julien Roy + julien@jroy.ca + + +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. + + + https://github.com/openfoodfacts/openfoodfacts-python/issues + https://github.com/openfoodfacts/openfoodfacts-python/releases + https://openfoodfacts.github.io/openfoodfacts-python/ + openfoodfacts/openfoodfacts-python + openfoodfacts + + diff --git a/dev-python/openfoodfacts/openfoodfacts-0.3.0.ebuild b/dev-python/openfoodfacts/openfoodfacts-0.3.0.ebuild new file mode 100644 index 0000000..44f2b83 --- /dev/null +++ b/dev-python/openfoodfacts/openfoodfacts-0.3.0.ebuild @@ -0,0 +1,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/tqdm-4.0.0[${PYTHON_USEDEP}] +