Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Resolved] ebuild for dev-python/molecule-plugins-23.4.1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
mobiusproject
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jun 2003
Posts: 129

PostPosted: Sat May 06, 2023 1:01 am    Post subject: [Resolved] ebuild for dev-python/molecule-plugins-23.4.1 Reply with quote

I am trying to make an ebuild for dev-python/molecule-plugins-23.4.1.

Code:
# Copyright 2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{10..11} )
inherit distutils-r1 pypi

DESCRIPTION="Ansible Molecule driver plugins"
HOMEPAGE="
    https://github.com/ansible-community/molecule-plugins/
    https://pypi.org/project/molecule-plugins/
"
SRC_URI="https://github.com/ansible-community/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"

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

RDEPEND="app-admin/ansible-molecule"
BDEPEND="
    test? (
        dev-python/podman
    )
"

distutils_enable_tests pytest


Without the SRC_URI, it tries to download
`https://files.pythonhosted.org/packages/source/m/molecule-plugins/molecule_plugins-23.4.1.tar.gz`
which doesn't exist, though
`https://files.pythonhosted.org/packages/source/m/molecule-plugins/molecule-plugins-23.4.1.tar.gz` does.

With the SRC_URI, it downloads the file from github, but when unpacking and changing to the working directory, it once again changes the dash `-` to and underscore `_` and can't find
`/var/tmp/portage/dev-python/molecule-plugins-23.4.1/work/molecule_plugins-23.4.1/`, though
`/var/tmp/portage/dev-python/molecule-plugins-23.4.1/work/molecule-plugins-23.4.1/` exists.

Is there an easy fix for this?


Last edited by mobiusproject on Sat May 06, 2023 5:34 am; edited 1 time in total
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1846

PostPosted: Sat May 06, 2023 2:23 am    Post subject: Reply with quote

PYPI_NO_NORMALIZE=1 before inherit and dump the SRC_URI. This avoids the "normalizing" of SRC_URI and S variables.

Found in the pypi eclass documentation.
Back to top
View user's profile Send private message
mobiusproject
Tux's lil' helper
Tux's lil' helper


Joined: 15 Jun 2003
Posts: 129

PostPosted: Sat May 06, 2023 5:34 am    Post subject: Reply with quote

@grknight Thank you. I was reading through https://projects.gentoo.org/python/guide/ but so far hadn't found that flag.
Back to top
View user's profile Send private message
gwerlas
n00b
n00b


Joined: 22 May 2010
Posts: 2

PostPosted: Wed Sep 25, 2024 12:59 pm    Post subject: overlay Reply with quote

@mobiusproject Did you publish your ebuild ?

Do you have an overlay ?

I'ld like to install molecule-plugins on my Gentoo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum