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
|
2016-08-20 11:35:49 +01:00
|
|
|
import sys
|
2016-08-06 15:39:57 +01:00
|
|
|
from setuptools import setup, find_packages
|
2001-08-09 23:03:47 +00:00
|
|
|
|
2015-06-14 00:22:43 +01:00
|
|
|
# Force distutils to use py_compile.compile() function with 'doraise' argument
|
|
|
|
# set to True, in order to raise an exception on compilation errors
|
|
|
|
import py_compile
|
|
|
|
orig_py_compile = py_compile.compile
|
|
|
|
|
|
|
|
def doraise_py_compile(file, cfile=None, dfile=None, doraise=False):
|
2016-08-06 13:37:02 +01:00
|
|
|
orig_py_compile(file, cfile=cfile, dfile=dfile, doraise=True)
|
2015-06-14 00:22:43 +01:00
|
|
|
|
|
|
|
py_compile.compile = doraise_py_compile
|
|
|
|
|
2016-09-27 13:20:48 +01:00
|
|
|
needs_pytest = {'pytest', 'test'}.intersection(sys.argv)
|
|
|
|
pytest_runner = ['pytest_runner'] if needs_pytest else []
|
|
|
|
needs_wheel = {'bdist_wheel'}.intersection(sys.argv)
|
|
|
|
wheel = ['wheel'] if needs_wheel else []
|
2015-06-14 00:22:43 +01:00
|
|
|
|
2015-08-31 18:55:34 +01:00
|
|
|
# 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",
|
|
|
|
]}
|
2003-01-03 21:01:07 +00:00
|
|
|
|
|
|
|
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(
|
2016-08-06 13:37:02 +01:00
|
|
|
name="fonttools",
|
2016-08-06 13:47:37 +01:00
|
|
|
use_scm_version=True,
|
2016-08-06 13:37:02 +01:00
|
|
|
description="Tools to manipulate font files",
|
|
|
|
author="Just van Rossum",
|
|
|
|
author_email="just@letterror.com",
|
|
|
|
maintainer="Behdad Esfahbod",
|
|
|
|
maintainer_email="behdad@behdad.org",
|
|
|
|
url="http://github.com/behdad/fonttools",
|
|
|
|
license="OpenSource, BSD-style",
|
|
|
|
platforms=["Any"],
|
|
|
|
long_description=long_description,
|
|
|
|
package_dir={'': 'Lib'},
|
2016-08-06 15:39:57 +01:00
|
|
|
packages=find_packages("Lib"),
|
|
|
|
py_modules=['sstruct', 'xmlWriter'],
|
2016-08-06 13:37:02 +01:00
|
|
|
extra_path='FontTools',
|
2016-08-19 14:21:33 +01:00
|
|
|
include_package_data=True,
|
2016-08-20 11:35:49 +01:00
|
|
|
data_files=[
|
|
|
|
('share/man/man1', ["Doc/ttx.1"])
|
|
|
|
] if sys.platform.startswith('linux') else [],
|
2016-08-06 13:47:37 +01:00
|
|
|
setup_requires=[
|
2016-09-27 13:20:48 +01:00
|
|
|
"setuptools_scm>=1.11.1",
|
|
|
|
] + pytest_runner + wheel,
|
|
|
|
tests_require=[
|
|
|
|
'pytest>=2.8',
|
2016-08-06 13:47:37 +01:00
|
|
|
],
|
2016-08-06 13:37:02 +01:00
|
|
|
entry_points={
|
|
|
|
'console_scripts': [
|
|
|
|
"ttx = fontTools.ttx:main",
|
|
|
|
"pyftsubset = fontTools.subset:main",
|
|
|
|
"pyftmerge = fontTools.merge:main",
|
|
|
|
"pyftinspect = fontTools.inspect:main"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
**classifiers
|
|
|
|
)
|