-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
27 lines (23 loc) · 722 Bytes
/
setup.py
File metadata and controls
27 lines (23 loc) · 722 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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from setuptools import Extension, setup, find_packages
import sys
import numpy
# Platform-specific compile args
if sys.platform == "win32":
extra_compile_args = ["/O2"] # Optimize for Windows
else:
extra_compile_args = ["-O3", "-fPIC"] # Optimize for Unix/macOS
setup(
name="spectresc",
include_dirs=[numpy.get_include()],
package_dir={"": "src"}, # Tell setuptools packages are under src/
packages=find_packages(where="src"), # Find packages in src/
ext_modules=[
Extension(
"spectresc.spectresc",
sources=["src/spectresc/spectres.c"],
extra_compile_args=extra_compile_args,
)
],
)