From 5721144a6f75ca916bc2db354657a88301542d7b Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Sun, 17 Mar 2024 15:29:08 +0100 Subject: [PATCH] debug --- ci/travis/osx/install.sh | 19 +++++++++++++++++-- ci/travis/osx/script.sh | 11 +++++------ 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/ci/travis/osx/install.sh b/ci/travis/osx/install.sh index 775ab438858b..91182af17954 100755 --- a/ci/travis/osx/install.sh +++ b/ci/travis/osx/install.sh @@ -17,7 +17,7 @@ cd build export GDAL_PYTHON_BINDINGS_WITHOUT_NUMPY=YES CFLAGS="-Wextra -Werror" CXXFLAGS="-Wextra -Werror" cmake .. \ - -DCMAKE_INSTALL_PREFIX=$HOME/install-gdal \ + -DCMAKE_INSTALL_PREFIX=${CONDA_PREFIX} \ -DCMAKE_PREFIX_PATH=${CONDA_PREFIX} \ -DCMAKE_BUILD_TYPE=Debug \ -DGDAL_USE_GEOTIFF_INTERNAL=ON \ @@ -29,8 +29,23 @@ CFLAGS="-Wextra -Werror" CXXFLAGS="-Wextra -Werror" cmake .. \ make -j3 echo "Show which shared libs got used:" otool -L apps/ogrinfo +echo "otool -L libgdal*.dylib" +otool -L libgdal*.dylib + make install + +export PYTHONPATH=${CONDA_PREFIX}/lib/python3.12/site-packages:$PYTHONPATH +echo "PYTHONPATH=$PYTHONPATH" + +export LD_LIBRARY_PATH=${CONDA_PREFIX}/lib:$LD_LIBRARY_PATH +echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" + +ls -al swig/python/osgeo/_gdal.cpython-312-darwin.so +otool -L swig/python/osgeo/_gdal.cpython-312-darwin.so + +python3 -c "from osgeo import gdal; print(gdal.VersionInfo(''))" + cd .. # Post-install testing -# ../autotest/postinstall/test_pkg-config.sh $HOME/install-gdal +# ../autotest/postinstall/test_pkg-config.sh ${CONDA_PREFIX} diff --git a/ci/travis/osx/script.sh b/ci/travis/osx/script.sh index 944759ad5401..f21c1319f320 100755 --- a/ci/travis/osx/script.sh +++ b/ci/travis/osx/script.sh @@ -11,16 +11,15 @@ echo 'Running Python unit tests' # install test dependencies sudo -H pip3 install -r autotest/requirements.txt -# https://github.com/rouault/gdal/runs/1300694473 -# import issues of ogr_pg from ../ogr -mv autotest/utilities/test_ogr2ogr.py autotest/utilities/test_ogr2ogr.py.disabled -mv autotest/pyscripts/test_ogr2ogr_py.py autotest/pyscripts/test_ogr2ogr_py.py.disabled - # Run all the Python autotests (cd build && ctest -V -R autotest) export PYTEST="python3 -m pytest -vv -p no:sugar --color=no" -export DYLD_LIBRARY_PATH=/Users/runner/work/gdal/gdal/build:/Users/runner/work/gdal/gdal/build/lib +export PYTHONPATH=${CONDA_PREFIX}/lib/python3.12/site-packages:$PYTHONPATH +echo "PYTHONPATH=$PYTHONPATH" + +export LD_LIBRARY_PATH=${CONDA_PREFIX}/lib:$LD_LIBRARY_PATH +echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" (cd autotest; $PYTEST)