thliebig / CSXCAD

A C++ library to describe geometrical objects and their physical or non-physical properties.
http://openEMS.de
GNU Lesser General Public License v3.0
34 stars 38 forks source link

Building on Enterprise Linux 8 (RHEL/Alma/Oracle/Rocky) #37

Closed KJ7LNW closed 10 months ago

KJ7LNW commented 11 months ago

The following patch is required for systems running python 3.6. (I would set up a pull request, but I am unable to do that at the moment.)

diff --git a/python/setup.py b/python/setup.py
index 30b7feb..c8c6c05 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -32,5 +32,5 @@ setup(
   url = 'https://openEMS.de',
   packages=["CSXCAD", ],
   package_data={'CSXCAD': ['*.pxd']},
-  ext_modules = cythonize(extensions, language_level="3")
+  ext_modules = cythonize(extensions, language_level=3)
  )

this prevents errors like the following:

Traceback (most recent call last):
  File "setup.py", line 46, in <module>
    ext_modules = cythonize(extensions, language_level = "3")
  File "/usr/lib64/python3.6/site-packages/Cython/Build/Dependencies.py", line 888, in cythonize
    ctx = c_options.create_context()
  File "/usr/lib64/python3.6/site-packages/Cython/Compiler/Main.py", line 596, in create_context
    self.cplus, self.language_level, options=self)
  File "/usr/lib64/python3.6/site-packages/Cython/Compiler/Main.py", line 94, in __init__
    self.set_language_level(language_level)
  File "/usr/lib64/python3.6/site-packages/Cython/Compiler/Main.py", line 100, in set_language_level
    if level >= 3: