diff --git a/.github/workflows/make.yml b/.github/workflows/make.yml index bc4ce5f..f9c5eb6 100644 --- a/.github/workflows/make.yml +++ b/.github/workflows/make.yml @@ -85,6 +85,8 @@ jobs: - run: pip3 install -r cython/requirements.txt - run: | cd cython/ + cp -r ../lib lib + cp -r ../share share python3 setup.py build_ext --inplace pip3 install . cd .. @@ -236,6 +238,8 @@ jobs: pip3 install -r test/requirements.txt pip3 install -r cython/requirements.txt cd cython/ + cp -r ../lib lib + cp -r ../share share python3 setup.py build_ext --inplace pip3 install . cd .. diff --git a/cython/sme_python_bridge.h b/cython/include/sme_python_bridge.h similarity index 100% rename from cython/sme_python_bridge.h rename to cython/include/sme_python_bridge.h diff --git a/cython/sme_synth_faster.h b/cython/include/sme_synth_faster.h similarity index 100% rename from cython/sme_synth_faster.h rename to cython/include/sme_synth_faster.h diff --git a/cython/setup.py b/cython/setup.py index 0605fdb..d06e1d3 100644 --- a/cython/setup.py +++ b/cython/setup.py @@ -5,7 +5,7 @@ import numpy as np from Cython.Build import cythonize -lib_path = realpath(join(dirname(__file__), "../lib")) +lib_path = realpath(join(dirname(__file__), "lib")) file_path = realpath(join(dirname(__file__), "smelib.pyx")) print("lib_path: " + lib_path) diff --git a/cython/smelib.pyx b/cython/smelib.pyx index 1c8cbfb..88e18a4 100644 --- a/cython/smelib.pyx +++ b/cython/smelib.pyx @@ -20,7 +20,7 @@ ctypedef short np_short_t ctypedef float np_float_t ctypedef long np_long_t -cdef extern from "sme_python_bridge.h": +cdef extern from "include/sme_python_bridge.h": cdef struct s_IDL_STRING: int slen short stype @@ -56,7 +56,7 @@ cdef extern from "sme_python_bridge.h": const char * Python_GetLineOpacity(double wave, short nmu, double * lop, double * cop, double * scr, double * tsf, double * csf) const char * Python_GetLineRange(double * linerange, int nlines) -cdef extern from "sme_synth_faster.h": +cdef extern from "include/sme_synth_faster.h": int GetNLINES() short GetNRHOX() char * GetSPNAME()