Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ def __new__(cls, s):
if IS_WINDOWS:
# don't try to import MSVC compiler on non-windows platforms
# as this triggers unnecessary warnings
from distutils.msvccompiler import MSVCCompiler
try:
from distutils._msvccompiler import MSVCCompiler
except:
from distutils.msvccompiler import MSVCCompiler
else:
class MSVCCompiler(object):
# dummy marker class
Expand Down
4 changes: 2 additions & 2 deletions version.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
def call_git_describe(abbrev=4):
try:
p = Popen(['git', 'describe', '--abbrev=%d' % abbrev],
stdout=PIPE, stderr=PIPE)
stdout=PIPE, stderr=PIPE, text=True)
p.stderr.close()
line = p.stdout.readlines()[0]
version = line.strip()
if version[:1] == 'v':
version = version[1:]
return version
return version.replace('-g', '+g')

except:
return None
Expand Down