Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Mar 17, 2024
1 parent 8e78342 commit 5721144
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
19 changes: 17 additions & 2 deletions ci/travis/osx/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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}
11 changes: 5 additions & 6 deletions ci/travis/osx/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 5721144

Please sign in to comment.