setup.py :  » GUI » TTX-FontTools » fonttools-2.3 » Python Open Source

Home
Python Open Source
1.3.1.2 Python
2.Ajax
3.Aspect Oriented
4.Blog
5.Build
6.Business Application
7.Chart Report
8.Content Management Systems
9.Cryptographic
10.Database
11.Development
12.Editor
13.Email
14.ERP
15.Game 2D 3D
16.GIS
17.GUI
18.IDE
19.Installer
20.IRC
21.Issue Tracker
22.Language Interface
23.Log
24.Math
25.Media Sound Audio
26.Mobile
27.Network
28.Parser
29.PDF
30.Project Management
31.RSS
32.Search
33.Security
34.Template Engines
35.Test
36.UML
37.USB Serial
38.Web Frameworks
39.Web Server
40.Web Services
41.Web Unit
42.Wiki
43.Windows
44.XML
Python Open Source » GUI » TTX FontTools 
TTX FontTools » fonttools 2.3 » setup.py
#! /usr/bin/env python

import os, sys
from distutils.core import setup,Extension
from distutils.command.build_ext import build_ext

try:
  # load py2exe distutils extension, if available
  import py2exe
except ImportError:
  pass

try:
  import numpy
except ImportError:
  print "*** Warning: FontTools needs the numpy library, see:"
  print "        http://numpy.scipy.org/"

try:
  import xml.parsers.expat
except ImportError:
  print "*** Warning: FontTools needs PyXML, see:"
  print "        http://sourceforge.net/projects/pyxml/"


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]))


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.
"""

setup(
    name = "fonttools",
    version = "2.3",
    description = "Tools to manipulate font files",
    author = "Just van Rossum",
    author_email = "just@letterror.com",
    maintainer = "Just van Rossum",
    maintainer_email = "just@letterror.com",
    url = "http://fonttools.sourceforge.net/",
    license = "OpenSource, BSD-style",
    platforms = ["Any"],
    long_description = long_description,
    
    packages = [
      "",
      "fontTools",
      "fontTools.encodings",
      "fontTools.misc",
      "fontTools.pens",
      "fontTools.ttLib",
      "fontTools.ttLib.tables",
      "fontTools.ttLib.test",
    ],
    package_dir = {'': 'Lib'},
    extra_path = 'FontTools',
    ext_modules = [
      Extension(
        "fontTools.misc.eexecOp",
        ["Src/eexecOp/eexecOpmodule.c"],
        include_dirs=[],
        define_macros=[],
        library_dirs=[],
        libraries=[],
      )
    ],
    scripts = ["Tools/ttx"],
    cmdclass = {"build_ext": build_ext_optional},
    data_files = [('share/man/man1', ["Doc/ttx.1"])],
    **classifiers
  )
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.