Skip to content

Commit

Permalink
Take buildcache and create from upstream/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
gartung committed Oct 23, 2023
1 parent c2d964d commit c99b845
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 49 deletions.
16 changes: 1 addition & 15 deletions lib/spack/spack/cmd/buildcache.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import spack.cmd
import spack.cmd.common.arguments as arguments
import spack.config
import spack.deptypes as dt
import spack.environment as ev
import spack.error
import spack.mirror
Expand All @@ -40,18 +39,6 @@
level = "long"


@arguments.arg
def deptype_default_default_deptype():
return Args(
"--deptype",
action=arguments.DeptypeAction,
metavar="deptype",
default=dt.DEFAULT_TYPES,
help="comma-separated list of deptypes to traverse\ndefault=%s"
% ",".join(dt.DEFAULT_TYPES),
)


def setup_parser(subparser: argparse.ArgumentParser):
setattr(setup_parser, "parser", subparser)
subparsers = subparser.add_subparsers(help="buildcache sub-commands")
Expand Down Expand Up @@ -97,7 +84,7 @@ def setup_parser(subparser: argparse.ArgumentParser):
action="store_true",
help="stop pushing on first failure (default is best effort)",
)
arguments.add_common_arguments(push, ["specs", "deptype_default_default_deptype"])
arguments.add_common_arguments(push, ["specs"])
push.set_defaults(func=push_fn)

install = subparsers.add_parser("install", help=install_fn.__doc__)
Expand Down Expand Up @@ -307,7 +294,6 @@ def push_fn(args: argparse.Namespace):
specs,
root="package" in args.things_to_install,
dependencies="dependencies" in args.things_to_install,
deptype=args.deptype,
)

# When pushing multiple specs, print the url once ahead of time, as well as how
Expand Down
35 changes: 1 addition & 34 deletions lib/spack/spack/cmd/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,20 +342,7 @@ def config_settings(self, spec, prefix):
# FIXME: Add configuration settings to be passed to the build backend
# FIXME: If not needed, delete this function
settings = {}
return settings
def install_options(self, spec, prefix):
# FIXME: Add options to pass to setup.py install
# FIXME: If not needed, delete this function
options = []
return options
def optional_extras(self, spec, prefix):
# FIXME: Add extras to pass to pip install:
# FIXME: pip install ... <path/wheel>[extra,...]
# FIXME: If not needed, delete this function.
extras = []
return extras"""
return settings"""

def __init__(self, name, url, *args, **kwargs):
# If the user provided `--name py-numpy`, don't rename it py-py-numpy
Expand Down Expand Up @@ -491,17 +478,6 @@ class PerlbuildPackageTemplate(PerlmakePackageTemplate):
# depends_on("perl-foo", type=("build", "run"))"""


class PerlinstallPackageTemplate(PerlmakePackageTemplate):
"""Provides appropriate overrides for Perl extensions
that use Module::Install with Makefile.PL"""

dependencies = """\
depends_on("perl-module-install", type="build")
# FIXME: Add additional dependencies if required:
# depends_on("perl-foo", type=("build", "run"))"""


class OctavePackageTemplate(PackageTemplate):
"""Provides appropriate overrides for octave packages"""

Expand Down Expand Up @@ -612,7 +588,6 @@ def __init__(self, name, *args, **kwargs):
"racket": RacketPackageTemplate,
"perlmake": PerlmakePackageTemplate,
"perlbuild": PerlbuildPackageTemplate,
"perlinstall": PerlbuildPackageTemplate,
"octave": OctavePackageTemplate,
"ruby": RubyPackageTemplate,
"makefile": MakefilePackageTemplate,
Expand Down Expand Up @@ -662,13 +637,6 @@ def setup_parser(subparser):
subparser.add_argument(
"-b", "--batch", action="store_true", help="don't ask which versions to checksum"
)
subparser.add_argument(
"--limit",
action="store",
type=int,
default=0,
help="maximum number of versions to checksum (implies --batch)",
)


class BuildSystemGuesser:
Expand Down Expand Up @@ -720,7 +688,6 @@ def __call__(self, stage, url):
(r"/setup\.(py|cfg)$", "python"),
(r"/WORKSPACE$", "bazel"),
(r"/Build\.PL$", "perlbuild"),
(r"/inc/Module/Install\.pm$", "perlinstall"),
(r"/Makefile\.PL$", "perlmake"),
(r"/.*\.gemspec$", "ruby"),
(r"/Rakefile$", "ruby"),
Expand Down

0 comments on commit c99b845

Please sign in to comment.