Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
one
spconv
Commits
75b46f90
Commit
75b46f90
authored
May 28, 2020
by
yanyan
Browse files
another fix of version string parse
parent
c0f7284c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
setup.py
setup.py
+4
-1
No files found.
setup.py
View file @
75b46f90
...
@@ -19,7 +19,10 @@ SPCONV_FORCE_BUILD_CUDA = os.getenv("SPCONV_FORCE_BUILD_CUDA")
...
@@ -19,7 +19,10 @@ SPCONV_FORCE_BUILD_CUDA = os.getenv("SPCONV_FORCE_BUILD_CUDA")
PYTHON_VERSION
=
"{}.{}"
.
format
(
sys
.
version_info
.
major
,
sys
.
version_info
.
minor
)
PYTHON_VERSION
=
"{}.{}"
.
format
(
sys
.
version_info
.
major
,
sys
.
version_info
.
minor
)
PYTORCH_VERSION
=
torch
.
__version__
[:
torch
.
__version__
.
find
(
"+"
)]
remove_plus
=
torch
.
__version__
.
find
(
"+"
)
PYTORCH_VERSION
=
torch
.
__version__
if
remove_plus
!=
-
1
:
PYTORCH_VERSION
=
torch
.
__version__
[:
remove_plus
]
PYTORCH_VERSION
=
list
(
map
(
int
,
PYTORCH_VERSION
.
split
(
"."
)))
PYTORCH_VERSION
=
list
(
map
(
int
,
PYTORCH_VERSION
.
split
(
"."
)))
PYTORCH_VERSION_NUMBER
=
PYTORCH_VERSION
[
0
]
*
10000
+
PYTORCH_VERSION
[
1
]
*
100
+
PYTORCH_VERSION
[
2
]
PYTORCH_VERSION_NUMBER
=
PYTORCH_VERSION
[
0
]
*
10000
+
PYTORCH_VERSION
[
1
]
*
100
+
PYTORCH_VERSION
[
2
]
...
...
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