39
39
class UnsupportedPlatformWarning (Warning ):
40
40
pass
41
41
42
+ version = get_git_version ()
43
+ if isinstance (version , unicode ):
44
+ version = version .encode ('utf-8' )
45
+
42
46
# set this to any true value to enable multithreaded compression
43
47
ENABLE_MULTITHREADING = True
44
48
@@ -97,7 +101,7 @@ def build_extension(self, ext):
97
101
log .info ('adding support for multithreaded compression' )
98
102
ext .define_macros .append (('COMPRESS_MF_MT' , 1 ))
99
103
ext .sources += ('src/sdk/LzFindMt.c' , 'src/sdk/Threads.c' , )
100
-
104
+
101
105
if isinstance (self .compiler , MSVCCompiler ):
102
106
# set flags only available when using MSVC
103
107
ext .extra_link_args .append ('/MANIFEST' )
@@ -107,7 +111,7 @@ def build_extension(self, ext):
107
111
ext .extra_link_args .append ('/DEBUG' )
108
112
else :
109
113
ext .extra_compile_args .append ('/MT' )
110
-
114
+
111
115
_build_ext .build_extension (self , ext )
112
116
113
117
descr = "Python bindings for the LZMA library by Igor Pavlov."
@@ -141,7 +145,7 @@ def build_extension(self, ext):
141
145
142
146
setup (
143
147
name = "pylzma" ,
144
- version = get_git_version (). decode ( 'utf-8' ) ,
148
+ version = version ,
145
149
description = descr ,
146
150
author = "Joachim Bauch" ,
147
151
author_email = "[email protected] " ,
0 commit comments