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

Updates python setup.py for recent license changes #14778

Merged
merged 2 commits into from
Apr 25, 2019
Merged
Show file tree
Hide file tree
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
17 changes: 5 additions & 12 deletions tools/pip/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,8 @@ def has_ext_modules(self):
shutil.copy(LIB_PATH[0], os.path.join(CURRENT_DIR, 'mxnet'))

# copy license and notice
shutil.copy(os.path.join(CURRENT_DIR, 'mxnet-build/LICENSE'),
os.path.join(CURRENT_DIR, 'mxnet/LICENSE'))
shutil.copy(os.path.join(CURRENT_DIR, 'mxnet-build/DISCLAIMER'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not currently add this DISCLAIMER. Can you add it to the build similarly to https://github.com/apache/incubator-mxnet/pull/14726/files#diff-2c9b07f53d24caa1ac38f1eb9c371118R70?

os.path.join(CURRENT_DIR, 'mxnet/DISCLAIMER'))
shutil.copy(os.path.join(CURRENT_DIR, 'mxnet-build/NOTICE'),
os.path.join(CURRENT_DIR, 'mxnet/NOTICE'))
shutil.copytree(os.path.join(CURRENT_DIR, 'mxnet-build/licenses'),
os.path.join(CURRENT_DIR, 'mxnet/licenses'))

# copy tools to mxnet package
shutil.rmtree(os.path.join(CURRENT_DIR, 'mxnet/tools'), ignore_errors=True)
Expand Down Expand Up @@ -154,20 +150,17 @@ def has_ext_modules(self):
package_data['mxnet'].append('mxnet/libmklml_intel.so')
package_data['mxnet'].append('mxnet/libiomp5.so')
package_data['mxnet'].append('mxnet/libmkldnn.so.0')
shutil.copy(os.path.join(os.path.dirname(LIB_PATH[0]), '../MKLML_LICENSE'), os.path.join(CURRENT_DIR, 'mxnet'))
shutil.copytree(os.path.join(CURRENT_DIR, 'mxnet-build/3rdparty/mkldnn/include'),
os.path.join(CURRENT_DIR, 'mxnet/include/mkldnn'))
package_data['mxnet'].append('mxnet/MKLML_LICENSE')
if platform.system() == 'Linux':
shutil.copy(os.path.join(os.path.dirname(LIB_PATH[0]), 'libgfortran.so.3'), os.path.join(CURRENT_DIR, 'mxnet'))
package_data['mxnet'].append('mxnet/libgfortran.so.3')
shutil.copy(os.path.join(os.path.dirname(LIB_PATH[0]), 'libquadmath.so.0'), os.path.join(CURRENT_DIR, 'mxnet'))
package_data['mxnet'].append('mxnet/libquadmath.so.0')

# copy licenses
if variant.startswith('CU'):
shutil.copy(os.path.join(os.path.dirname(LIB_PATH[0]), '../CUB_LICENSE'), os.path.join(CURRENT_DIR, 'mxnet'))
package_data['mxnet'].append('mxnet/CUB_LICENSE')
# Copy licenses and notice
for f in os.listdir('mxnet/licenses'):
package_data['mxnet'].append('mxnet/licenses/{}'.format(f))

from mxnet.base import _generate_op_module_signature
from mxnet.ndarray.register import _generate_ndarray_function_code
Expand Down
1 change: 1 addition & 0 deletions tools/staticbuild/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ mkdir -p licenses
cp tools/dependencies/LICENSE.binary.dependencies licenses/
cp NOTICE licenses/
cp LICENSE licenses/
cp DISCLAIMER licenses/


# Build mxnet
Expand Down