mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-04-07 03:10:15 -04:00
dev-python/pyfiglet: add 1.0.2
Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
This commit is contained in:
@@ -1 +1,2 @@
|
||||
DIST pyfiglet-0.8.post1.tar.gz 634618 BLAKE2B 49268581974e72f28ddb11785a1629a4ac2696bcdd57710147cafdcf7709be8c67bdf03e5ccdb1655a9be6eb8a83baf4ca5ae0a6412e2318d0923376558b8d49 SHA512 3b8c7b4c9ae48466da3ccc6711aac9c35b08a373abbdda66c60a62f17ba6edd316b0d5e3085613f7c44fbaa2f02acc4a5b3830a31d22437d9261863878421400
|
||||
DIST pyfiglet-1.0.2.gh.tar.gz 1660490 BLAKE2B 72fc4ddff5901fbb5eb70d677bfdbbf8f16e042305c9e91a350268a450f71bed2af0192c88211c86f80ba0d2815eae7ff5dd89585144207ef7c89f2f9540c2bd SHA512 fdfe2e52bcf49635cf41067c1438eaccae685216ae32e9b443730222077aff8f5834014766df80ba8435d5fca5df0e0338573f2a423aa21202966562fc2d4f28
|
||||
|
||||
70
dev-python/pyfiglet/files/pyfiglet-1.0.2-fix-test.patch
Normal file
70
dev-python/pyfiglet/files/pyfiglet-1.0.2-fix-test.patch
Normal file
@@ -0,0 +1,70 @@
|
||||
https://github.com/pwaller/pyfiglet/commit/b5bb37142ce49ac5376b7f89a0b5508962c6672e
|
||||
From: Lyes Saadi <dev@lyes.eu>
|
||||
Date: Wed, 27 Dec 2023 20:18:32 +0100
|
||||
Subject: [PATCH] Use slant instead of doh to use only fonts-contrib
|
||||
|
||||
--- a/pyfiglet/tests/test_cli.py
|
||||
+++ b/pyfiglet/tests/test_cli.py
|
||||
@@ -11,24 +11,13 @@ def test_font_dir():
|
||||
|
||||
|
||||
def test_strip():
|
||||
- command = "pyfiglet -f doh -s 0"
|
||||
+ command = "pyfiglet -f slant -s 0"
|
||||
expected = '''\
|
||||
- 000000000
|
||||
- 00:::::::::00
|
||||
- 00:::::::::::::00
|
||||
-0:::::::000:::::::0
|
||||
-0::::::0 0::::::0
|
||||
-0:::::0 0:::::0
|
||||
-0:::::0 0:::::0
|
||||
-0:::::0 000 0:::::0
|
||||
-0:::::0 000 0:::::0
|
||||
-0:::::0 0:::::0
|
||||
-0:::::0 0:::::0
|
||||
-0::::::0 0::::::0
|
||||
-0:::::::000:::::::0
|
||||
- 00:::::::::::::00
|
||||
- 00:::::::::00
|
||||
- 000000000
|
||||
+ ____
|
||||
+ / __ \\
|
||||
+ / / / /
|
||||
+/ /_/ /
|
||||
+\\____/
|
||||
'''
|
||||
result = subprocess.run(command, shell=True, stdout=subprocess.PIPE)
|
||||
assert result.stdout.decode() == expected
|
||||
@@ -58,25 +47,14 @@ def test_strip_strange_font(test_font_dir):
|
||||
|
||||
# normalize is just strip with padding
|
||||
def test_normalize():
|
||||
- command = "pyfiglet -f doh -n 0"
|
||||
+ command = "pyfiglet -f slant -n 0"
|
||||
expected = '''\
|
||||
|
||||
- 000000000
|
||||
- 00:::::::::00
|
||||
- 00:::::::::::::00
|
||||
-0:::::::000:::::::0
|
||||
-0::::::0 0::::::0
|
||||
-0:::::0 0:::::0
|
||||
-0:::::0 0:::::0
|
||||
-0:::::0 000 0:::::0
|
||||
-0:::::0 000 0:::::0
|
||||
-0:::::0 0:::::0
|
||||
-0:::::0 0:::::0
|
||||
-0::::::0 0::::::0
|
||||
-0:::::::000:::::::0
|
||||
- 00:::::::::::::00
|
||||
- 00:::::::::00
|
||||
- 000000000
|
||||
+ ____
|
||||
+ / __ \\
|
||||
+ / / / /
|
||||
+/ /_/ /
|
||||
+\\____/
|
||||
|
||||
'''
|
||||
result = subprocess.run(command, shell=True, stdout=subprocess.PIPE)
|
||||
@@ -7,4 +7,7 @@
|
||||
<remote-id type="pypi">pyfiglet</remote-id>
|
||||
<bugs-to>https://github.com/pwaller/pyfiglet/issues</bugs-to>
|
||||
</upstream>
|
||||
<use>
|
||||
<flag name="contrib">Install fonts that don't have a clear license</flag>
|
||||
</use>
|
||||
</pkgmetadata>
|
||||
|
||||
37
dev-python/pyfiglet/pyfiglet-1.0.2.ebuild
Normal file
37
dev-python/pyfiglet/pyfiglet-1.0.2.ebuild
Normal file
@@ -0,0 +1,37 @@
|
||||
# Copyright 1999-2025 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
|
||||
PYTHON_COMPAT=( python3_{11..13} )
|
||||
DISTUTILS_USE_PEP517=setuptools
|
||||
inherit distutils-r1
|
||||
|
||||
DESCRIPTION="Pure-python FIGlet implementation"
|
||||
HOMEPAGE="
|
||||
https://pypi.org/project/pyfiglet/
|
||||
https://github.com/pwaller/pyfiglet
|
||||
"
|
||||
# no tests in pypi sdist
|
||||
SRC_URI="https://github.com/pwaller/pyfiglet/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
|
||||
|
||||
LICENSE="MIT"
|
||||
# bundled fonts: https://src.fedoraproject.org/rpms/python-pyfiglet/blob/rawhide/f/python-pyfiglet.spec
|
||||
LICENSE+=" BSD HPND MIT NTP contrib? ( all-rights-reserved )"
|
||||
SLOT="0"
|
||||
KEYWORDS="~amd64"
|
||||
IUSE="contrib"
|
||||
|
||||
PATCHES=(
|
||||
"${FILESDIR}/${P}-fix-test.patch"
|
||||
)
|
||||
|
||||
distutils_enable_tests pytest
|
||||
|
||||
src_prepare() {
|
||||
mv pyfiglet/fonts-standard pyfiglet/fonts || die
|
||||
if use contrib; then
|
||||
mv pyfiglet/fonts-contrib/* pyfiglet/fonts || die
|
||||
fi
|
||||
distutils-r1_src_prepare
|
||||
}
|
||||
Reference in New Issue
Block a user