-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
34 lines (30 loc) · 803 Bytes
/
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
#type:ignore
import numpy
from setuptools import setup
# from Cython.Build import cythonize
from mypyc.build import mypycify # type: ignore
import os
from os.path import relpath, splitext, join
print("Compiling Startrak..\n")
def scan_files():
cwd = os.getcwd()
for path, _, files in os.walk(cwd + '/startrak/native'):
for f in files:
if not f.endswith('.py'): continue
rel = relpath(join(path, f), cwd)
result = (splitext(rel)[0].replace(os.sep, '.'), rel)
yield result
print("Files")
paths = [path for _, path in scan_files()]
print('\n'.join(paths))
print("="*40)
print()
print("Compilation log:")
setup(
name= 'startrak',
# packages= ['startrak', 'startrak.native'],
version="0.1",
ext_modules=mypycify(paths),
zip_safe=False,
include_dirs=[numpy.get_include()]
)