File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 1717
1818import setuptools
1919
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
2035
2136# Package metadata.
2237
7489
7590setuptools .setup (
7691 name = name ,
77- version = version ,
92+ version = sic ( version ) ,
7893 description = description ,
7994 long_description = readme ,
8095 author = "Google LLC" ,
You can’t perform that action at this time.
0 commit comments