﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
7860	Add other bundles' lib dirs to rpaths	Zach Pearson	Zach Pearson	"Trying to install mmcif into a virtual environment for readthedocs, I found that it couldn't find pdb_lib's headers. The root cause was that pdb_lib was unimportable without importing atomic_lib first. 

{{{
>>> import chimerax.pdb_lib
Traceback (most recent call last):
  File ""<stdin>"", line 1, in <module>
  File ""/Users/zjp/git/rbvi/ChimeraX-zjp/.venv/lib/python3.9/site-packages/chimerax/pdb_lib/__init__.py"", line 37, in <module>
    from . import _load_libs
ImportError: dlopen(/Users/zjp/git/rbvi/ChimeraX-zjp/.venv/lib/python3.9/site-packages/chimerax/pdb_lib/_load_libs.cpython-39-darwin.so, 0x0002): Library not loaded: @rpath/libatomstruct.dylib
  Referenced from: <725333F6-9F69-30E0-B8AB-CE73F83D5E1A> /Users/zjp/git/rbvi/ChimeraX-zjp/.venv/lib/python3.9/site-packages/chimerax/pdb_lib/_load_libs.cpython-39-darwin.so
  Reason: tried: '/Users/zjp/git/rbvi/ChimeraX-zjp/.venv/lib/python3.9/site-packages/chimerax/pdb_lib/lib/libatomstruct.dylib' (no such file), '/Users/zjp/git/rbvi/ChimeraX-zjp/.venv/lib/python3.9/site-packages/chimerax/pdb_lib/lib/libatomstruct.dylib' (no such file), '/opt/homebrew/lib/libatomstruct.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libatomstruct.dylib' (no such file), '/opt/homebrew/lib/libatomstruct.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libatomstruct.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS@rpath/libatomstruct.dylib' (no such file), '/Users/zjp/git/rbvi/ChimeraX-zjp/.venv/lib/python3.9/site-packages/chimerax/pdb_lib/lib/libatomstruct.dylib' (no such file), '/Users/zjp/git/rbvi/ChimeraX-zjp/.venv/lib/python3.9/site-packages/chimerax/pdb_lib/lib/libatomstruct.dylib' (no such file), '/opt/homebrew/lib/libatomstruct.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libatomstruct.dylib' (no such file), '/opt/homebrew/lib/libatomstruct.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/lib/libatomstruct.dylib' (no such file), '/usr/local/lib/libatomstruct.dylib' (no such file), '/usr/lib/libatomstruct.dylib' (no such file, not in dyld cache)
}}}

vs

{{{
Python 3.9.15 (main, Oct 11 2022, 21:39:54)
[Clang 14.0.0 (clang-1400.0.29.102)] on darwin
Type ""help"", ""copyright"", ""credits"" or ""license"" for more information.
>>> import chimerax.atomic_lib
>>> import chimerax.pdb_lib
}}}

Since we have to at some point know where libatomstruct is to compile _load_libs, it should be trivial to add e.g. atomic_lib/lib to pdb_lib/_load_libs's rpaths. I did that exact thing for the pure setuptools ChimeraX experiment. 
"	defect	closed	high	1.6	Build System		fixed		Greg Couch Eric Pettersen		7748		all	ChimeraX
