Skip to content

Commit

Permalink
* Fix builds for libpostal on Mac and Windows (issue #903)
Browse files Browse the repository at this point in the history
 * Fix builds for NumPy and SciPy on Linux
  • Loading branch information
saudet committed Nov 26, 2020
1 parent 7b04086 commit 4e688a6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

* Fix builds for NumPy and SciPy when using a cross compiler
* Fix builds for libpostal on Mac and Windows ([issue #903](https://github.com/bytedeco/javacpp-presets/issues/903))
* Fix builds for NumPy and SciPy on Linux when using a cross compiler or not
* Update presets for Visual Studio 2019 on Windows
* Add presets for TVM 0.7.0
* Include `free()` in presets for FTTW as required by `fftw_export_wisdom_to_string()` ([issue bytedeco/javacpp#429](https://github.com/bytedeco/javacpp/issues/429))
Expand Down
3 changes: 2 additions & 1 deletion libpostal/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ if [[ "${ACLOCAL_PATH:-}" == C:\\msys64\\* ]]; then
export ACLOCAL_PATH=/mingw64/share/aclocal:/usr/share/aclocal
fi

# Work around build issues on Windows
# Work around build issues on Mac and Windows
sedinplace 's/-Werror=format-security/-Wno-implicit-function-declaration/g' src/Makefile.am
sedinplace '/_rand48_/d' src/klib/drand48.h

case $PLATFORM in
Expand Down
10 changes: 7 additions & 3 deletions scipy/cppbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,16 @@ if ! $PYTHON_BIN_PATH -m pip install --target=$PYTHON_LIB_PATH cython pybind11;
PYTHON_BIN_PATH="python"
export NUMPY_MADVISE_HUGEPAGE=1

# For some reason, setup.py fails if the Python installations are not at their original prefixes
# For some reason, setup.py fails on Linux if the Python installation is not at its original prefix
PREFIX_HOST_PATH=$(sed -n 's/^prefix="\(.*\)"/\1/p' $CPYTHON_HOST_PATH/bin/python3.7-config)
PREFIX_PATH=$(sed -n 's/^prefix="\(.*\)"/\1/p' $CPYTHON_PATH/bin/python3.7-config)
mkdir -p $PREFIX_HOST_PATH
mkdir -p $PREFIX_PATH
cp -a $CPYTHON_HOST_PATH/* $PREFIX_HOST_PATH
fi

if [[ $PLATFORM == linux* ]]; then
# For some reason, setup.py fails on Linux if the Python installation is not at its original prefix
PREFIX_PATH=$(sed -n 's/^prefix="\(.*\)"/\1/p' $CPYTHON_PATH/bin/python3.7-config)
mkdir -p $PREFIX_PATH
cp -a $CPYTHON_PATH/* $PREFIX_PATH
fi

Expand Down

0 comments on commit 4e688a6

Please sign in to comment.