From e10021f197fec3c1177db3b04f694d1ca1b1f35f Mon Sep 17 00:00:00 2001
From: Karl Wette <karl.wette@ligo.org>
Date: Thu, 18 May 2023 10:41:33 +1000
Subject: [PATCH] Point LALSuite wheels to solar_system_ephemerides package for
 ephemeris files

[ci wheels]
---
 .gitlab-ci.yml    | 11 +++++++----
 wheel/setup.py.in |  3 +++
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4f6a1eeec6..4d210f30f1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1039,6 +1039,7 @@ lalapps:conda:py39:
   - ${PYTHON} -m venv test
   - source test/bin/activate
   - python -m pip install --upgrade pip
+  - python -m pip install solar_system_ephemerides
   - python -m pip install wheelhouse/*
   # check metadata
   - python -m pip show lalsuite
@@ -1068,16 +1069,17 @@ lalapps:conda:py39:
     - export PYTHON="/opt/python/$(echo ${CI_JOB_NAME} | sed 's/.*:\(.*\)-manylinux.*/\1/')/bin/python"
     # Build wheel
     - ./00boot
+    - SSE="solar_system_ephemerides/ephemerides"
     - ./configure
           ${ENABLE_NIGHTLY}
-          --with-relative-data-path="../lalapps/data"
+          --with-relative-data-path="../lalapps/data:../${SSE}/earth:../${SSE}/sun:../${SSE}/time"
           --without-fallback-data-path
           --disable-doxygen
           --disable-swig-octave
           --enable-mpi
           --enable-python
           --enable-swig-python
-          --with-ephem=minimal
+          --without-ephem
           PYTHON=${PYTHON}
     - make -j${CPU_COUNT} wheel
     # Bundle and fix up dependent shared libraries
@@ -1107,16 +1109,17 @@ lalapps:conda:py39:
     - python -m pip list installed
     # Build wheel
     - ./00boot
+    - SSE="solar_system_ephemerides/ephemerides"
     - ./configure
           ${ENABLE_NIGHTLY}
-          --with-relative-data-path="../../lalapps/data"
+          --with-relative-data-path="../../lalapps/data:../../${SSE}/earth:../../${SSE}/sun:../../${SSE}/time"
           --without-fallback-data-path
           --disable-doxygen
           --disable-swig-octave
           --enable-mpi
           --enable-python
           --enable-swig-python
-          --with-ephem=minimal
+          --without-ephem
           PYTHON=$(which python)
           LDFLAGS=-Wl,-headerpad_max_install_names
     - make -j${CPU_COUNT} wheel
diff --git a/wheel/setup.py.in b/wheel/setup.py.in
index 2b5d6ee878..9345a45f5c 100644
--- a/wheel/setup.py.in
+++ b/wheel/setup.py.in
@@ -189,6 +189,9 @@ setup(
         'scipy',
     ],
     extras_require={
+        'ephemerides': [
+            'solar_system_ephemerides',
+        ],
         'lalinference': [
             'gwdatafind',
             'gwpy',
-- 
GitLab