forked from xmlsec/python-xmlsec
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
63 lines (56 loc) · 2.15 KB
/
setup.py
File metadata and controls
63 lines (56 loc) · 2.15 KB
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
from setuptools import setup
from setuptools import Extension
from setuptools.command import build_ext
import xmlsec_setupinfo
class BuildExt(build_ext.build_ext):
def run(self):
# at this moment all setup_requires are installed and we can safety import them
self.patch_options()
build_ext.build_ext.run(self)
def patch_options(self):
ext = self.ext_map[xmlsec_setupinfo.name()]
ext.define_macros.extend(xmlsec_setupinfo.define_macros())
ext.include_dirs.extend(xmlsec_setupinfo.include_dirs())
ext.libraries.extend(xmlsec_setupinfo.libraries())
ext.library_dirs.extend(xmlsec_setupinfo.library_dirs())
_xmlsec = Extension(
xmlsec_setupinfo.name(),
sources=xmlsec_setupinfo.sources(),
extra_compile_args=xmlsec_setupinfo.cflags(),
libraries=[],
library_dirs=[],
include_dirs=[],
define_macros=[],
)
setup(
name=xmlsec_setupinfo.name(),
version=xmlsec_setupinfo.version(),
description=xmlsec_setupinfo.description(),
ext_modules=[_xmlsec],
cmdclass={'build_ext': BuildExt},
setup_requires=xmlsec_setupinfo.requirements(),
install_requires=xmlsec_setupinfo.requirements(),
author="Bulat Gaifullin",
author_email='support@mehcode.com',
maintainer='Bulat Gaifullin',
maintainer_email='gaifullinbf@gmail.com',
url='https://github.com/mehcode/python-xmlsec',
download_url="https://github.com/mehcode/python-xmlsec/archive/v%s.tar.gz" % xmlsec_setupinfo.version(),
license='MIT',
keywords=["xmlsec"],
classifiers=[
xmlsec_setupinfo.dev_status(),
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: C',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Text Processing :: Markup :: XML'
],
)