[python-fabulous] Initial import (#810335)
Ralph Bean
ralph at fedoraproject.org
Wed Apr 25 20:12:04 UTC 2012
commit 5c38c5f3e689ff0a474a8a531073922f6844bc17
Author: Ralph Bean <rbean at redhat.com>
Date: Wed Apr 25 16:11:49 2012 -0400
Initial import (#810335)
.gitignore | 1 +
0001-Unbundle-fonts.patch | 45 ++++++++++++++++++++++++++++
python-fabulous.spec | 72 +++++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 119 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..d862522 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/fabulous-0.1.5.tar.gz
diff --git a/0001-Unbundle-fonts.patch b/0001-Unbundle-fonts.patch
new file mode 100644
index 0000000..4a08d57
--- /dev/null
+++ b/0001-Unbundle-fonts.patch
@@ -0,0 +1,45 @@
+From 1294ed846c0f4fa7bb4475cc29ec566ab222a2a7 Mon Sep 17 00:00:00 2001
+From: Ralph Bean <rbean at redhat.com>
+Date: Sun, 22 Apr 2012 21:15:10 -0400
+Subject: [PATCH] Unbundle fonts.
+
+---
+ fabulous/text.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/fabulous/text.py b/fabulous/text.py
+index 4a063aa..35decfc 100644
+--- a/fabulous/text.py
++++ b/fabulous/text.py
+@@ -97,7 +97,7 @@ class Text(image.Image):
+ """
+
+ def __init__(self, text, fsize=20, color="#0099ff", shadow=False,
+- skew=None, font='IndUni-H-Bold'):
++ skew=None, font='LiberationSans-Regular'):
+ utils.pil_check()
+ from PIL import Image, ImageFont, ImageDraw
+ self.text = text
+@@ -189,8 +189,8 @@ def get_font_files():
+ dirs = [os.path.join(os.path.dirname(__file__), 'fonts'),
+ os.path.expanduser('~/.fonts')]
+ try:
+- # this is where ubuntu puts fonts
+- dirname = '/usr/share/fonts/truetype'
++ # this is where fedora puts fonts, lol
++ dirname = '/usr/share/fonts'
+ dirs += [os.path.join(dirname, subdir)
+ for subdir in os.listdir(dirname)]
+ except OSError:
+@@ -218,7 +218,7 @@ def main(args):
+ "this value to the proper background so semi-transparent "
+ "pixels will blend properly."))
+ parser.add_option(
+- "-F", "--font", dest="font", default='IndUni-H-Bold',
++ "-F", "--font", dest="font", default='LiberationSans-Regular',
+ help=("Path to font file you wish to use. This defaults to a "
+ "free Helvetica-Bold clone which is included with Fabulous. "
+ "Default value: %default"))
+--
+1.7.10
+
diff --git a/python-fabulous.spec b/python-fabulous.spec
new file mode 100644
index 0000000..6cf5f21
--- /dev/null
+++ b/python-fabulous.spec
@@ -0,0 +1,72 @@
+%global modname fabulous
+
+Name: python-fabulous
+Version: 0.1.5
+Release: 4%{?dist}
+Summary: Makes your terminal output totally fabulous
+
+Group: Development/Languages
+License: MIT
+URL: http://pypi.python.org/pypi/%{modname}
+Source0: http://lobstertech.com/media/file/%{modname}/%{modname}-%{version}.tar.gz
+Patch0: 0001-Unbundle-fonts.patch
+
+BuildArch: noarch
+
+BuildRequires: dos2unix
+BuildRequires: gcc
+BuildRequires: make
+BuildRequires: python2-devel
+BuildRequires: python-setuptools
+BuildRequires: python-sphinx
+
+Requires: python-imaging
+Requires: python-grapefruit
+
+%description
+fabulous is a python module for producing fabulously colored terminal output.
+
+Run the demo to see what's available::
+
+ $ python -m fabulous.demo
+
+%prep
+%setup -q -n %{modname}-%{version}
+%patch0 -p1
+%{__rm} -f fabulous/fonts/*
+%{__rm} fabulous/_xterm256.c
+dos2unix README
+
+%build
+%{__python} setup.py build
+
+PYTHONPATH=$(pwd) make -C docs html
+%{__rm} -f docs/_build/html/.buildinfo
+
+
+%install
+%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root,-)
+%doc README COPYING docs/_build/html
+
+%{python_sitelib}/*
+
+%changelog
+* Sun Apr 22 2012 Ralph Bean <rbean at redhat.com> - 0.1.5-4
+- Built and included sphinx docs
+
+* Sun Apr 22 2012 Ralph Bean <rbean at redhat.com> - 0.1.5-3
+- Fresh .tar.gz from upstream.
+- Run dos2unix on README.
+- Remove _xterm256.c
+
+* Sun Apr 22 2012 Ralph Bean <rbean at redhat.com> - 0.1.5-2
+- Included README and COPYING in the doc macro
+- Began using modname and version for upstream Source0 URL
+- Patched out the bundled fonts.
+
+* Thu Apr 05 2012 Ralph Bean <rbean at redhat.com> - 0.1.5-1
+- initial package for Fedora
diff --git a/sources b/sources
index e69de29..56bd2ca 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+588088119a65f87517e6cb637c4974fa fabulous-0.1.5.tar.gz
More information about the scm-commits
mailing list