From 10e558f2fc22d41da4d8869a807b19ed93b3dbda Mon Sep 17 00:00:00 2001 From: Sheng Zha Date: Fri, 13 Mar 2020 11:56:50 -0700 Subject: [PATCH] [CD] update pypi description, setup.py (#17681) * update pypi description, setup.py, use manylinux2010, use unified dist link for nightly * Use manylinux2014 Co-authored-by: Leonard Lausen --- tools/pip/doc/CPU_ADDITIONAL.md | 7 +++++++ tools/pip/doc/CU100_ADDITIONAL.md | 7 +++++++ tools/pip/doc/CU101_ADDITIONAL.md | 7 +++++++ tools/pip/doc/CU102_ADDITIONAL.md | 7 +++++++ tools/pip/doc/CU90_ADDITIONAL.md | 9 +++++++++ tools/pip/doc/CU92_ADDITIONAL.md | 7 +++++++ tools/pip/doc/NATIVE_ADDITIONAL.md | 7 +++++++ tools/pip/doc/PYPI_README.md | 1 - tools/pip/setup.py | 21 ++++++++++++++------- 9 files changed, 65 insertions(+), 8 deletions(-) diff --git a/tools/pip/doc/CPU_ADDITIONAL.md b/tools/pip/doc/CPU_ADDITIONAL.md index ef958889fc70..07a95d5e451b 100644 --- a/tools/pip/doc/CPU_ADDITIONAL.md +++ b/tools/pip/doc/CPU_ADDITIONAL.md @@ -35,3 +35,10 @@ To install, use: ```bash pip install mxnet ``` + +Nightly Builds +-------------- +To install the latest nightly build, use: +```bash +pip install --pre mxnet -f https://dist.mxnet.io/python +``` diff --git a/tools/pip/doc/CU100_ADDITIONAL.md b/tools/pip/doc/CU100_ADDITIONAL.md index 36455eaef3de..2e607d766ed8 100644 --- a/tools/pip/doc/CU100_ADDITIONAL.md +++ b/tools/pip/doc/CU100_ADDITIONAL.md @@ -35,3 +35,10 @@ To install: ```bash pip install mxnet-cu100 ``` + +Nightly Builds +-------------- +To install the latest nightly build, use: +```bash +pip install --pre mxnet-cu100 -f https://dist.mxnet.io/python +``` diff --git a/tools/pip/doc/CU101_ADDITIONAL.md b/tools/pip/doc/CU101_ADDITIONAL.md index 36ea4d3b5be8..278c39942141 100644 --- a/tools/pip/doc/CU101_ADDITIONAL.md +++ b/tools/pip/doc/CU101_ADDITIONAL.md @@ -35,3 +35,10 @@ To install: ```bash pip install mxnet-cu101 ``` + +Nightly Builds +-------------- +To install the latest nightly build, use: +```bash +pip install --pre mxnet-cu101 -f https://dist.mxnet.io/python +``` diff --git a/tools/pip/doc/CU102_ADDITIONAL.md b/tools/pip/doc/CU102_ADDITIONAL.md index ffb034a15f01..81829690da29 100644 --- a/tools/pip/doc/CU102_ADDITIONAL.md +++ b/tools/pip/doc/CU102_ADDITIONAL.md @@ -34,3 +34,10 @@ To install: ```bash pip install mxnet-cu102 ``` + +Nightly Builds +-------------- +To install the latest nightly build, use: +```bash +pip install --pre mxnet-cu102 -f https://dist.mxnet.io/python +``` diff --git a/tools/pip/doc/CU90_ADDITIONAL.md b/tools/pip/doc/CU90_ADDITIONAL.md index 356a84003586..770914b5a1a0 100644 --- a/tools/pip/doc/CU90_ADDITIONAL.md +++ b/tools/pip/doc/CU90_ADDITIONAL.md @@ -15,6 +15,8 @@ +**CUDA 9.0 package for MXNet is no longer maintained for new releases.** + Prerequisites ------------- This package supports Linux and Windows platforms. You may also want to check: @@ -34,3 +36,10 @@ To install: ```bash pip install mxnet-cu90 ``` + +Nightly Builds +-------------- +To install the latest nightly build, use: +```bash +pip install --pre mxnet-cu90 -f https://dist.mxnet.io/python +``` diff --git a/tools/pip/doc/CU92_ADDITIONAL.md b/tools/pip/doc/CU92_ADDITIONAL.md index 15c221123fba..7aec9a1aeb67 100644 --- a/tools/pip/doc/CU92_ADDITIONAL.md +++ b/tools/pip/doc/CU92_ADDITIONAL.md @@ -34,3 +34,10 @@ To install: ```bash pip install mxnet-cu92 ``` + +Nightly Builds +-------------- +To install the latest nightly build, use: +```bash +pip install --pre mxnet-cu92 -f https://dist.mxnet.io/python +``` diff --git a/tools/pip/doc/NATIVE_ADDITIONAL.md b/tools/pip/doc/NATIVE_ADDITIONAL.md index a2e48b0692b7..902464c7ab6e 100644 --- a/tools/pip/doc/NATIVE_ADDITIONAL.md +++ b/tools/pip/doc/NATIVE_ADDITIONAL.md @@ -32,3 +32,10 @@ To install: ```bash pip install mxnet-native ``` + +Nightly Builds +-------------- +To install the latest nightly build, use: +```bash +pip install --pre mxnet-native -f https://dist.mxnet.io/python +``` diff --git a/tools/pip/doc/PYPI_README.md b/tools/pip/doc/PYPI_README.md index 899ebc032217..d323a5545f22 100644 --- a/tools/pip/doc/PYPI_README.md +++ b/tools/pip/doc/PYPI_README.md @@ -22,4 +22,3 @@ It allows you to mix the flavours of deep learning programs together to maximize For feature requests on the PyPI package, suggestions, and issue reports, create an issue by clicking [here](https://github.com/apache/incubator-mxnet/issues/new). - diff --git a/tools/pip/setup.py b/tools/pip/setup.py index a0b63cc866f9..d01051713f2f 100644 --- a/tools/pip/setup.py +++ b/tools/pip/setup.py @@ -27,7 +27,7 @@ if platform.system() == 'Linux': sys.argv.append('--universal') - sys.argv.append('--plat-name=manylinux1_x86_64') + sys.argv.append('--plat-name=manylinux2014_x86_64') from setuptools import setup, find_packages from setuptools.dist import Distribution @@ -110,11 +110,18 @@ def has_ext_modules(self): if variant != 'CPU': package_name = 'mxnet_{0}'.format(variant.lower()) +def skip_markdown_comments(md): + lines = md.splitlines() + for i in range(len(lines)): + if lines[i].strip(): + if not lines[i].startswith(''): + return '\n'.join(lines[i:]) + with open('doc/PYPI_README.md') as readme_file: - long_description = readme_file.read() + long_description = skip_markdown_comments(readme_file.read()) with open('doc/{0}_ADDITIONAL.md'.format(variant)) as variant_doc: - long_description = long_description + variant_doc.read() + long_description = long_description + skip_markdown_comments(variant_doc.read()) # pypi only supports rst, so use pandoc to convert import pypandoc @@ -152,12 +159,12 @@ def has_ext_modules(self): if variant.endswith('MKL'): if platform.system() == 'Darwin': shutil.copytree(os.path.join(CURRENT_DIR, 'mxnet-build/3rdparty/mkldnn/build/install/include'), - os.path.join(CURRENT_DIR, 'mxnet/include/mkldnn')) + os.path.join(CURRENT_DIR, 'mxnet/include/mkldnn')) if platform.system() == 'Linux': libdir, mxdir = os.path.dirname(LIB_PATH[0]), os.path.join(CURRENT_DIR, 'mxnet') if os.path.exists(os.path.join(libdir, 'libgfortran.so.3')): shutil.copy(os.path.join(libdir, 'libgfortran.so.3'), mxdir) - package_data['mxnet'].append('mxnet/libgfortran.so.4') + package_data['mxnet'].append('mxnet/libgfortran.so.3') else: shutil.copy(os.path.join(libdir, 'libgfortran.so.4'), mxdir) package_data['mxnet'].append('mxnet/libgfortran.so.4') @@ -199,10 +206,10 @@ def has_ext_modules(self): 'Programming Language :: Other', # R, Scala 'Programming Language :: Perl', 'Programming Language :: Python', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: Implementation :: CPython', 'Topic :: Scientific/Engineering', 'Topic :: Scientific/Engineering :: Artificial Intelligence',