-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathsetup.py
More file actions
33 lines (26 loc) · 685 Bytes
/
setup.py
File metadata and controls
33 lines (26 loc) · 685 Bytes
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
from setuptools import setup, find_packages, Extension
from os import path
import os
import numpy
def package_files(directory):
paths = []
for (pathhere, _, filenames) in os.walk(directory):
for filename in filenames:
paths.append(os.path.join("..", pathhere, filename))
return paths
extra_folders = [
"swift/out",
"swift/core",
]
extra_files = []
for extra_folder in extra_folders:
extra_files += package_files(extra_folder)
phys = Extension(
"swift.phys",
sources=["./swift/core/phys.cpp"],
include_dirs=["./swift/core/", numpy.get_include()],
)
setup(
package_data={"swift": extra_files},
ext_modules=[phys],
)