Debian Codegraph @

ansible_collections/community/crypto/noxfile.py

raw
1 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
2 # SPDX-License-Identifier: GPL-3.0-or-later
3 # SPDX-FileCopyrightText: 2025 Felix Fontein <[email protected]>
4
5 # /// script
6 # dependencies = ["nox>=2025.02.09", "antsibull-nox"]
7 # ///
8
9 import sys
10
11 import nox
12
13 try:
14 import antsibull_nox
15 except ImportError:
16 print("You need to install antsibull-nox in the same Python environment as nox.")
17 sys.exit(1)
18
19
20 antsibull_nox.load_antsibull_nox_toml()
21
22
23 @nox.session(name="create-certificates", default=False)
24 def create_certificates(session: nox.Session) -> None:
25 """
26 Regenerate some vendored certificates.
27 """
28 session.install("cryptography<39.0.0") # we want support for SHA1 signatures
29 session.run("python", "tests/create-certificates.py")
30 session.warn(
31 "Note that you need to modify some values in tests/integration/targets/x509_certificate_info/tasks/impl.yml"
32 " and tests/integration/targets/filter_x509_certificate_info/tasks/impl.yml!"
33 )
34
35
36 # Allow to run the noxfile with `python noxfile.py`, `pipx run noxfile.py`, or similar.
37 # Requires nox >= 2025.02.09
38 if __name__ == "__main__":
39 nox.main()