-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathsetup.py
46 lines (37 loc) · 1.08 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# coding: utf-8
import sys
from distutils.core import setup, Extension
USE_CYTHON = False
CYTHON_PARAM = '--cython'
if CYTHON_PARAM in sys.argv:
USE_CYTHON = True
sys.argv.remove(CYTHON_PARAM)
SOURCE_EXT = '.pyx' if USE_CYTHON else '.cpp'
EXT_MODULES = [Extension(
'pugixmltodict',
sources=[
'pugixmltodict' + SOURCE_EXT,
'pugixml/src/pugixml.cpp',
],
)]
if USE_CYTHON:
from Cython.Build import cythonize
EXT_MODULES = cythonize(EXT_MODULES)
setup(
name='pugixmltodict',
version='0.5',
description='A fast alternative to xmltodict library',
url='https://github.com/sepeth/pugixmltodict',
author='Doğan Çeçen',
author_email='[email protected]',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Cython',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Topic :: Text Processing :: Markup :: XML',
],
ext_modules=EXT_MODULES,
)