Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setup.py: explicitly specify cython's language_level #52

Merged
merged 4 commits into from
Sep 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions pylib/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,18 @@


def get_extensions():
if "--no-compile" not in sys.argv:
try:
from Cython.Build import cythonize
return cythonize(Extension(name='copyutil', sources=["cqlshlib/copyutil.py"], define_macros=[("CYTHON_LIMITED_API", "1")]))
except ImportError:
warnings.warn("installing cython could speed things up for you; `pip install cython`")
return []
if "--no-compile" in sys.argv:
return []

try:
from Cython.Build import cythonize
extensions = [Extension(name='copyutil',
sources=["cqlshlib/copyutil.py"],
define_macros=[("CYTHON_LIMITED_API", "1")])]
return cythonize(extensions,
compiler_directives={'language_level': '3str'})
except ImportError:
warnings.warn("installing cython could speed things up for you; `pip install cython`")


setup(
Expand Down