editorconfig: fork, Gentoo just can't make it right

This commit is contained in:
Anton Bolshakov 2024-02-14 15:34:21 +08:00
parent c32d307d2c
commit d9b8d910fb
No known key found for this signature in database
GPG key ID: 32BDCED870788F04
6 changed files with 20 additions and 35 deletions

View file

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>chutzpah@gentoo.org</email>
<name>Patrick McLean</name>
</maintainer>
<maintainer type="project">
<email>python@gentoo.org</email>
<name>Python</name>
</maintainer>
<use>
<flag name="cli">Install command line interface as well as python library</flag>
</use>
<longdescription lang="en">
EditorConfig Python Core provides the same functionality as the
EditorConfig C Core. EditorConfig Python core can be used as a
command line program or as an importable library.
</longdescription>
<upstream>
<remote-id type="github">editorconfig/editorconfig-core-test</remote-id>
<remote-id type="pypi">EditorConfig</remote-id>
</upstream>
</pkgmetadata>

View file

@ -4,29 +4,38 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
PYTHON_COMPAT=( python3_{9..12} )
PYTHON_COMPAT=( python3_{10..12} )
inherit cmake distutils-r1
MY_P=editorconfig-core-py-${PV}
TESTVER="abb579e00f2deeede91cb485e53512efab9c6474"
DESCRIPTION="Clone of EditorConfig core written in Python"
HOMEPAGE="https://editorconfig.org/"
SRC_URI="https://github.com/${PN%-core-py}/${PN}/archive/v${PV}.tar.gz -> ${P}.gh.tar.gz
SRC_URI="
https://github.com/editorconfig/editorconfig-core-py/archive/v${PV}.tar.gz
-> ${MY_P}.gh.tar.gz
test? (
https://github.com/${PN%-core-py}/${PN%-core-py}-core-test/archive/${TESTVER}.tar.gz -> ${PN%-core-py}-core-test-${TESTVER}.gh.tar.gz
)"
https://github.com/editorconfig/editorconfig-core-test/archive/${TESTVER}.tar.gz
-> editorconfig-core-test-${TESTVER}.gh.tar.gz
)
"
S=${WORKDIR}/${MY_P}
LICENSE="PYTHON BSD-4"
LICENSE="PYTHON BSD-2"
SLOT="0"
KEYWORDS="amd64 arm64 x86"
KEYWORDS="~amd64 ~x86"
IUSE="cli test"
RESTRICT="!test? ( test )"
RDEPEND="
cli? ( !app-text/editorconfig-core-c[cli] )"
!<app-vim/editorconfig-vim-0.3.3-r1
cli? ( !app-text/editorconfig-core-c[cli] )
"
src_prepare() {
if use test; then
mv "${WORKDIR}"/${PN%-core-py}-core-test-${TESTVER}/* "${S}"/tests || die
mv "${WORKDIR}"/editorconfig-core-test-${TESTVER}/* "${S}"/tests || die
fi
if ! use cli; then
sed -i -e '/editorconfig\.__main__/d' setup.py || die

View file

@ -16,5 +16,5 @@ SLOT="0"
KEYWORDS="amd64 ~arm64 x86"
RDEPEND=">=dev-python/six-1.13.0[${PYTHON_USEDEP}]
>=dev-python/editorconfig-core-py-0.12.2[${PYTHON_USEDEP}]"
>=dev-python/editorconfig-0.12.2[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}"

View file

@ -16,5 +16,5 @@ SLOT="0"
KEYWORDS="amd64 ~arm64 x86"
RDEPEND=">=dev-python/six-1.13.0[${PYTHON_USEDEP}]
>=dev-python/editorconfig-core-py-0.12.2[${PYTHON_USEDEP}]"
>=dev-python/editorconfig-0.12.2[${PYTHON_USEDEP}]"
DEPEND="${RDEPEND}"

View file

@ -344,7 +344,7 @@ dev-python/antlr4-python3-runtime
~dev-python/cryptography-38.0.1
#dev-python/jsbeautifier
~dev-python/editorconfig-core-py-0.12.3
~dev-python/editorconfig-0.12.4
#required by androguard
dev-python/pydot amd64