summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/boost
diff options
context:
space:
mode:
authorAbhik Sarkar <62109745+asarkar-parsys@users.noreply.github.com>2022-03-17 16:42:07 -0700
committerGitHub <noreply@github.com>2022-03-17 17:42:07 -0600
commit0ce8b9d3983acaf2469b3b10af8bd1b72798026b (patch)
tree080b8498f9bbe8777be3279dd3a6a385b3396adb /var/spack/repos/builtin/packages/boost
parentf8f4aafe8134a859c751ea6a7698aa936eed48a6 (diff)
downloadspack-0ce8b9d3983acaf2469b3b10af8bd1b72798026b.tar.gz
spack-0ce8b9d3983acaf2469b3b10af8bd1b72798026b.tar.bz2
spack-0ce8b9d3983acaf2469b3b10af8bd1b72798026b.tar.xz
spack-0ce8b9d3983acaf2469b3b10af8bd1b72798026b.zip
Make boost minimal and composable (Original PR#22303) (#28623)
* Make boost composable Currently Boost enables a few components through variants by default, which means that if you want to use only what you need and no more, you have to explicitly disable these variants, leading to concretization errors whenever a second package explicitly needs those components. For instance if package A only needs `+component_a` it might depend on `boost +component_a ~component_b`. And if packge B only needs `+component_b` it might depend on `boost ~component_a +component_b`. If package C now depends on both A and B, this leads to unsatisfiable variants and hence a concretization error. However, if we default to disabling all components, package A can simply depend on `boost +component_a` and package B on `boost +component_b` and package C will concretize to depending on `boost +component_a +component_b`, and whatever you install, you get the bare minimum. * Fix style * Added composable boost dependencies for folly * fixing akantu merge issue * hpctoolkit boost dependencies already defined * Fix Styles * Fixup style once more * Adding isort fix * isort one more time * Fix for package audit issue Co-authored-by: Harmen Stoppels <harmenstoppels@gmail.com> Co-authored-by: Ryan O'Malley <rd.omalley@comcast.net>
Diffstat (limited to 'var/spack/repos/builtin/packages/boost')
-rw-r--r--var/spack/repos/builtin/packages/boost/package.py58
1 files changed, 33 insertions, 25 deletions
diff --git a/var/spack/repos/builtin/packages/boost/package.py b/var/spack/repos/builtin/packages/boost/package.py
index 39d9b1d991..d84695418e 100644
--- a/var/spack/repos/builtin/packages/boost/package.py
+++ b/var/spack/repos/builtin/packages/boost/package.py
@@ -79,26 +79,10 @@ class Boost(Package):
version('1.34.1', sha256='0f866c75b025a4f1340117a106595cc0675f48ba1e5a9b5c221ec7f19e96ec4c')
version('1.34.0', sha256='455cb8fa41b759272768257c2e7bdc5c47ec113245dfa533f275e787a855efd2')
- default_install_libs = set(['atomic',
- 'chrono',
- 'date_time',
- 'exception',
- 'filesystem',
- 'graph',
- 'iostreams',
- 'locale',
- 'log',
- 'math',
- 'program_options',
- 'random',
- 'regex',
- 'serialization',
- 'signals',
- 'system',
- 'test',
- 'thread',
- 'timer',
- 'wave'])
+ with_default_variants = ("boost+atomic+chrono+date_time+exception+filesystem"
+ "+graph+iostreams+locale+log+math+program_options"
+ "+random+regex+serialization+signals+system+test"
+ "+thread+timer+wave")
# mpi/python are not installed by default because they pull in many
# dependencies and/or because there is a great deal of customization
@@ -107,13 +91,37 @@ class Boost(Package):
# Boost.Container can be both header-only and compiled. '+container'
# indicates the compiled version which requires Extended Allocator
# support. The header-only library is installed when no variant is given.
- default_noinstall_libs\
- = set(['container', 'context', 'coroutine', 'fiber', 'mpi', 'python'])
-
- all_libs = default_install_libs | default_noinstall_libs
+ all_libs = [
+ 'atomic',
+ 'chrono',
+ 'container',
+ 'context',
+ 'coroutine',
+ 'date_time',
+ 'exception',
+ 'fiber',
+ 'filesystem',
+ 'graph',
+ 'iostreams',
+ 'locale',
+ 'log',
+ 'math',
+ 'mpi',
+ 'program_options',
+ 'python',
+ 'random',
+ 'regex',
+ 'serialization',
+ 'signals',
+ 'system',
+ 'test',
+ 'thread',
+ 'timer',
+ 'wave'
+ ]
for lib in all_libs:
- variant(lib, default=(lib not in default_noinstall_libs),
+ variant(lib, default=False,
description="Compile with {0} library".format(lib))
@property