View previous topic :: View next topic |
Author |
Message |
jang0 Tux's lil' helper
Joined: 09 Nov 2020 Posts: 75
|
Posted: Sat Aug 24, 2024 10:15 pm Post subject: SOLVED rename ebuild to comply with python naming policy |
|
|
Hello! I'm trying to create an ebuild for dev-python/pandoc-fignos-2.4.0, it looks as this:
Code: |
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( pypy3 python3_{10..13} )
inherit distutils-r1 pypi
DESCRIPTION="A pandoc filter for numbering figures and their references when converting markdown to other formats"
HOMEPAGE="
https://github.com/tomduck/${PN}
https://pypi.org/project/${PN}
"
#SRC_URI=""
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
|
Trying to create the manifest I get the following error:
Code: |
$pkgdev manifest
...
* failed fetching file: pandoc_fignos-2.4.0.tar.gz, uri: https://files.pythonhosted.org/packages/source/p/pandoc-fignos/pandoc_fignos-2.4.0.tar.gz
* failed fetching files for package dev-python/pandoc-fignos::yango
pkgdev manifest: error: failed fetching required distfiles
|
This error is due to Python package naming policy
I attempt by specifying:
Code: |
SRC_URI="
https://files.pythonhosted.org/packages/source/p/pandoc-fignos/${P}.tar.gz
-> pandoc_fignos-${PV}.tar.gz
"
|
But I couldn't properly rename it to change hyphen "-" to underscore "_", the file keeps naming as pandoc-fignos-2.4.0
Code: |
#ebuild pandoc-fignos-2.4.0.ebuild clean test install
Forcing test.
* 2.4.0.tar.gz BLAKE2B SHA512 size ;-) ... [ ok ]
>>> Unpacking source...
>>> Unpacking 2.4.0.tar.gz to /var/tmp/portage/dev-python/pandoc-fignos-2.4.0/work
>>> Source unpacked in /var/tmp/portage/dev-python/pandoc-fignos-2.4.0/work
* ERROR: dev-python/pandoc-fignos-2.4.0::yango failed (prepare phase):
* The source directory '/var/tmp/portage/dev-python/pandoc-fignos-2.4.0/work/pandoc_fignos-2.4.0' doesn't exist
*
* Call stack:
* ebuild.sh, line 784: Called __ebuild_main 'prepare'
* phase-functions.sh, line 1073: Called __dyn_prepare
* phase-functions.sh, line 400: Called die
* The specific snippet of code:
* die "The source directory '${S}' doesn't exist"
...
|
How can I properly rename downloaded file from pandoc-fignos-2.4.0 to pandoc_fignos-2.4.0? What I'm missing?
Last edited by jang0 on Sun Aug 25, 2024 5:20 pm; edited 1 time in total |
|
Back to top |
|
|
salahx Guru
Joined: 12 Mar 2005 Posts: 556
|
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1910
|
Posted: Sun Aug 25, 2024 12:04 am Post subject: |
|
|
jang0 wrote: | This error is due to Python package naming policy
I attempt by specifying:
Code: |
SRC_URI="
https://files.pythonhosted.org/packages/source/p/pandoc-fignos/${P}.tar.gz
-> pandoc_fignos-${PV}.tar.gz
"
|
|
IIRC, file renames must be on the same line. A new line indicates a new file. |
|
Back to top |
|
|
eschwartz Developer
Joined: 29 Oct 2023 Posts: 214
|
Posted: Sun Aug 25, 2024 3:47 am Post subject: |
|
|
PYPI_NO_NORMALIZE maybe? |
|
Back to top |
|
|
jang0 Tux's lil' helper
Joined: 09 Nov 2020 Posts: 75
|
Posted: Sun Aug 25, 2024 5:19 pm Post subject: |
|
|
It functioned by adding the following line:
Thank you! |
|
Back to top |
|
|
|