• [gentoo-dev] [PATCH] pypi.eclass: A new eclass to aid creating PyPI SRC

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Wed Feb 1 20:40:01 2023
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/pypi.eclass | 117 +++++++++++++++++++++++++++++++++++++++++++++
    1 file changed, 117 insertions(+)
    create mode 100644 eclass/pypi.eclass


    Example use on: https://github.com/gentoo/gentoo/pull/29361


    diff --git a/eclass/pypi.eclass b/eclass/pypi.eclass
    new file mode 100644
    index 000000000000..12ce5d4ace15
    --- /dev/null
    +++ b/eclass/pypi.eclass
    @@ -0,0 +1,117 @@
    +# Copyright 2023 Gentoo Authors
    +# Distributed under the terms of the GNU General Public License v2
    +
    +# @ECLASS: pypi.eclass
    +# @MAINTAINER:
    +# Michał Górny <mgorny@gentoo.org>
    +# @AUTHOR:
    +# Michał Górny <mgorny@gentoo.org>
    +# @SUPPORTED_EAPIS: 8
    +# @BLURB: A helper eclass to generate PyPI source URIs
    +# @DESCRIPTION:
    +# The pypi.eclass can be used to easily obtain URLs for artifacts
    +# uploaded to PyPI.org. When inherited, the eclass defaults SRC_URI
    +# to fetch ${P}.tar.gz sdist.
    +#
    +# If necessary, SRC_URI can be overriden by the ebuild. Two helper
    +# functions, pypi_sdist_url and pypi_wheel_url
  • From Adrian Schollmeyer@21:1/5 to All on Wed Feb 1 23:30:02 2023
    Hi,

    Am Mittwoch, dem 01.02.2023 um 20:37 +0100 schrieb Michał Górny:
    +       printf "https://files.pythonhosted.org/packages/source/%s" \ +               "${project::1}/${project}/${project}-${version}${suffix}"
    We have the mirror://pypi URI for PyPI sources. Is there a reason not
    to use this mirror URI in the eclass?

    Best regards
    Adrian

    -----BEGIN PGP SIGNATURE-----

    iHUEABYIAB0WIQQcg0lBH7AUcc2KLs8BUfPlCnnJ+QUCY9rlswAKCRABUfPlCnnJ +YGaAQD/VzWoxNeWpYTNesD2lF9oSnByJM4Bg41mACqAL4HfQQEAm3WBqcjIYNBo OwIKm4MZq5phHWJmMmeu2T5m57klsQA=
    =rDxR
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Anna (cybertailor) Vyalkova@21:1/5 to All on Thu Feb 2 00:30:01 2023
    Much wanted eclass. Thanks!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?=@21:1/5 to Adrian Schollmeyer on Thu Feb 2 06:10:01 2023
    On Wed, 2023-02-01 at 23:20 +0100, Adrian Schollmeyer wrote:
    Hi,

    Am Mittwoch, dem 01.02.2023 um 20:37 +0100 schrieb Michał Górny:
    +       printf "https://files.pythonhosted.org/packages/source/%s" \ +               "${project::1}/${project}/${project}-${version}${suffix}"
    We have the mirror://pypi URI for PyPI sources. Is there a reason not
    to use this mirror URI in the eclass?


    The purpose of this eclass is to replace mirror://pypi/.

    --
    Best regards,
    Michał Górny

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)