summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/nasm/package.py6
-rw-r--r--var/spack/repos/builtin/packages/ninja/package.py8
-rw-r--r--var/spack/repos/builtin/packages/perl/package.py2
-rw-r--r--var/spack/repos/builtin/packages/python/package.py23
-rw-r--r--var/spack/repos/builtin/packages/ruby/package.py24
5 files changed, 30 insertions, 33 deletions
diff --git a/var/spack/repos/builtin/packages/nasm/package.py b/var/spack/repos/builtin/packages/nasm/package.py
index 6bfa36a660..b4794eecfb 100644
--- a/var/spack/repos/builtin/packages/nasm/package.py
+++ b/var/spack/repos/builtin/packages/nasm/package.py
@@ -45,7 +45,7 @@ class Nasm(Package):
def configure(self, spec, prefix):
with working_dir(self.stage.source_path, create=True):
if not is_windows:
- configure(['--prefix={0}'.format(self.prefix)])
+ configure(*['--prefix={0}'.format(self.prefix)])
def build(self, spec, prefix):
with working_dir(self.stage.source_path):
@@ -53,11 +53,11 @@ class Nasm(Package):
touch('asm\\warnings.time')
nmake('/f', 'Mkfiles\\msvc.mak')
else:
- make(['V=1'])
+ make(*['V=1'])
def install(self, spec, prefix):
with working_dir(self.stage.source_path):
if is_windows:
pass
else:
- make(['install'])
+ make(*['install'])
diff --git a/var/spack/repos/builtin/packages/ninja/package.py b/var/spack/repos/builtin/packages/ninja/package.py
index d6cc0d59d1..b242d2eeea 100644
--- a/var/spack/repos/builtin/packages/ninja/package.py
+++ b/var/spack/repos/builtin/packages/ninja/package.py
@@ -2,6 +2,7 @@
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+import sys
class Ninja(Package):
@@ -53,9 +54,14 @@ class Ninja(Package):
def install(self, spec, prefix):
mkdir(prefix.bin)
- install('ninja', prefix.bin)
+ name = 'ninja'
+ if sys.platform == 'win32':
+ name = name + '.exe'
+ install(name, prefix.bin)
install_tree('misc', prefix.misc)
+ if sys.platform == "win32":
+ return
# Some distros like Fedora install a 'ninja-build' executable
# instead of 'ninja'. Install both for uniformity.
with working_dir(prefix.bin):
diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py
index 714c7e3a7b..a16bfc95de 100644
--- a/var/spack/repos/builtin/packages/perl/package.py
+++ b/var/spack/repos/builtin/packages/perl/package.py
@@ -194,7 +194,7 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package
args.append('CCTYPE=%s' % self.compiler.msvc_version)
else:
raise RuntimeError("Perl unsupported for non MSVC compilers on Windows")
- args.append('INST_TOP="%s"' % self.prefix.replace('/', '\\'))
+ args.append('INST_TOP=%s' % self.prefix.replace('/', '\\'))
args.append("INST_ARCH=\\$(ARCHNAME)")
if self.spec.satisfies('~shared'):
args.append("ALL_STATIC=%s" % "define")
diff --git a/var/spack/repos/builtin/packages/python/package.py b/var/spack/repos/builtin/packages/python/package.py
index cd67ac4dc3..0e38a56325 100644
--- a/var/spack/repos/builtin/packages/python/package.py
+++ b/var/spack/repos/builtin/packages/python/package.py
@@ -846,9 +846,13 @@ class Python(Package):
# in that order if using python@3.6.5, for example.
version = self.spec.version
for ver in [version.up_to(2), version.up_to(1), '']:
- path = os.path.join(self.prefix.bin, 'python{0}'.format(ver))
+ if sys.platform != "win32":
+ path = os.path.join(self.prefix.bin, 'python{0}'.format(ver))
+ else:
+ path = os.path.join(self.prefix, 'python{0}.exe'.format(ver))
if os.path.exists(path):
return Executable(path)
+
else:
msg = 'Unable to locate {0} command in {1}'
raise RuntimeError(msg.format(self.name, self.prefix.bin))
@@ -892,21 +896,6 @@ class Python(Package):
Returns:
dict: variable definitions
"""
- # Some values set by sysconfig may not always exist on Windows, so
- # compute Windows alternatives
- def repair_win_sysconf(conf):
- if is_windows:
- conf["LIBDIR"] = os.path.join(conf["LIBDEST"], "..", "libs")
- conf["LIBPL"] = conf["LIBDIR"]
- conf["PYTHONFRAMEWORKPREFIX"] = ""
- conf["LDLIBRARY"] = "python" + conf["VERSION"] + ".dll"
- conf["LIBRARY"] = "python" + conf["VERSION"] + ".lib"
- conf["CC"] = ""
- conf["CXX"] = ""
- conf["LDSHARED"] = ""
- conf["LDCXXSHARED"] = ""
-
- return conf
# TODO: distutils is deprecated in Python 3.10 and will be removed in
# Python 3.12, find a different way to access this information.
@@ -976,7 +965,7 @@ config.update(get_paths())
config.update(json.loads(self.command('-c', cmd, output=str)))
except (ProcessError, RuntimeError):
pass
- self._config_vars[dag_hash] = repair_win_sysconf(config)
+ self._config_vars[dag_hash] = config
return self._config_vars[dag_hash]
def get_sysconfigdata_name(self):
diff --git a/var/spack/repos/builtin/packages/ruby/package.py b/var/spack/repos/builtin/packages/ruby/package.py
index b4ca1afaff..9d83c7b66b 100644
--- a/var/spack/repos/builtin/packages/ruby/package.py
+++ b/var/spack/repos/builtin/packages/ruby/package.py
@@ -46,7 +46,9 @@ class Ruby(Package):
depends_on('openssl@:1.0', when='@:2.3')
extendable = True
- phases = ['autoreconf', 'configure', 'build', 'install']
+ phases = ['configure', 'build', 'install']
+ build_targets = []
+ install_targets = ['install']
# Known build issues when Avira antivirus software is running:
# https://github.com/rvm/rvm/issues/4313#issuecomment-374020379
# TODO: add check for this and warn user
@@ -120,17 +122,17 @@ class Ruby(Package):
module.rake = Executable(self.prefix.bin.rake)
def configure(self, spec, prefix):
- with working_dir(self.build_directory, create=True):
- if is_windows:
- Executable("win32\\configure.bat", "--prefix=%s" % self.prefix)
- else:
- options = getattr(self, 'configure_flag_args', [])
- options += ['--prefix={0}'.format(prefix)]
- options += self.configure_args()
- configure(*options)
+ with working_dir(self.stage.source_path, create=True):
+ # if is_windows:
+ Executable("win32\\configure.bat")("--prefix=%s" % self.prefix)
+ # else:
+ # options = getattr(self, 'configure_flag_args', [])
+ # options += ['--prefix={0}'.format(prefix)]
+ # options += self.configure_args()
+ # configure(*options)
def build(self, spec, prefix):
- with working_dir(self.build_directory):
+ with working_dir(self.stage.source_path):
if is_windows:
nmake()
else:
@@ -139,7 +141,7 @@ class Ruby(Package):
make(*params)
def install(self, spec, prefix):
- with working_dir(self.build_directory):
+ with working_dir(self.stage.source_path):
if is_windows:
nmake('install')
else: