Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
nni
Commits
1d174836
Commit
1d174836
authored
Sep 29, 2018
by
Zejun Lin
Committed by
fishyds
Sep 29, 2018
Browse files
Selectively install through pip (#139)
Selectively install through pip * update setup.py
parent
0619de20
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
13 deletions
+28
-13
setup.py
setup.py
+28
-13
No files found.
setup.py
View file @
1d174836
...
...
@@ -29,9 +29,35 @@ 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
()
subprocess
.
run
([
'make'
,
'pip-install'
],
check
=
True
)
if
self
.
sdk_only
is
None
:
subprocess
.
run
([
'make'
,
'pip-install'
],
check
=
True
)
self
.
install_requires
()
setup
(
name
=
'NNI'
,
...
...
@@ -52,18 +78,7 @@ setup(
},
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment