1 |
#!/usr/bin/env python |
2 |
# |
3 |
# Setup script for the cElementTree accelerator |
4 |
# $Id: setup.py 2294 2005-02-13 12:09:00Z fredrik $ |
5 |
# |
6 |
# Usage: python setup.py install |
7 |
# |
8 |
|
9 |
from distutils.core import setup, Extension |
10 |
from distutils import sysconfig |
11 |
|
12 |
# -------------------------------------------------------------------- |
13 |
# identification |
14 |
|
15 |
NAME = "cElementTree" |
16 |
VERSION = "1.0.2-20050302" |
17 |
DESCRIPTION = "A fast C implementation of the ElementTree API." |
18 |
AUTHOR = "Fredrik Lundh", "fredrik@pythonware.com" |
19 |
HOMEPAGE = "http://www.effbot.org/zone/celementtree.htm" |
20 |
DOWNLOAD = "http://effbot.org/downloads#celementtree" |
21 |
|
22 |
# -------------------------------------------------------------------- |
23 |
# distutils declarations |
24 |
|
25 |
celementtree_module = Extension( |
26 |
"cElementTree", ["cElementTree.c"], |
27 |
include_dirs=['/usr/include'], |
28 |
libraries=['expat'] |
29 |
) |
30 |
|
31 |
try: |
32 |
# add classifiers and download_url syntax to distutils |
33 |
from distutils.dist import DistributionMetadata |
34 |
DistributionMetadata.classifiers = None |
35 |
DistributionMetadata.download_url = None |
36 |
except: |
37 |
pass |
38 |
|
39 |
setup( |
40 |
author=AUTHOR[0], |
41 |
author_email=AUTHOR[1], |
42 |
classifiers=[ |
43 |
"Development Status :: 5 - Production/Stable", |
44 |
"Operating System :: OS Independent", |
45 |
"Topic :: Text Processing :: Markup :: XML", |
46 |
], |
47 |
description=DESCRIPTION, |
48 |
download_url=DOWNLOAD, |
49 |
ext_modules = [celementtree_module], |
50 |
license="Python (MIT style)", |
51 |
long_description=DESCRIPTION, |
52 |
name=NAME, |
53 |
platforms="Python 2.1 and later.", |
54 |
url=HOMEPAGE, |
55 |
version=VERSION, |
56 |
) |