From 4208cf66bea84c8c00c28dbd495c85087be3e49c Mon Sep 17 00:00:00 2001 From: vsoch Date: Fri, 9 Jul 2021 21:32:38 -0600 Subject: `spack style`: automatically bootstrap dependencies This uses our bootstrapping logic to automatically install dependencies for `spack style`. Users should no longer have to pre-install all of the tools (`isort`, `mypy`, `black`, `flake8`). The command will do it for them. - [x] add logic to bootstrap specs with specific version requirements in `spack style` - [x] remove style tools from CI requirements (to ensure we test bootstrapping) - [x] rework dependencies for `mypy` and `py-typed-ast` - `py-typed-ast` needs to be a link dependency - it needs to be at 1.4.1 or higher to work with python 3.9 Signed-off-by: vsoch --- var/spack/repos/builtin/packages/py-mypy/package.py | 6 +++--- var/spack/repos/builtin/packages/py-typed-ast/package.py | 6 +++++- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'var') diff --git a/var/spack/repos/builtin/packages/py-mypy/package.py b/var/spack/repos/builtin/packages/py-mypy/package.py index a5d2cc15e3..1725986b4f 100644 --- a/var/spack/repos/builtin/packages/py-mypy/package.py +++ b/var/spack/repos/builtin/packages/py-mypy/package.py @@ -13,15 +13,15 @@ class PyMypy(PythonPackage): pypi = "mypy/mypy-0.740.tar.gz" version('0.910', sha256='704098302473cb31a218f1775a873b376b30b4c18229421e9e9dc8916fd16150') + version('0.900', sha256='65c78570329c54fb40f956f7645e2359af5da9d8c54baa44f461cdc7f4984108') version('0.800', sha256='e0202e37756ed09daf4b0ba64ad2c245d357659e014c3f51d8cd0681ba66940a') version('0.740', sha256='48c8bc99380575deb39f5d3400ebb6a8a1cb5cc669bbba4d3bb30f904e0a0e7d') variant('python2', default=False, description='Enable checking of python 2 type annotations') - depends_on('python@3.5:', type=('build', 'run')) + depends_on("python@3.5:", type=("build", "run")) depends_on('py-setuptools', type=('build', 'run')) - depends_on('py-typed-ast@1.4.0:1.4.999', when='@0.900:+python2', type=('build', 'run')) - depends_on('py-typed-ast@1.4.0:1.4.999', when='@:899', type=('build', 'run')) + depends_on('py-typed-ast@1.4.0:1.4.999', type=('build', 'run')) depends_on('py-typing-extensions@3.7.4:', type=('build', 'run')) depends_on('py-mypy-extensions@0.4.3:0.4.999', type=('build', 'run')) depends_on('py-toml', when='@0.900:', type=('build', 'run')) diff --git a/var/spack/repos/builtin/packages/py-typed-ast/package.py b/var/spack/repos/builtin/packages/py-typed-ast/package.py index 18a28505a8..2de58678a3 100644 --- a/var/spack/repos/builtin/packages/py-typed-ast/package.py +++ b/var/spack/repos/builtin/packages/py-typed-ast/package.py @@ -12,7 +12,11 @@ class PyTypedAst(PythonPackage): homepage = "https://github.com/python/typed_ast" pypi = "typed-ast/typed_ast-1.4.0.tar.gz" + version('1.4.3', sha256='fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65') + version('1.4.2', sha256='9fc0b3cb5d1720e7141d103cf4819aea239f7d136acf9ee4a69b047b7986175a') + version('1.4.1', sha256='8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b') version('1.4.0', sha256='66480f95b8167c9c5c5c87f32cf437d585937970f3fc24386f313a4c97b44e34') - depends_on('python@3.3:', type=('build', 'run')) + depends_on('python@3.3:', type=('build', 'link', 'run')) + depends_on('python@:3.8', when="@:1.4.0") # build errors with 3.9 until 1.4.1 depends_on('py-setuptools', type='build') -- cgit v1.2.3-60-g2f50