From 27fbb3a4337a6c38c24a5e420f240c48b646071d Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Fri, 24 May 2024 11:55:51 +0200 Subject: dev-python/pypugjs: Fix more pyproject.toml issues MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- dev-python/pypugjs/pypugjs-5.10.1-r1.ebuild | 58 +++++++++++++++++++++++++++++ dev-python/pypugjs/pypugjs-5.10.1.ebuild | 49 ------------------------ 2 files changed, 58 insertions(+), 49 deletions(-) create mode 100644 dev-python/pypugjs/pypugjs-5.10.1-r1.ebuild delete mode 100644 dev-python/pypugjs/pypugjs-5.10.1.ebuild (limited to 'dev-python/pypugjs') diff --git a/dev-python/pypugjs/pypugjs-5.10.1-r1.ebuild b/dev-python/pypugjs/pypugjs-5.10.1-r1.ebuild new file mode 100644 index 000000000000..8d98fdb25de6 --- /dev/null +++ b/dev-python/pypugjs/pypugjs-5.10.1-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=poetry +PYTHON_COMPAT=( python3_{10..12} ) + +inherit distutils-r1 optfeature + +DESCRIPTION="Pug (Jade) syntax adapter for Django, Jinja2 and Mako templates" +HOMEPAGE=" + https://github.com/kakulukia/pypugjs/ + https://pypi.org/project/pypugjs/ +" +SRC_URI=" + https://github.com/kakulukia/pypugjs/archive/v${PV}.tar.gz + -> ${P}.gh.tar.gz +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64 ~riscv" + +RDEPEND=" + >=dev-python/six-1.15.0[${PYTHON_USEDEP}] + >=dev-python/chardet-4.0.0[${PYTHON_USEDEP}] +" +BDEPEND=" + test? ( + dev-python/django[${PYTHON_USEDEP}] + >=dev-python/jinja-3.1.1[${PYTHON_USEDEP}] + >=dev-python/mako-1.1.3[${PYTHON_USEDEP}] + dev-python/pytest-asyncio[${PYTHON_USEDEP}] + >=dev-python/tornado-6.0.4[${PYTHON_USEDEP}] + ) +" + +distutils_enable_tests pytest + +src_prepare() { + # poetry nonsense + sed -i -e 's:\^:>=:' pyproject.toml || die + # upstream hardcodes wrong version, and puts test dependencies + # in regular depenendencies, so discard the whole thing + sed -e "/version/s:5\.9\.12:${PV}:" \ + -e 's:tool\.poetry\.dependencies:tool.poetry.group.ignored.dependencies:' \ + -i pyproject.toml || die + + distutils-r1_src_prepare +} + +pkg_postinst() { + optfeature "converting to Django output" dev-python/django + optfeature "converting to Jinja2 output" dev-python/jinja + optfeature "converting to Mako output" dev-python/mako + optfeature "converting to Tornado output" dev-python/tornado +} diff --git a/dev-python/pypugjs/pypugjs-5.10.1.ebuild b/dev-python/pypugjs/pypugjs-5.10.1.ebuild deleted file mode 100644 index db189115ef63..000000000000 --- a/dev-python/pypugjs/pypugjs-5.10.1.ebuild +++ /dev/null @@ -1,49 +0,0 @@ -# Copyright 1999-2024 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -DISTUTILS_USE_PEP517=poetry -PYTHON_COMPAT=( python3_{10..12} ) - -inherit distutils-r1 optfeature - -DESCRIPTION="Pug (Jade) syntax adapter for Django, Jinja2 and Mako templates" -HOMEPAGE="https://github.com/kakulukia/pypugjs" -SRC_URI=" - https://github.com/kakulukia/pypugjs/archive/v${PV}.tar.gz - -> ${P}.gh.tar.gz -" - -LICENSE="MIT" -SLOT="0" -KEYWORDS="~amd64 ~arm64 ~riscv" - -RDEPEND=" - >=dev-python/six-1.15.0[${PYTHON_USEDEP}] - >=dev-python/chardet-4.0.0[${PYTHON_USEDEP}] -" -BDEPEND=" - test? ( - dev-python/django[${PYTHON_USEDEP}] - >=dev-python/jinja-3.1.1[${PYTHON_USEDEP}] - >=dev-python/mako-1.1.3[${PYTHON_USEDEP}] - dev-python/pytest-asyncio[${PYTHON_USEDEP}] - >=dev-python/tornado-6.0.4[${PYTHON_USEDEP}] - ) -" - -distutils_enable_tests pytest - -src_prepare() { - # poetry nonsense - sed -i -e 's:\^:>=:' pyproject.toml || die - distutils-r1_src_prepare -} - -pkg_postinst() { - optfeature "converting to Django output" dev-python/django - optfeature "converting to Jinja2 output" dev-python/jinja - optfeature "converting to Mako output" dev-python/mako - optfeature "converting to Tornado output" dev-python/tornado -} -- cgit v1.2.3-65-gdbad