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
622e3331
Unverified
Commit
622e3331
authored
Dec 09, 2020
by
liuzhe-lz
Committed by
GitHub
Dec 09, 2020
Browse files
improve setup.py (#3164)
Co-authored-by:
liuzhe
<
zhe.liu@microsoft.com
>
parent
2f6a74f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
setup.py
setup.py
+11
-11
No files found.
setup.py
View file @
622e3331
...
@@ -61,7 +61,6 @@ dependencies = [
...
@@ -61,7 +61,6 @@ dependencies = [
'hyperopt==0.1.2'
,
'hyperopt==0.1.2'
,
'json_tricks'
,
'json_tricks'
,
'netifaces'
,
'netifaces'
,
'numpy'
,
'psutil'
,
'psutil'
,
'ruamel.yaml'
,
'ruamel.yaml'
,
'requests'
,
'requests'
,
...
@@ -74,14 +73,12 @@ dependencies = [
...
@@ -74,14 +73,12 @@ dependencies = [
'pkginfo'
,
'pkginfo'
,
'websockets'
,
'websockets'
,
'filelock'
,
'filelock'
,
'prettytable'
'prettytable'
,
'numpy < 1.19.4 ; sys_platform == "win32"'
,
'numpy < 1.20 ; sys_platform != "win32" and python_version < "3.7"'
,
'numpy ; sys.platform != "win32" and python_version >= "3.7"'
]
]
if
sys
.
platform
==
'win32'
:
dependencies
[
dependencies
.
index
(
'numpy'
)]
=
'numpy<1.19.4'
elif
sys
.
version_info
<
(
3
,
7
):
dependencies
[
dependencies
.
index
(
'numpy'
)]
=
'numpy<1.20'
release
=
os
.
environ
.
get
(
'NNI_RELEASE'
)
release
=
os
.
environ
.
get
(
'NNI_RELEASE'
)
def
_setup
():
def
_setup
():
...
@@ -132,7 +129,7 @@ def _setup():
...
@@ -132,7 +129,7 @@ def _setup():
def
_find_python_packages
():
def
_find_python_packages
():
packages
=
[]
packages
=
[]
for
dirpath
,
dirnames
,
filenames
in
os
.
walk
(
'nni'
):
for
dirpath
,
dirnames
,
filenames
in
os
.
walk
(
'nni'
):
if
'/__pycache__'
not
in
dirpath
:
if
'/__pycache__'
not
in
dirpath
and
'/.mypy_cache'
not
in
dirpath
:
packages
.
append
(
dirpath
.
replace
(
'/'
,
'.'
))
packages
.
append
(
dirpath
.
replace
(
'/'
,
'.'
))
return
sorted
(
packages
)
+
[
'nni_node'
]
return
sorted
(
packages
)
+
[
'nni_node'
]
...
@@ -184,14 +181,16 @@ class Build(build):
...
@@ -184,14 +181,16 @@ class Build(build):
class
Develop
(
develop
):
class
Develop
(
develop
):
user_options
=
develop
.
user_options
+
[
user_options
=
develop
.
user_options
+
[
(
'no-user'
,
None
,
'Prevent automatically adding "--user"'
)
(
'no-user'
,
None
,
'Prevent automatically adding "--user"'
),
(
'skip-ts'
,
None
,
'Prevent building TypeScript modules'
)
]
]
boolean_options
=
develop
.
boolean_options
+
[
'no-user'
]
boolean_options
=
develop
.
boolean_options
+
[
'no-user'
,
'skip-ts'
]
def
initialize_options
(
self
):
def
initialize_options
(
self
):
super
().
initialize_options
()
super
().
initialize_options
()
self
.
no_user
=
None
self
.
no_user
=
None
self
.
skip_ts
=
None
def
finalize_options
(
self
):
def
finalize_options
(
self
):
# if `--user` or `--no-user` is explicitly set, do nothing
# if `--user` or `--no-user` is explicitly set, do nothing
...
@@ -201,7 +200,8 @@ class Develop(develop):
...
@@ -201,7 +200,8 @@ class Develop(develop):
super
().
finalize_options
()
super
().
finalize_options
()
def
run
(
self
):
def
run
(
self
):
setup_ts
.
build
(
release
=
None
)
if
not
self
.
skip_ts
:
setup_ts
.
build
(
release
=
None
)
super
().
run
()
super
().
run
()
class
Clean
(
clean
):
class
Clean
(
clean
):
...
...
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