-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
57 lines (50 loc) · 1.19 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
47
48
49
50
51
52
53
54
55
56
57
from setuptools import Extension, find_packages, setup
from setuptools.command.build_py import build_py
EXAMPLE_EXT = Extension(
name='_example',
sources=[
'src/example/example.c',
'src/example/example.i',
],
)
# Build extensions before python modules,
# or the generated SWIG python files will be missing.
class BuildPy(build_py):
def run(self):
self.run_command('build_ext')
super(build_py, self).run()
setup(
name='swig-example',
description='A Python demo for SWIG',
version='0.0.1',
author='Chunpai Wang',
license='',
author_email='chunpaiwang@gmail.com',
url='https://chunpai.github.io',
keywords=['SWIG'],
packages=find_packages('src'),
package_dir={'': 'src'},
ext_modules=[EXAMPLE_EXT],
cmdclass={
'build_py': BuildPy,
},
# some dependencies or requirements
python_requires='>=3.4',
setup_requires=[
'pytest-runner',
],
tests_require=[
'pytest',
'pytest-cov',
'pytest-flake8',
],
install_requires=[
'pytest',
'pytest-cov',
'pytest-flake8',
],
# extras_require=[
# ],
# dependency_links=[
# ]
)