Commit 08e204a6babe4af040e232260a59fe19a02a5ba1

Authored by Jürgen Knödlseder
1 parent 691a4bf7

Enhance the El Capitan Python module post processing

Showing 1 changed file with 11 additions and 4 deletions
pyext/Makefile.am
... ... @@ -131,16 +131,23 @@ build: $(BUILT_SOURCES)
131 131 $(PYTHON) setup.py build
132 132 if IS_ELCAPITAN
133 133 -for f in build/ctools/ctools/_*.so; do \
134   - echo "Post process module "$$f; \
135   - install_name_tool -change $(libdir)/libctools.1.dylib @rpath/libctools.1.dylib $$f; \
136   - install_name_tool -change $(libdir)/libgamma.2.dylib @rpath/libgamma.2.dylib $$f; \
137   - install_name_tool -add_rpath $(libdir) $$f; \
  134 + echo "Build post process Python module "$$f; \
  135 + libgamma=`otool -L $$f | grep -o libgamma.*.dylib`; \
  136 + libctools=`otool -L $$f | grep -o libctools.*.dylib`; \
  137 + install_name_tool -change $(libdir)/$$libctools @rpath/$$libctools $$f; \
  138 + install_name_tool -change $(libdir)/$$libgamma @rpath/$$libgamma $$f; \
138 139 install_name_tool -add_rpath $(abs_top_builddir)/src/.libs $$f; \
139 140 done
140 141 endif
141 142  
142 143 # Install the ctools Python module
143 144 install-exec-local:
  145 +if IS_ELCAPITAN
  146 + -for f in build/ctools/ctools/_*.so; do \
  147 + echo "Install pre process Python module "$$f; \
  148 + install_name_tool -rpath $(abs_top_builddir)/src/.libs $(libdir) $$f; \
  149 + done
  150 +endif
144 151 $(PYTHON) setup.py install --prefix=$(DESTDIR)$(prefix)
145 152  
146 153 # Uninstall the ctools Python module
... ...