Skip to content

Commit 50e6e81

Browse files
committed
srreal windows support
1 parent fdceb92 commit 50e6e81

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

requirements/conda.txt

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ diffpy.structure
66
gsl
77
# periodictable
88
# pyobjcryst (up to py3.11 for mac)
9+
# dlfcn-win32 (for windows)

setup.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,21 @@ def get_boost_config():
4747
lib = Path(conda_prefix) / "lib"
4848
return {"include_dirs": [str(inc)], "library_dirs": [str(lib)]}
4949

50+
if os.name == "nt":
51+
compile_args = ["/std:c++14"]
52+
macros = [("_USE_MATH_DEFINES", None)]
53+
else:
54+
compile_args = ["-std=c++11"]
55+
macros = []
5056

5157
boost_cfg = get_boost_config()
5258
ext_kws = {
5359
"libraries": ["diffpy"] + get_boost_libraries(),
54-
"extra_compile_args": ["-std=c++11"],
60+
"extra_compile_args": compile_args,
5561
"extra_link_args": [],
5662
"include_dirs": [numpy.get_include()] + boost_cfg["include_dirs"],
5763
"library_dirs": boost_cfg["library_dirs"],
64+
"define_macros": macros,
5865
}
5966

6067

0 commit comments

Comments
 (0)