spack/var/spack/repos/spack_repo/builtin/packages/cjson/package.py
Harmen Stoppels b932c14008
builtin: use api v2.0 and update dir structure (#49275)
* Bump the package API of the `builtin` repo to `v2.0`
* Move `var/spack/repos/builtin` -> `var/spack/repos/spack_repo/builtin`
* Move test repos `var/spack/repos/{builtin.mock,tutorial,...}` -> `var/spack/test_repos/`
* Update package dir names to v2 format (`-` -> `_` etc)
* Change absolute imports `from spack.pkg.builtin.my_pkg ...` to relative imports `from ..my_pkg.package ...`

Users who have a repo on top of builtin should change imports from

```python
from spack.pkg.builtin.my_pkg import MyPkg
```

to

```python
from spack_repo.builtin.packages.my_pkg.package import MyPkg
```

and can configure their editors with

```
PYTHONPATH=$spack/lib/spack:$spack/var/spack/repos
```

[skip-verify-checksums]
2025-05-06 12:05:44 +02:00

20 lines
719 B
Python

# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Cjson(CMakePackage):
"""Ultralightweight JSON parser in ANSI C."""
homepage = "https://github.com/DaveGamble/cJSON"
git = "https://github.com/DaveGamble/cJSON"
url = "https://github.com/DaveGamble/cJSON/archive/refs/tags/v1.7.15.zip"
license("MIT")
version("1.7.18", sha256="cc6d93cc3b659037c34193ecc7be5a874a18c2ac67b24efe82db6a759b486b5d")
version("1.7.17", sha256="51f3b07aece8d1786e74b951fd92556506586cb36670741b6bfb79bf5d484216")
version("1.7.15", sha256="c55519316d940757ef93a779f1db1ca809dbf979c551861f339d35aaea1c907c")