comparison setup.py @ 48539:23ce9e7bf1e5

setup.py: fix some documentation typos Differential Revision: https://phab.mercurial-scm.org/D11944
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 18 Dec 2021 20:56:52 -0500
parents fff5942d445f
children 6cfa30681a1d
comparison
equal deleted inserted replaced
48538:4afb9627dc77 48539:23ce9e7bf1e5
207 DistutilsExecError, 207 DistutilsExecError,
208 ) 208 )
209 from distutils.sysconfig import get_python_inc, get_config_var 209 from distutils.sysconfig import get_python_inc, get_config_var
210 from distutils.version import StrictVersion 210 from distutils.version import StrictVersion
211 211
212 # Explain to distutils.StrictVersion how our release candidates are versionned 212 # Explain to distutils.StrictVersion how our release candidates are versioned
213 StrictVersion.version_re = re.compile(r'^(\d+)\.(\d+)(\.(\d+))?-?(rc(\d+))?$') 213 StrictVersion.version_re = re.compile(r'^(\d+)\.(\d+)(\.(\d+))?-?(rc(\d+))?$')
214 214
215 215
216 def write_if_changed(path, content): 216 def write_if_changed(path, content):
217 """Write content to a file iff the content hasn't changed.""" 217 """Write content to a file iff the content hasn't changed."""
595 if not self.zstd: 595 if not self.zstd:
596 self.extensions = [ 596 self.extensions = [
597 e for e in self.extensions if e.name != 'mercurial.zstd' 597 e for e in self.extensions if e.name != 'mercurial.zstd'
598 ] 598 ]
599 599
600 # Build Rust standalon extensions if it'll be used 600 # Build Rust standalone extensions if it'll be used
601 # and its build is not explictely disabled (for external build 601 # and its build is not explicitly disabled (for external build
602 # as Linux distributions would do) 602 # as Linux distributions would do)
603 if self.distribution.rust and self.rust: 603 if self.distribution.rust and self.rust:
604 if not sys.platform.startswith('linux'): 604 if not sys.platform.startswith('linux'):
605 self.warn( 605 self.warn(
606 "rust extensions have only been tested on Linux " 606 "rust extensions have only been tested on Linux "
1500 except OSError as exc: 1500 except OSError as exc:
1501 if exc.errno == errno.ENOENT: 1501 if exc.errno == errno.ENOENT:
1502 raise RustCompilationError("Cargo not found") 1502 raise RustCompilationError("Cargo not found")
1503 elif exc.errno == errno.EACCES: 1503 elif exc.errno == errno.EACCES:
1504 raise RustCompilationError( 1504 raise RustCompilationError(
1505 "Cargo found, but permisssion to execute it is denied" 1505 "Cargo found, but permission to execute it is denied"
1506 ) 1506 )
1507 else: 1507 else:
1508 raise 1508 raise
1509 except subprocess.CalledProcessError: 1509 except subprocess.CalledProcessError:
1510 raise RustCompilationError( 1510 raise RustCompilationError(