2001-08-09 18:47:22 +00:00
|
|
|
#! /usr/bin/env python
|
|
|
|
|
2013-11-29 14:11:19 +01:00
|
|
|
from __future__ import print_function
|
2001-08-09 18:47:22 +00:00
|
|
|
import os, sys
|
|
|
|
|
2015-05-20 11:02:43 +01:00
|
|
|
# if setuptools is not installed, fall back to distutils
|
2002-07-11 18:19:46 +00:00
|
|
|
try:
|
2015-05-20 11:02:43 +01:00
|
|
|
from setuptools import setup
|
2002-07-13 08:15:21 +00:00
|
|
|
except ImportError:
|
2015-05-20 11:02:43 +01:00
|
|
|
from distutils.core import setup
|
|
|
|
distutils_scripts = [
|
|
|
|
"Tools/ttx", "Tools/pyftsubset", "Tools/pyftinspect", "Tools/pyftmerge"]
|
|
|
|
else:
|
|
|
|
distutils_scripts = []
|
2001-08-09 18:47:22 +00:00
|
|
|
|
2001-08-09 23:03:47 +00:00
|
|
|
try:
|
2002-05-03 08:59:22 +00:00
|
|
|
import xml.parsers.expat
|
2001-08-09 23:03:47 +00:00
|
|
|
except ImportError:
|
2013-11-29 14:11:19 +01:00
|
|
|
print("*** Warning: FontTools needs PyXML, see:")
|
|
|
|
print(" http://sourceforge.net/projects/pyxml/")
|
2001-08-09 23:03:47 +00:00
|
|
|
|
|
|
|
|
2003-01-03 21:01:07 +00:00
|
|
|
if sys.version_info > (2, 3, 0, 'alpha', 1):
|
|
|
|
# Trove classifiers for PyPI
|
|
|
|
classifiers = {"classifiers": [
|
|
|
|
"Development Status :: 4 - Beta",
|
|
|
|
"Environment :: Console",
|
|
|
|
"Environment :: Other Environment",
|
|
|
|
"Intended Audience :: Developers",
|
|
|
|
"Intended Audience :: End Users/Desktop",
|
|
|
|
"License :: OSI Approved :: BSD License",
|
|
|
|
"Natural Language :: English",
|
|
|
|
"Operating System :: OS Independent",
|
|
|
|
"Programming Language :: Python",
|
|
|
|
"Topic :: Multimedia :: Graphics",
|
|
|
|
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
|
|
|
|
]}
|
|
|
|
else:
|
|
|
|
classifiers = {}
|
|
|
|
|
|
|
|
long_description = """\
|
|
|
|
FontTools/TTX is a library to manipulate font files from Python.
|
|
|
|
It supports reading and writing of TrueType/OpenType fonts, reading
|
|
|
|
and writing of AFM files, reading (and partially writing) of PS Type 1
|
|
|
|
fonts. The package also contains a tool called "TTX" which converts
|
|
|
|
TrueType/OpenType fonts to and from an XML-based format.
|
|
|
|
"""
|
|
|
|
|
2002-05-03 18:57:02 +00:00
|
|
|
setup(
|
2008-01-28 04:00:14 +00:00
|
|
|
name = "fonttools",
|
2014-08-13 13:10:31 -04:00
|
|
|
version = "2.5",
|
2003-01-03 21:01:07 +00:00
|
|
|
description = "Tools to manipulate font files",
|
2001-08-09 18:47:22 +00:00
|
|
|
author = "Just van Rossum",
|
|
|
|
author_email = "just@letterror.com",
|
2014-08-13 13:10:31 -04:00
|
|
|
maintainer = "Behdad Esfahbod",
|
|
|
|
maintainer_email = "behdad@behdad.org",
|
|
|
|
url = "http://github.com/behdad/fonttools",
|
2003-01-03 21:01:07 +00:00
|
|
|
license = "OpenSource, BSD-style",
|
|
|
|
platforms = ["Any"],
|
|
|
|
long_description = long_description,
|
2001-08-09 18:47:22 +00:00
|
|
|
|
|
|
|
packages = [
|
|
|
|
"fontTools",
|
|
|
|
"fontTools.encodings",
|
|
|
|
"fontTools.misc",
|
2003-08-28 17:59:52 +00:00
|
|
|
"fontTools.pens",
|
2001-08-09 18:47:22 +00:00
|
|
|
"fontTools.ttLib",
|
|
|
|
"fontTools.ttLib.tables",
|
|
|
|
],
|
2015-05-20 12:40:19 +01:00
|
|
|
py_modules = ['sstruct', 'xmlWriter'],
|
2001-08-09 18:47:22 +00:00
|
|
|
package_dir = {'': 'Lib'},
|
|
|
|
extra_path = 'FontTools',
|
2009-11-08 15:54:25 +00:00
|
|
|
data_files = [('share/man/man1', ["Doc/ttx.1"])],
|
2015-05-20 11:02:43 +01:00
|
|
|
scripts = distutils_scripts,
|
|
|
|
entry_points = {
|
|
|
|
'console_scripts': [
|
|
|
|
"ttx = fontTools.ttx:main",
|
|
|
|
"pyftsubset = fontTools.subset:main",
|
|
|
|
"pyftmerge = fontTools.merge:main",
|
|
|
|
"pyftinspect = fontTools.inspect:main"
|
|
|
|
]
|
|
|
|
},
|
2003-01-03 21:01:07 +00:00
|
|
|
**classifiers
|
2001-08-09 18:47:22 +00:00
|
|
|
)
|