Skip to content

Commit

Permalink
Merge pull request #91 from mjuric/main
Browse files Browse the repository at this point in the history
conda-forge cross-compile build support
  • Loading branch information
matthewholman authored Nov 14, 2023
2 parents 558e3c1 + 79486a0 commit 5b750b2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Version](https://img.shields.io/badge/assist-v1.1.7-green.svg?style=flat)](https://assist.readthedocs.org)
[![Version](https://img.shields.io/badge/assist-v1.1.6-green.svg?style=flat)](https://assist.readthedocs.org)
[![GPL](https://img.shields.io/badge/license-GPL-green.svg?style=flat)](https://github.com/matthewholman/blob/main/LICENSE)
[![Python unit tests)](https://github.com/matthewholman/assist/actions/workflows/python.yml/badge.svg)](https://github.com/matthewholman/assist/actions/workflows/python.yml)
[![C unit tests](https://github.com/matthewholman/assist/actions/workflows/c.yml/badge.svg)](https://github.com/matthewholman/assist/actions/workflows/c.yml)
Expand Down
26 changes: 19 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,25 @@ def finalize_options(self):
rebdirsp = get_python_lib()+'/'#[p for p in sys.path if p.endswith('site-packages')][0]+'/'
self.include_dirs.append(rebdir)
sources = [ 'src/assist.c', 'src/spk.c', 'src/planets.c', 'src/forces.c'],
self.library_dirs.append(rebdir+'/../')
self.library_dirs.append(rebdirsp)
for ext in self.extensions:
ext.runtime_library_dirs.append(rebdir+'/../')
ext.extra_link_args.append('-Wl,-rpath,'+rebdir+'/../')
ext.runtime_library_dirs.append(rebdirsp)
ext.extra_link_args.append('-Wl,-rpath,'+rebdirsp)

if not "CONDA_BUILD_CROSS_COMPILATION" in os.environ:
self.library_dirs.append(rebdir+'/../')
self.library_dirs.append(rebdirsp)
for ext in self.extensions:
ext.runtime_library_dirs.append(rebdir+'/../')
ext.extra_link_args.append('-Wl,-rpath,'+rebdir+'/../')
ext.runtime_library_dirs.append(rebdirsp)
ext.extra_link_args.append('-Wl,-rpath,'+rebdirsp)
print(extra_link_args)
print(rebdir+'/../')
print(rebdirsp)
else:
# For conda-forge cross-compile builds
rebdir=get_python_lib(prefix=os.environ["PREFIX"])
self.library_dirs.append(rebdir)
for ext in self.extensions:
ext.extra_link_args.append('-Wl,-rpath,'+rebdir)
print(ext.extra_link_args)

from distutils.version import LooseVersion

Expand Down
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
1.1.7


0 comments on commit 5b750b2

Please sign in to comment.