Skip to content

Commit b075de8

Browse files
authored
Merge pull request #53 from Tieqiong/win
add: srreal windows support
2 parents fdceb92 + b83ee8f commit b075de8

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-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

+9-1
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,21 @@ def get_boost_config():
4848
return {"include_dirs": [str(inc)], "library_dirs": [str(lib)]}
4949

5050

51+
if os.name == "nt":
52+
compile_args = ["/std:c++14"]
53+
macros = [("_USE_MATH_DEFINES", None)]
54+
else:
55+
compile_args = ["-std=c++11"]
56+
macros = []
57+
5158
boost_cfg = get_boost_config()
5259
ext_kws = {
5360
"libraries": ["diffpy"] + get_boost_libraries(),
54-
"extra_compile_args": ["-std=c++11"],
61+
"extra_compile_args": compile_args,
5562
"extra_link_args": [],
5663
"include_dirs": [numpy.get_include()] + boost_cfg["include_dirs"],
5764
"library_dirs": boost_cfg["library_dirs"],
65+
"define_macros": macros,
5866
}
5967

6068

0 commit comments

Comments
 (0)