Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Revert "Selectively install through pip (#139)" due to potential pip install issue #142

Merged
merged 3 commits into from
Sep 29, 2018
Merged
Changes from 1 commit
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
41 changes: 13 additions & 28 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,9 @@ def read(fname):

class CustomInstallCommand(install):
'''a customized install class in pip module'''
user_options = install.user_options + [
('sdk-only', None, '<add --sdk-only if you want to only install nni sdk')
]

def initialize_options(self):
install.initialize_options(self)
self.sdk_only = None

def install_requires(self):
self.install_requires_list = [
'astor',
'hyperopt',
'json_tricks',
'numpy',
'psutil',
'pyyaml',
'requests',
'scipy',
'schema',
'pyhdfs'
]
for pkg in self.install_requires_list:
subprocess.run(['python3', '-m', 'pip', 'install', pkg], check=True)

def run(self):
super().run()
if self.sdk_only is None:
subprocess.run(['make', 'pip-install'], check=True)
self.install_requires()
subprocess.run(['make', 'pip-install'], check=True)

setup(
name = 'NNI',
Expand All @@ -78,7 +52,18 @@ def run(self):
},
package_data = {'nni': ['**/requirements.txt']},
python_requires = '>=3.5',

install_requires = [
'astor',
'hyperopt',
'json_tricks',
'numpy',
'psutil',
'pyyaml',
'requests',
'scipy',
'schema',
'pyhdfs'
],

cmdclass={
'install': CustomInstallCommand
Expand Down