Update pip package metadata (setup.py)
This commit is contained in:
Родитель
b709af397b
Коммит
966f7ad3f7
5
Makefile
5
Makefile
|
@ -1428,6 +1428,7 @@ $(info Building Python package)
|
|||
PYTHON_LIBS_LIST := $(LIBS_LIST) $(IMAGEREADER_LIBS_LIST)
|
||||
PYTHON_LIBS_EXCLUDE_LIST := m pthread nvidia-ml
|
||||
PYTHON_SETUP_PY_ARGS :=
|
||||
PYTHON_PROJECT_NAME:=cntk
|
||||
ifndef PYTHON_WITH_DEPS
|
||||
PYTHON_LIBS_EXCLUDE_LIST += cublas cudart curand cusparse cuda cudnn opencv_core opencv_imgproc opencv_imgcodecs mklml_intel mkldnn iomp5 nccl
|
||||
else
|
||||
|
@ -1438,6 +1439,10 @@ ifdef PYTHON_WITH_DEBUG
|
|||
$(warning Building Python packages WITH debug symbols)
|
||||
PYTHON_SETUP_PY_ARGS += --with-debug-symbol
|
||||
endif
|
||||
ifeq ("$(DEVICE)","gpu")
|
||||
PYTHON_PROJECT_NAME:=cntk-gpu
|
||||
endif
|
||||
PYTHON_SETUP_PY_ARGS += --project-name $(PYTHON_PROJECT_NAME)
|
||||
PYTHON_EXTRA_LIBS_BASENAMES:=$(addsuffix .so,$(addprefix lib,$(filter-out $(PYTHON_LIBS_EXCLUDE_LIST),$(PYTHON_LIBS_LIST))))
|
||||
|
||||
# TODO dependencies
|
||||
|
|
|
@ -141,6 +141,13 @@ else:
|
|||
if not exclude:
|
||||
CNTK_EXTRA_LIBRARIES.append(fn)
|
||||
|
||||
project_name = 'cntk'
|
||||
if '--project-name' in sys.argv:
|
||||
project_name_idx = sys.argv.index('--project-name')
|
||||
project_name = sys.argv[project_name_idx + 1]
|
||||
sys.argv.remove('--project-name')
|
||||
sys.argv.pop(project_name_idx)
|
||||
|
||||
WITH_DEBUG_SYMBOL=False
|
||||
LINKER_DEBUG_ARG=''
|
||||
if "--with-debug-symbol" in sys.argv:
|
||||
|
@ -249,9 +256,32 @@ cntk_install_requires = [
|
|||
if IS_PY2:
|
||||
cntk_install_requires.append('enum34>=1.1.6')
|
||||
|
||||
setup(name="cntk",
|
||||
setup(name=project_name,
|
||||
version=os.environ['CNTK_VERSION'],
|
||||
url="http://cntk.ai",
|
||||
description = 'CNTK is an open-source, commercial-grade deep learning framework.',
|
||||
author = 'Microsoft Corporation',
|
||||
author_email = 'ai-opensource@microsoft.com',
|
||||
license='MIT',
|
||||
keywords = 'cntk cognitivetoolkit deeplearning tensor',
|
||||
classifiers = [
|
||||
'Development Status :: 5 - Production/Stable',
|
||||
'License :: OSI Approved :: MIT License',
|
||||
'Intended Audience :: Developers',
|
||||
'Intended Audience :: Education',
|
||||
'Intended Audience :: Science/Research',
|
||||
'Programming Language :: Python :: 2',
|
||||
'Programming Language :: Python :: 2.7',
|
||||
'Programming Language :: Python :: 3',
|
||||
'Programming Language :: Python :: 3.5',
|
||||
'Programming Language :: Python :: 3.6',
|
||||
'Topic :: Scientific/Engineering',
|
||||
'Topic :: Scientific/Engineering :: Mathematics',
|
||||
'Topic :: Scientific/Engineering :: Artificial Intelligence',
|
||||
'Topic :: Software Development',
|
||||
'Topic :: Software Development :: Libraries',
|
||||
'Topic :: Software Development :: Libraries :: Python Modules',
|
||||
],
|
||||
ext_modules=[cntk_module],
|
||||
packages=packages,
|
||||
install_requires=cntk_install_requires,
|
||||
|
|
|
@ -119,6 +119,11 @@ if /i %p_GpuBuild% equ true for %%D in (
|
|||
set CNTK_LIBRARIES=!CNTK_LIBRARIES!;%CNTK_LIB_PATH%\%%D
|
||||
)
|
||||
|
||||
set PYTHON_PROJECT_NAME=cntk
|
||||
if /i %p_GpuBuild% equ true (
|
||||
set PYTHON_PROJECT_NAME=cntk-gpu
|
||||
)
|
||||
|
||||
popd
|
||||
if errorlevel 1 echo Cannot restore directory.&exit /b 1
|
||||
|
||||
|
@ -128,7 +133,7 @@ for %%p in (%p_CNTK_PY_VERSIONS%) do (
|
|||
call set extraPath=!p_CNTK_PY%%~p_PATH!
|
||||
echo Building for Python version '%%~p', extra path is !extraPath!
|
||||
set PATH=!extraPath!;!oldPath!
|
||||
python.exe .\setup.py ^
|
||||
python.exe .\setup.py --project-name %PYTHON_PROJECT_NAME% ^
|
||||
build_ext --inplace --force --compiler msvc --plat-name=win-amd64 ^
|
||||
bdist_wheel --dist-dir "%DIST_DIR%"
|
||||
if errorlevel 1 exit /b 1
|
||||
|
|
Загрузка…
Ссылка в новой задаче