Skip to content

Commit

Permalink
[CD] update pypi description, setup.py (apache#17681)
Browse files Browse the repository at this point in the history
* update pypi description, setup.py, use manylinux2010, use unified dist link for nightly

* Use manylinux2014

Co-authored-by: Leonard Lausen <[email protected]>
  • Loading branch information
2 people authored and anirudh2290 committed May 29, 2020
1 parent 6b63c95 commit 10e558f
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 8 deletions.
7 changes: 7 additions & 0 deletions tools/pip/doc/CPU_ADDITIONAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
7 changes: 7 additions & 0 deletions tools/pip/doc/CU100_ADDITIONAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
7 changes: 7 additions & 0 deletions tools/pip/doc/CU101_ADDITIONAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
7 changes: 7 additions & 0 deletions tools/pip/doc/CU102_ADDITIONAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
9 changes: 9 additions & 0 deletions tools/pip/doc/CU90_ADDITIONAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<!--- specific language governing permissions and limitations -->
<!--- under the License. -->

**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:
Expand All @@ -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
```
7 changes: 7 additions & 0 deletions tools/pip/doc/CU92_ADDITIONAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
7 changes: 7 additions & 0 deletions tools/pip/doc/NATIVE_ADDITIONAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
1 change: 0 additions & 1 deletion tools/pip/doc/PYPI_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).


21 changes: 14 additions & 7 deletions tools/pip/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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('<!--') or not lines[i].endswith('-->'):
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
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 10e558f

Please sign in to comment.