Browse Source

fix(whl): fix whl version, fix create manylinux2014 image

GitOrigin-RevId: 3faa59d945
tags/v1.3.0
Megvii Engine Team 4 years ago
parent
commit
096d340c18
2 changed files with 10 additions and 2 deletions
  1. +3
    -1
      imperative/python/setup.py
  2. +7
    -1
      scripts/whl/manylinux2014/init_image.sh

+ 3
- 1
imperative/python/setup.py View File

@@ -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 = [


+ 7
- 1
scripts/whl/manylinux2014/init_image.sh View File

@@ -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


Loading…
Cancel
Save