mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 16:37:27 +00:00
...
This commit is contained in:
parent
c72963dfc5
commit
d260c0a679
1 changed files with 5 additions and 4 deletions
9
setup.py
9
setup.py
|
|
@ -28,10 +28,11 @@ from glfw.glfw import ISA, BinaryArch, Command, CompileKey, CompilerType
|
|||
src_base = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
def check_version_info() -> None:
|
||||
import tomllib
|
||||
with open(os.path.join(src_base, 'pyproject.toml'), 'rb') as f:
|
||||
m = tomllib.load(f)
|
||||
minver = m['project']['requires-python']
|
||||
with open(os.path.join(src_base, 'pyproject.toml')) as f:
|
||||
raw = f.read()
|
||||
m = re.search(r'''^requires-python\s*=\s*['"](.+?)['"]''', raw, flags=re.MULTILINE)
|
||||
assert m is not None
|
||||
minver = m.group(1)
|
||||
match = re.match(r'(>=?)(\d+)\.(\d+)', minver)
|
||||
assert match is not None
|
||||
q = int(match.group(2)), int(match.group(3))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue