Commit bdccf8df authored by Tom Niget's avatar Tom Niget

Use current Python version for build flag

parent 47c8827c
...@@ -7,6 +7,7 @@ typon in.py [-o out.py] [-v] ...@@ -7,6 +7,7 @@ typon in.py [-o out.py] [-v]
import argparse import argparse
import logging import logging
import os
from pathlib import Path from pathlib import Path
import sys import sys
...@@ -50,9 +51,11 @@ def main(): ...@@ -50,9 +51,11 @@ def main():
pybind11.commands.get_include() pybind11.commands.get_include()
] ]
include_dirs = list(dict.fromkeys(include_dirs)) include_dirs = list(dict.fromkeys(include_dirs))
# get python major and minor version
python_version = sys.version_info
cpp_flags = [ cpp_flags = [
*["-I" + d for d in include_dirs], *["-I" + d for d in include_dirs],
"-pthread", "-luring", "-lfmt", "-lssl", "-lcrypto", "-lpython3.10", "-std=c++20" "-pthread", "-luring", "-lfmt", "-lssl", "-lcrypto", f"-lpython{python_version.major}.{python_version.minor}", "-std=c++20"
] ]
if args.extension: if args.extension:
cpp_flags.extend(("-DTYPON_EXTENSION", "-fPIC", "-shared")) cpp_flags.extend(("-DTYPON_EXTENSION", "-fPIC", "-shared"))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment