Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[BACKPORT]Update setup.py for darwin builds (#19130) #19927

Merged
merged 1 commit into from
Feb 22, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions tools/pip/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,17 @@
# coding: utf-8
# pylint: disable=invalid-name, exec-used
"""Setup mxnet package for pip."""
from __future__ import absolute_import
from datetime import datetime
import os
import sys
import shutil
import platform
from setuptools import setup, find_packages

if platform.system() == 'Linux':
sys.argv.append('--universal')
sys.argv.append('--plat-name=manylinux2014_x86_64')

from setuptools import setup, find_packages
from setuptools.dist import Distribution

# We can not import `mxnet.info.py` in setup.py directly since mxnet/__init__.py
# Will be invoked which introduces dependences
CURRENT_DIR = os.path.dirname(__file__)
Expand All @@ -56,10 +53,6 @@
elif travis_tag.startswith('patch-'):
__version__ = os.environ['TRAVIS_TAG'].split('-')[1]

class BinaryDistribution(Distribution):
def has_ext_modules(self):
return platform.system() == 'Darwin'


DEPENDENCIES = [
'numpy<2.0.0,>1.16.0',
Expand Down Expand Up @@ -192,7 +185,6 @@ def skip_markdown_comments(md):
package_data=package_data,
include_package_data=True,
install_requires=DEPENDENCIES,
distclass=BinaryDistribution,
license='Apache 2.0',
classifiers=[ # https://pypi.org/pypi?%3Aaction=list_classifiers
'Development Status :: 5 - Production/Stable',
Expand Down