Skip to content

Commit

Permalink
[PIP] add build target in cmake for osx compat (apache#19110)
Browse files Browse the repository at this point in the history
* add build target in cmake for osx compat

* update wheel tags
  • Loading branch information
szha authored and Rohit Kumar Srivastava committed Feb 19, 2021
1 parent df60158 commit aab2e4a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
7 changes: 6 additions & 1 deletion tools/pip/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@
import platform

if platform.system() == 'Linux':
sys.argv.append('--universal')
sys.argv.append('--python-tag')
sys.argv.append('py3')
sys.argv.append('--plat-name=manylinux2014_x86_64')
elif platform.system() == 'Darwin':
sys.argv.append('--python-tag')
sys.argv.append('py3')
sys.argv.append('--plat-name=macosx_10_13_x86_64')

from setuptools import setup, find_packages
from setuptools.dist import Distribution
Expand Down
16 changes: 9 additions & 7 deletions tools/staticbuild/build_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ cp $make_config config.mk

git submodule update --init --recursive || true

$MAKE DEPS_PATH=$DEPS_PATH DMLCCORE
$MAKE DEPS_PATH=$DEPS_PATH $PWD/3rdparty/tvm/nnvm/lib/libnnvm.a
$MAKE DEPS_PATH=$DEPS_PATH PSLITE
$MAKE DEPS_PATH=$DEPS_PATH mkldnn

>&2 echo "Now building mxnet..."
$MAKE DEPS_PATH=$DEPS_PATH
# Build libmxnet.so
rm -rf build; mkdir build; cd build
cmake -GNinja -C $cmake_config \
-DCMAKE_PREFIX_PATH=${DEPS_PATH} \
-DCMAKE_FIND_ROOT_PATH=${DEPS_PATH} \
-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 \
..
ninja
cd -

if [[ $PLATFORM == 'linux' ]]; then
if [[ -f /usr/lib/gcc/x86_64-linux-gnu/4.8/libgfortran.so ]]; then
Expand Down

0 comments on commit aab2e4a

Please sign in to comment.