Debian Codegraph @

ansible_collections/community/hrobot/noxfile.py

raw
1 # Copyright (c) Ansible Project
2 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
3 # SPDX-License-Identifier: GPL-3.0-or-later
4
5 # The following metadata allows Python runners and nox to install the required
6 # dependencies for running this Python script:
7 #
8 # /// script
9 # dependencies = ["nox>=2025.02.09", "antsibull-nox"]
10 # ///
11
12 import sys
13
14 import nox
15
16
17 # We try to import antsibull-nox, and if that doesn't work, provide a more useful
18 # error message to the user.
19 try:
20 import antsibull_nox
21 except ImportError:
22 print("You need to install antsibull-nox in the same Python environment as nox.")
23 sys.exit(1)
24
25
26 antsibull_nox.load_antsibull_nox_toml()
27
28
29 # Allow to run the noxfile with `python noxfile.py`, `pipx run noxfile.py`, or similar.
30 # Requires nox >= 2025.02.09
31 if __name__ == "__main__":
32 nox.main()