Initial import
This commit is contained in:
parent
2139f1994c
commit
78e6e32879
5 changed files with 258 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/pyfiglet-1.0.2-no-contrib-font.tar.gz
|
||||
|
|
@ -0,0 +1,79 @@
|
|||
From 93992dd2eb987cc70b715fbe27b8395f7f21fe29 Mon Sep 17 00:00:00 2001
|
||||
From: Lyes Saadi <dev@lyes.eu>
|
||||
Date: Wed, 27 Dec 2023 20:18:32 +0100
|
||||
Subject: [PATCH 1/1] Use slant instead of doh to use only fonts-contrib
|
||||
|
||||
---
|
||||
pyfiglet/tests/test_cli.py | 46 ++++++++++----------------------------
|
||||
1 file changed, 12 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/pyfiglet/tests/test_cli.py b/pyfiglet/tests/test_cli.py
|
||||
index fb88bbd..b79e8d0 100644
|
||||
--- 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)
|
||||
--
|
||||
2.43.0
|
||||
|
||||
18
generate-pyfiglet-tarball.sh
Executable file
18
generate-pyfiglet-tarball.sh
Executable file
|
|
@ -0,0 +1,18 @@
|
|||
#!/bin/sh
|
||||
|
||||
REL=$1
|
||||
#SHORTCOMMIT=${COMMIT:0:7}
|
||||
|
||||
wget https://github.com/pwaller/pyfiglet/archive/v$REL/pyfiglet-$REL.tar.gz
|
||||
|
||||
tar -xzvf pyfiglet-$REL.tar.gz
|
||||
|
||||
mv pyfiglet-$REL pyfiglet-$REL
|
||||
|
||||
rm -rf pyfiglet-$REL/pyfiglet/fonts-contrib
|
||||
|
||||
tar -czvf pyfiglet-$REL-no-contrib-font.tar.gz pyfiglet-$REL
|
||||
|
||||
# Cleaning
|
||||
rm -rf pyfiglet-$REL/
|
||||
rm -f pyfiglet-$REL.tar.gz
|
||||
159
python-pyfiglet.spec
Normal file
159
python-pyfiglet.spec
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
%global pypi_name pyfiglet
|
||||
|
||||
Name: python-%{pypi_name}
|
||||
Version: 1.0.2
|
||||
Release: %autorelease
|
||||
Summary: Pure-python FIGlet implementation
|
||||
|
||||
# The following fonts are under another licence, the rest of the code is MIT.
|
||||
#
|
||||
# BSD:
|
||||
# - banner.flf
|
||||
# - big.flf
|
||||
# - block.flf
|
||||
# - bubble.flf
|
||||
# - digital.flf
|
||||
# - ivrit.flf
|
||||
# - lean.flf
|
||||
# - mini.flf
|
||||
# - mnemonic.flf
|
||||
# - script.flf
|
||||
# - shadow.flf
|
||||
# - slant.flf
|
||||
# - small.flf
|
||||
# - smscript.flf
|
||||
# - smshadow.flf
|
||||
# - smslant.flf
|
||||
# - standard.flf
|
||||
# - term.flf
|
||||
#
|
||||
# NTP:
|
||||
# - clb6x10.flf
|
||||
# - clb8x10.flf
|
||||
# - clb8x8.flf
|
||||
# - cli8x8.flf
|
||||
# - clr4x6.flf
|
||||
# - clr5x10.flf
|
||||
# - clr5x6.flf
|
||||
# - clr5x8.flf
|
||||
# - clr6x10.flf
|
||||
# - clr6x6.flf
|
||||
# - clr6x8.flf
|
||||
# - clr7x10.flf
|
||||
# - clr7x8.flf
|
||||
# - clr8x10.flf
|
||||
# - clr8x8.flf
|
||||
# - cour.flf
|
||||
# - courb.flf
|
||||
# - courbi.flf
|
||||
# - couri.flf
|
||||
# - helv.flf
|
||||
# - helvb.flf
|
||||
# - helvbi.flf
|
||||
# - helvi.flf
|
||||
# - sbook.flf
|
||||
# - sbookb.flf
|
||||
# - sbookbi.flf
|
||||
# - sbooki.flf
|
||||
# - times.flf
|
||||
# - xcour.flf
|
||||
# - xcourb.flf
|
||||
# - xcourbi.flf
|
||||
# - xcouri.flf
|
||||
# - xhelv.flf
|
||||
# - xhelvb.flf
|
||||
# - xhelvbi.flf
|
||||
# - xhelvi.flf
|
||||
# - xsbook.flf
|
||||
# - xsbookb.flf
|
||||
# - xsbookbi.flf
|
||||
# - xsbooki.flf
|
||||
# - xtimes.flf
|
||||
#
|
||||
# HPND:
|
||||
# - 5x8.flf
|
||||
# - chartr.flf
|
||||
# - chartri.flf
|
||||
# - xchartr.flf
|
||||
# - xchartri.flf
|
||||
#
|
||||
# X11:
|
||||
# - 5x7.flf
|
||||
# - 6x9.flf
|
||||
License: MIT AND BSD-3-Clause AND NTP AND HPND AND X11
|
||||
URL: https://github.com/pwaller/pyfiglet
|
||||
Source0: pyfiglet-%{version}-no-contrib-font.tar.gz
|
||||
# Removes all fonts in pyfiglet/fonts-contrib
|
||||
# USAGE:
|
||||
# ./generate-pyfiglet-tarball.sh VERSION
|
||||
Source1: generate-pyfiglet-tarball.sh
|
||||
|
||||
# https://github.com/pwaller/pyfiglet/pull/137
|
||||
Patch0: 0001-Use-slant-instead-of-doh-to-use-only-fonts-contrib.patch
|
||||
|
||||
BuildArch: noarch
|
||||
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
||||
ExcludeArch: %{ix86}
|
||||
|
||||
BuildRequires: git-core
|
||||
BuildRequires: glibc-common
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3dist(pytest)
|
||||
|
||||
|
||||
%global _description %{expand:
|
||||
pyfiglet is a full port of FIGlet (http://www.figlet.org/) into pure python. It
|
||||
takes ASCII text and renders it in ASCII art fonts (like the title above, which
|
||||
is the 'block' font).}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
|
||||
%package -n python3-%{pypi_name}
|
||||
Summary: %{summary}
|
||||
|
||||
%description -n python3-%{pypi_name} %{_description}
|
||||
|
||||
|
||||
%prep
|
||||
%autosetup -n %{pypi_name}-%{version} -S git
|
||||
|
||||
mv pyfiglet/fonts-standard pyfiglet/fonts
|
||||
|
||||
# Resolve RPMLint errors
|
||||
%py3_shebang_fix pyfiglet/{__init__,test}.py
|
||||
|
||||
# Change figfont.txt encoding
|
||||
iconv -f ISO8859-1 -t UTF-8 doc/figfont.txt -o figfont.txt
|
||||
|
||||
%generate_buildrequires
|
||||
%pyproject_buildrequires
|
||||
|
||||
|
||||
%build
|
||||
%pyproject_wheel
|
||||
|
||||
|
||||
%install
|
||||
%pyproject_install
|
||||
|
||||
%pyproject_save_files %{pypi_name}
|
||||
|
||||
chmod 0755 %{buildroot}%{python3_sitelib}/%{pypi_name}/{__init__,test}.py
|
||||
install -Dpm 0644 -t %{buildroot}%{_mandir}/man1/ doc/%{pypi_name}.1
|
||||
|
||||
|
||||
%check
|
||||
%pytest
|
||||
|
||||
rm %{buildroot}%{python3_sitelib}/%{pypi_name}/fonts/TEST_ONLY.flf
|
||||
|
||||
|
||||
%files -n python3-%{pypi_name} -f %{pyproject_files}
|
||||
%doc README.md figfont.txt
|
||||
%{_bindir}/%{pypi_name}
|
||||
%{_mandir}/man1/%{pypi_name}.1.*
|
||||
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
1
sources
Normal file
1
sources
Normal file
|
|
@ -0,0 +1 @@
|
|||
SHA512 (pyfiglet-1.0.2-no-contrib-font.tar.gz) = 19b304d87c12f664b645653c3f5b0425fd3452af166cc50c936adb0eb28df99c229656752dc3e7ee73090c9de0ecb3f72d4fd972a7a1ed34354b5de67b34d6af
|
||||
Loading…
Add table
Add a link
Reference in a new issue