-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
python-ncls: fix build for 0.0.68 release using PEP 518
- Loading branch information
1 parent
22adbf9
commit 0907763
Showing
2 changed files
with
21 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,16 @@ | ||
--- a/setup.py 2023-05-14 00:15:53.983680836 +0530 | ||
+++ b/setup.py 2023-05-14 00:17:57.185420794 +0530 | ||
@@ -63,12 +63,14 @@ | ||
"ncls.src.fncls", ["ncls/src/fncls.pyx", "ncls/src/fintervaldb.c"], | ||
# define_macros=macros, | ||
include_dirs=include_dirs)] | ||
--- a/setup.py 2023-05-19 08:59:27.619223728 +0530 | ||
+++ b/setup.py 2023-05-19 09:03:12.750132242 +0530 | ||
@@ -28,10 +28,12 @@ | ||
include_dirs=include_dirs, | ||
), | ||
] | ||
+for e in extensions: | ||
+ e.cython_directives = {'language_level': "3"} | ||
|
||
# using setuptools to cythonize if cython not found | ||
# not recommended by cython docs, but still | ||
try: | ||
from Cython.Build import cythonize | ||
- ext_modules = cythonize(extensions, language_level=2) | ||
+ ext_modules = cythonize(extensions, compiler_directives={'language_level' : "3"}) | ||
except ImportError: | ||
print() | ||
print("Warning: Cannot compile with Cython. Using legacy build.") | ||
from Cython.Build import cythonize | ||
|
||
-ext_modules = cythonize(extensions, language_level=2) | ||
+ext_modules = cythonize(extensions, compiler_directives={'language_level' : "3"}) | ||
|
||
|
||
setup(ext_modules=ext_modules) |
0907763
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to PR to upstream, and use upstream online patch
0907763
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upstream is already in the process of merging the PR.
0907763
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay