equal
deleted
inserted
replaced
165 DistutilsError, |
165 DistutilsError, |
166 DistutilsExecError, |
166 DistutilsExecError, |
167 ) |
167 ) |
168 from distutils.sysconfig import get_python_inc, get_config_var |
168 from distutils.sysconfig import get_python_inc, get_config_var |
169 from distutils.version import StrictVersion |
169 from distutils.version import StrictVersion |
|
170 |
|
171 # Explain to distutils.StrictVersion how our release candidates are versionned |
|
172 StrictVersion.version_re = re.compile(r'^(\d+)\.(\d+)(\.(\d+))?-?(rc(\d+))?$') |
170 |
173 |
171 def write_if_changed(path, content): |
174 def write_if_changed(path, content): |
172 """Write content to a file iff the content hasn't changed.""" |
175 """Write content to a file iff the content hasn't changed.""" |
173 if os.path.exists(path): |
176 if os.path.exists(path): |
174 with open(path, 'rb') as fh: |
177 with open(path, 'rb') as fh: |