-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.py
More file actions
executable file
·26 lines (21 loc) · 827 Bytes
/
Copy pathsetup.py
File metadata and controls
executable file
·26 lines (21 loc) · 827 Bytes
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
#!/usr/bin/env python
# Copyright cocotb contributors
# Licensed under the Revised BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-3-Clause
from __future__ import annotations
import os
import sys
from setuptools import setup
with open("VERSION") as f:
version = f.read().strip()
max_python3_minor_version = 14
if "COCOTB_IGNORE_PYTHON_REQUIRES" not in os.environ and sys.version_info >= (
3,
max_python3_minor_version + 1,
):
raise RuntimeError(
f"cocotb {version} only supports a maximum Python version of 3.{max_python3_minor_version}.\n"
"You can suppress this error by defining the environment variable COCOTB_IGNORE_PYTHON_REQUIRES\n"
"There is no guarantee cocotb will work with untested versions of Python and no support will be provided."
)
setup()