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
MMCV
Commits
11ad40b5
Commit
11ad40b5
authored
Apr 22, 2019
by
Gu Wang
Browse files
fix possible encoding error when install
parent
d99c6f8d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
setup.py
setup.py
+4
-2
No files found.
setup.py
View file @
11ad40b5
import
sys
import
sys
from
io
import
open
# for Python 2 (identical to builtin in Python 3)
from
setuptools
import
find_packages
,
setup
from
setuptools
import
find_packages
,
setup
install_requires
=
[
install_requires
=
[
...
@@ -11,14 +13,14 @@ if sys.version_info < (3, 4):
...
@@ -11,14 +13,14 @@ if sys.version_info < (3, 4):
def
readme
():
def
readme
():
with
open
(
'README.rst'
)
as
f
:
with
open
(
'README.rst'
,
encoding
=
'utf-8'
)
as
f
:
content
=
f
.
read
()
content
=
f
.
read
()
return
content
return
content
def
get_version
():
def
get_version
():
version_file
=
'mmcv/version.py'
version_file
=
'mmcv/version.py'
with
open
(
version_file
,
'r'
)
as
f
:
with
open
(
version_file
,
'r'
,
encoding
=
'utf-8'
)
as
f
:
exec
(
compile
(
f
.
read
(),
version_file
,
'exec'
))
exec
(
compile
(
f
.
read
(),
version_file
,
'exec'
))
return
locals
()[
'__version__'
]
return
locals
()[
'__version__'
]
...
...
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