1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyRuamelYaml(PythonPackage):
"""
a YAML parser/emitter that supports roundtrip preservation of comments,
seq/map flow style, and map key order
"""
homepage = "https://sourceforge.net/p/ruamel-yaml/code/ci/default/tree"
pypi = "ruamel.yaml/ruamel.yaml-0.16.10.tar.gz"
version('0.17.16', sha256='1a771fc92d3823682b7f0893ad56cb5a5c87c48e62b5399d6f42c8759a583b33')
version('0.16.10', sha256='099c644a778bf72ffa00524f78dd0b6476bca94a1da344130f4bf3381ce5b954')
version('0.16.5', sha256='412a6f5cfdc0525dee6a27c08f5415c7fd832a7afcb7a0ed7319628aed23d408')
version('0.11.7', sha256='c89363e16c9eafb9354e55d757723efeff8682d05e56b0881450002ffb00a344')
depends_on('python@2.7:2.8,3.5:', type=('build', 'run'))
depends_on('python@3.5:', when='@0.17:', type=('build', 'run'))
depends_on('py-setuptools', type='build')
depends_on('py-setuptools@28.7:', when='@0.17:', type=('build'))
depends_on('py-ruamel-ordereddict', when='@0.15:^python@:2', type=('build', 'run'))
depends_on('py-ruamel-yaml-clib@0.1.2:', when='@0.16:^python@:3.8', type=('build', 'run'))
@run_after('install')
def fix_import_error(self):
if str(self.spec['python'].version.up_to(1)) == '2':
touch = which('touch')
touch(join_path(python_purelib, 'ruamel', '__init__.py'))
|