-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
54 lines (45 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
#!/usr/bin/env python
from setuptools import setup
from distutils.command.build import build
from setuptools.command.develop import develop
class build_with_spurious(build):
def run(self):
import os
if "CC" in os.environ:
cc = os.environ['CC']
else:
cc = "cc"
os.system(
"{} -Wall -O3 peppercompiler/SpuriousDesign/spuriousSSM.c -o peppercompiler/_spuriousSSM -lm".
format(cc))
build.run(self)
class develop_with_spurious(develop):
def run(self):
import os
os.system(
"cc -Wall -O3 peppercompiler/SpuriousDesign/spuriousSSM.c -o peppercompiler/_spuriousSSM -lm"
)
develop.run(self)
setup(
name="peppercompiler",
version="0.1.3",
packages=['peppercompiler', 'peppercompiler.design'],
install_requires=["pyparsing", "six"],
include_package_data=True,
package_data={
'peppercompiler': ['_spuriousSSM', 'SpuriousDesign/spuriousSSM.c']
},
test_suite='peppercompiler.tests',
cmdclass={'build': build_with_spurious,
'develop': develop_with_spurious},
entry_points={
'console_scripts': [
'pepper-compiler = peppercompiler.compiler:main',
'pepper-design-spurious = peppercompiler.design.spurious_design:main',
'pepper-finish = peppercompiler.finish:main',
'spuriousSSM = peppercompiler._spuriousSSM_wrapper:main'
]
},
author="Constantine Evans et al (this version)",
author_email="[email protected]",
description="PepperCompiler in a pythonic form")