forked from fquiros/CEO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·66 lines (55 loc) · 1.6 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
58
59
60
61
62
63
64
65
66
#!/usr/bin/env python
import os
import sys
import distutils.cmd
import distutils.log
import setuptools
import subprocess
from distutils.core import setup
import setuptools.command.build_py
sys.path.append(os.path.dirname(__file__)+"/python")
print(sys.path)
class MakeCeoCommand(distutils.cmd.Command):
"""A custom command to run Pylint on all Python source files."""
description = 'Make CEO'
user_options = [
# The format is (long option, short option, description).
('none=', None, ''),
]
def initialize_options(self):
"""Set default values for options."""
# Each user option must be listed here with their default value.
pass
def finalize_options(self):
"""Post-process options."""
pass
def run(self):
"""Run command."""
command = ['/usr/bin/make']
#if self.pylint_rcfile:
# command.append('--rcfile=%s' % self.pylint_rcfile)
#command.append(os.getcwd())
command.append('all')
command.append('cython')
self.announce(
'Running command: %s' % str(command),
level=distutils.log.INFO)
subprocess.check_call(command)
class BuildPyCommand(setuptools.command.build_py.build_py):
"""Custom build command."""
def run(self):
self.run_command('make_ceo')
setuptools.command.build_py.build_py.run(self)
setuptools.setup(
cmdclass={
'make_ceo': MakeCeoCommand,
'build_py': BuildPyCommand,
},
name='ceo',
version='1.0',
description='Cuda--Engined Optics',
author='Rodolphe Conan',
author_email='[email protected]',
url='http://rconan.github.io/CEO/',
packages=['python.ceo']
)