Skip to content

Commit

Permalink
srreal windows support
Browse files Browse the repository at this point in the history
  • Loading branch information
Tieqiong committed Feb 2, 2025
1 parent fdceb92 commit 50e6e81
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions requirements/conda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ diffpy.structure
gsl
# periodictable
# pyobjcryst (up to py3.11 for mac)
# dlfcn-win32 (for windows)
9 changes: 8 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,21 @@ def get_boost_config():
lib = Path(conda_prefix) / "lib"
return {"include_dirs": [str(inc)], "library_dirs": [str(lib)]}

if os.name == "nt":
compile_args = ["/std:c++14"]
macros = [("_USE_MATH_DEFINES", None)]
else:
compile_args = ["-std=c++11"]
macros = []

boost_cfg = get_boost_config()
ext_kws = {
"libraries": ["diffpy"] + get_boost_libraries(),
"extra_compile_args": ["-std=c++11"],
"extra_compile_args": compile_args,
"extra_link_args": [],
"include_dirs": [numpy.get_include()] + boost_cfg["include_dirs"],
"library_dirs": boost_cfg["library_dirs"],
"define_macros": macros,
}


Expand Down

0 comments on commit 50e6e81

Please sign in to comment.