2001-08-09 18:47:22 +00:00
|
|
|
#! /usr/bin/env python
|
|
|
|
|
|
|
|
import os, sys
|
|
|
|
from distutils.core import setup, Extension
|
2002-07-01 09:11:01 +00:00
|
|
|
from distutils.command.build_ext import build_ext
|
2001-08-09 18:47:22 +00:00
|
|
|
|
2002-07-11 18:19:46 +00:00
|
|
|
try:
|
|
|
|
# load py2exe distutils extension, if available
|
|
|
|
import py2exe
|
2002-07-13 08:15:21 +00:00
|
|
|
except ImportError:
|
2002-07-11 18:19:46 +00:00
|
|
|
pass
|
2001-08-09 18:47:22 +00:00
|
|
|
|
2001-08-09 23:03:47 +00:00
|
|
|
try:
|
|
|
|
import Numeric
|
|
|
|
except ImportError:
|
|
|
|
print "*** Warning: FontTools needs Numerical Python (NumPy), see:"
|
|
|
|
print " http://sourceforge.net/projects/numpy/"
|
|
|
|
|
|
|
|
try:
|
2002-05-03 08:59:22 +00:00
|
|
|
import xml.parsers.expat
|
2001-08-09 23:03:47 +00:00
|
|
|
except ImportError:
|
|
|
|
print "*** Warning: FontTools needs PyXML, see:"
|
|
|
|
print " http://sourceforge.net/projects/pyxml/"
|
|
|
|
|
|
|
|
|
2002-07-01 09:11:01 +00:00
|
|
|
class build_ext_optional(build_ext):
|
|
|
|
"""build_ext command which doesn't abort when it fails."""
|
|
|
|
def build_extension(self, ext):
|
|
|
|
# Skip extensions which cannot be built
|
|
|
|
try:
|
|
|
|
build_ext.build_extension(self, ext)
|
|
|
|
except:
|
|
|
|
self.announce(
|
|
|
|
'*** WARNING: Building of extension "%s" '
|
|
|
|
'failed: %s' %
|
|
|
|
(ext.name, sys.exc_info()[1]))
|
|
|
|
|
|
|
|
|
2002-05-03 18:57:02 +00:00
|
|
|
setup(
|
|
|
|
name = "FontTools",
|
2001-08-09 18:47:22 +00:00
|
|
|
version = "1.0",
|
2002-05-03 18:57:02 +00:00
|
|
|
description = "Python FontTools",
|
2001-08-09 18:47:22 +00:00
|
|
|
author = "Just van Rossum",
|
|
|
|
author_email = "just@letterror.com",
|
2002-05-03 18:57:02 +00:00
|
|
|
maintainer = "Just van Rossum",
|
|
|
|
maintainer_email = "just@letterror.com",
|
2001-08-09 18:47:22 +00:00
|
|
|
url = "http://fonttools.sourceforge.net/",
|
|
|
|
|
|
|
|
packages = [
|
|
|
|
"",
|
|
|
|
"fontTools",
|
|
|
|
"fontTools.encodings",
|
|
|
|
"fontTools.misc",
|
|
|
|
"fontTools.ttLib",
|
|
|
|
"fontTools.ttLib.tables",
|
|
|
|
"fontTools.ttLib.test",
|
|
|
|
],
|
|
|
|
package_dir = {'': 'Lib'},
|
|
|
|
extra_path = 'FontTools',
|
|
|
|
ext_modules = [
|
|
|
|
Extension(
|
2001-08-09 19:18:30 +00:00
|
|
|
"fontTools.misc.eexecOp",
|
2001-08-09 18:47:22 +00:00
|
|
|
["Src/eexecOp/eexecOpmodule.c"],
|
|
|
|
include_dirs=[],
|
|
|
|
define_macros=[],
|
|
|
|
library_dirs=[],
|
|
|
|
libraries=[],
|
|
|
|
)
|
2002-05-03 18:57:02 +00:00
|
|
|
],
|
2002-09-10 09:22:28 +00:00
|
|
|
scripts = ["Tools/ttx"],
|
2002-07-01 09:11:01 +00:00
|
|
|
cmdclass = {"build_ext": build_ext_optional}
|
2001-08-09 18:47:22 +00:00
|
|
|
)
|
|
|
|
|