Skip to content

Commit 661639c

Browse files
committed
Adapt for Cython 3.x
1 parent 3612cfa commit 661639c

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

source-code/cython/JuliaSet/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ $(JULIA_LIB): $(PYX_FILES)
99

1010
clean:
1111
python setup.py clean
12-
rm -f $(C_FILES) $(JULIA_LIB)
12+
$(RM) -f $(C_FILES) $(JULIA_LIB)
13+
$(RM) -r build/

source-code/cython/JuliaSet/setup.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@
44
from distutils.extension import Extension
55
from Cython.Distutils import build_ext
66

7+
extensions=[
8+
Extension('julia_cython', ['julia_cython.pyx']),
9+
Extension('julia_cython_omp', ['julia_cython_omp.pyx'],
10+
extra_compile_args=['-fopenmp'],\
11+
extra_link_args=['-fopenmp'])
12+
]
13+
14+
for extension in extensions:
15+
extension.cython_directives = {'language_level': "3"}
16+
717
setup(
818
cmdclass={'build_ext': build_ext},
9-
ext_modules=[Extension('julia_cython', ['julia_cython.pyx']),
10-
Extension('julia_cython_omp', ['julia_cython_omp.pyx'],
11-
extra_compile_args=['-fopenmp'],\
12-
extra_link_args=['-fopenmp'])]
19+
ext_modules=extensions,
1320
)

0 commit comments

Comments
 (0)