From 096d340c189030ac0f92624a4b79b42b4e549179 Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Tue, 23 Feb 2021 10:53:25 +0800 Subject: [PATCH] fix(whl): fix whl version, fix create manylinux2014 image GitOrigin-RevId: 3faa59d9450ce0114677b32c8a46929bb2c95ec8 --- imperative/python/setup.py | 4 +++- scripts/whl/manylinux2014/init_image.sh | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/imperative/python/setup.py b/imperative/python/setup.py index b93f088d6..1d1406989 100644 --- a/imperative/python/setup.py +++ b/imperative/python/setup.py @@ -49,7 +49,9 @@ __version__ = v['__version__'] email = 'megengine@megvii.com' local_version = os.environ.get('LOCAL_VERSION') if local_version: - __version__ = '{}+{}'.format(__version__, local_version) + __version__ = '{}{}'.format(__version__, local_version) +sdk_name = os.environ.get('SDK_NAME', 'cpu') +__version__ = '{}+{}'.format(__version__, sdk_name) packages = find_packages(exclude=['test']) megengine_data = [ diff --git a/scripts/whl/manylinux2014/init_image.sh b/scripts/whl/manylinux2014/init_image.sh index cbdf628b8..d4028206e 100755 --- a/scripts/whl/manylinux2014/init_image.sh +++ b/scripts/whl/manylinux2014/init_image.sh @@ -1,6 +1,7 @@ #!/bin/bash -e GET_PIP_URL='https://bootstrap.pypa.io/get-pip.py' +GET_PIP_URL_35='https://bootstrap.pypa.io/3.5/get-pip.py' SWIG_URL='https://downloads.sourceforge.net/project/swig/swig/swig-3.0.12/swig-3.0.12.tar.gz?use_mirror=autoselect' LLVM_URL='https://github.com/llvm-mirror/llvm/archive/release_60.tar.gz' CLANG_URL='https://github.com/llvm-mirror/clang/archive/release_60.tar.gz' @@ -12,7 +13,12 @@ yum install -y devtoolset-8 devtoolset-8-libatomic-devel.x86_64 for ver in 35m 36m 37m 38 do python_ver=${ver:0:2} - curl ${GET_PIP_URL} | /opt/python/cp${python_ver}-cp${ver}/bin/python - \ + PIP_URL=${GET_PIP_URL} + if [ ${ver} = "35m" ];then + PIP_URL=${GET_PIP_URL_35} + fi + echo "use pip url: ${PIP_URL}" + curl ${PIP_URL} | /opt/python/cp${python_ver}-cp${ver}/bin/python - \ --no-cache-dir --only-binary :all: /opt/python/cp${python_ver}-cp${ver}/bin/pip install \ --no-cache-dir --only-binary :all: numpy==1.18.1 setuptools==46.1.3 -- GitLab