File tree 1 file changed +16
-1
lines changed
1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 17
17
18
18
import setuptools
19
19
20
+ # Disable version normalization performed by setuptools.setup()
21
+ # Including this workaround for Python2.7 support
22
+ try :
23
+ # Try the approach of using sic(), added in setuptools 46.1.0
24
+ from setuptools import sic
25
+ except ImportError :
26
+ # Try the approach of replacing packaging.version.Version
27
+ sic = lambda v : v
28
+ try :
29
+ # setuptools >=39.0.0 uses packaging from setuptools.extern
30
+ from setuptools .extern import packaging
31
+ except ImportError :
32
+ # setuptools <39.0.0 uses packaging from pkg_resources.extern
33
+ from pkg_resources .extern import packaging
34
+ packaging .version .Version = packaging .version .LegacyVersion
20
35
21
36
# Package metadata.
22
37
74
89
75
90
setuptools .setup (
76
91
name = name ,
77
- version = version ,
92
+ version = sic ( version ) ,
78
93
description = description ,
79
94
long_description = readme ,
80
95
author = "Google LLC" ,
You can’t perform that action at this time.
0 commit comments