Skip to content

Commit 12481e9

Browse files
committed
update conda requirements, correct objcryst flag
1 parent 99cd3d3 commit 12481e9

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

requirements/conda.txt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
boost
2-
numpy
31
libdiffpy
4-
setuptools
2+
libboost-devel
3+
libobjcryst
4+
pyobjcryst
55
diffpy.structure
6-
gsl
7-
# periodictable
8-
# pyobjcryst (up to py3.11 for mac)
9-
# dlfcn-win32 (for windows)
6+
periodictable

setup.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,14 @@ def get_objcryst_libraries():
6161

6262
libs = []
6363
for fn in os.listdir(libdir):
64-
low = fn.lower()
65-
if "objcryst" in low:
66-
libs.append(os.path.splitext(fn)[0])
64+
stem = Path(fn).stem
65+
if "objcryst" not in stem.lower():
66+
continue
67+
# strip a leading "lib" so that setuptools does -lObjCryst, not -llibObjCryst
68+
if stem.startswith("lib"):
69+
stem = stem[3:]
70+
libs.append(stem)
71+
6772
if not libs:
6873
raise RuntimeError(f"No ObjCryst libraries found in {libdir}")
6974
return libs

0 commit comments

Comments
 (0)