diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2020-02-17 17:41:30 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-17 17:41:30 -0600 |
commit | 9f89dce52f3094736169d6ff19f870f775e719ff (patch) | |
tree | 9873b6c3acc91527607971b59732cbf72f630a3a /var | |
parent | 1d7fc47672ccdbc8665ed4799bdc854ed35fb74c (diff) | |
download | spack-9f89dce52f3094736169d6ff19f870f775e719ff.tar.gz spack-9f89dce52f3094736169d6ff19f870f775e719ff.tar.bz2 spack-9f89dce52f3094736169d6ff19f870f775e719ff.tar.xz spack-9f89dce52f3094736169d6ff19f870f775e719ff.zip |
Fix mercurial certificate finding, add latest version (#15026)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/mercurial/package.py | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/var/spack/repos/builtin/packages/mercurial/package.py b/var/spack/repos/builtin/packages/mercurial/package.py index f2f398f176..620ef19bdb 100644 --- a/var/spack/repos/builtin/packages/mercurial/package.py +++ b/var/spack/repos/builtin/packages/mercurial/package.py @@ -11,7 +11,7 @@ class Mercurial(PythonPackage): """Mercurial is a free, distributed source control management tool.""" homepage = "https://www.mercurial-scm.org" - url = "https://www.mercurial-scm.org/release/mercurial-5.1.2.tar.gz" + url = "https://www.mercurial-scm.org/release/mercurial-5.3.tar.gz" import_modules = [ 'hgext', 'hgext3rd', 'mercurial', 'hgext.convert', 'hgext.fsmonitor', @@ -20,6 +20,7 @@ class Mercurial(PythonPackage): 'mercurial.httpclient', 'mercurial.pure' ] + version('5.3', sha256='e57ff61d6b67695149dd451922b40aa455ab02e01711806a131a1e95c544f9b9') version('5.1.2', sha256='15af0b090b23649e0e53621a88dde97b55a734d7cb08b77d3df284db70d44e2e') version('5.1.1', sha256='35fc8ba5e0379c1b3affa2757e83fb0509e8ac314cbd9f1fd133cf265d16e49f') version('4.9.1', sha256='1bdd21bb87d1e05fb5cd395d488d0e0cc2f2f90ce0fd248e31a03595da5ccb47') @@ -61,42 +62,42 @@ class Mercurial(PythonPackage): install('hg-ssh.8', prefix.man.man8) # Install completion scripts - contrib = join_path(prefix, 'contrib') + contrib = prefix.contrib mkdir(contrib) with working_dir('contrib'): - install('bash_completion', join_path(contrib, 'bash_completion')) - install('zsh_completion', join_path(contrib, 'zsh_completion')) + install('bash_completion', contrib.bash_completion) + install('zsh_completion', contrib.zsh_completion) @run_after('install') def configure_certificates(self): """Configuration of HTTPS certificate authorities https://www.mercurial-scm.org/wiki/CACertificates""" - etc_dir = join_path(self.prefix.etc, 'mercurial') + etc_dir = self.prefix.etc.mercurial mkdirp(etc_dir) - hgrc_filename = join_path(etc_dir, 'hgrc') + hgrc_filename = etc_dir.hgrc # Use certifi to find the location of the CA certificate print_str = self.spec['python'].package.print_string('certifi.where()') - certificate = python('-c', 'import certifi; ' + print_str) + certificate = python('-c', 'import certifi; ' + print_str, output=str) if not certificate: tty.warn('CA certificate not found. You may not be able to ' 'connect to an HTTPS server. If your CA certificate ' 'is in a non-standard location, you should add it to ' '{0}.'.format(hgrc_filename)) - - # Write the global mercurial configuration file - with open(hgrc_filename, 'w') as hgrc: - hgrc.write('[web]\ncacerts = {0}'.format(certificate)) + else: + # Write the global mercurial configuration file + with open(hgrc_filename, 'w') as hgrc: + hgrc.write('[web]\ncacerts = {0}'.format(certificate)) @run_after('install') @on_package_attributes(run_tests=True) def check_install(self): """Sanity-check setup.""" - hg = Executable(join_path(self.prefix.bin, 'hg')) + hg = Executable(self.prefix.bin.hg) hg('debuginstall') hg('version') |