Skip to content

Pythran not correctly installed for windows installations of SGT #33

@AlainKadar

Description

@AlainKadar

The cpp modules for StructuralGT no longer build for windows. The error is related to pythran not having correctly installed:

Traceback (most recent call last):
  File "D:\a\StructuralGT\StructuralGT\setup.py", line 51, in <module>
    ext_modules=cythonize(
                ~~~~~~~~~^
        [
        ^
    ...<34 lines>...
        ]
        ^
    ),
    ^
  File "C:\Users\runneradmin\micromamba\envs\test\Lib\site-packages\Cython\Build\Dependencies.py", line 978, in cythonize
    ctx = Context.from_options(c_options)
  File "C:\Users\runneradmin\micromamba\envs\test\Lib\site-packages\Cython\Compiler\Main.py", line 95, in from_options
    return cls(options.include_path, options.compiler_directives,
               options.cplus, options.language_level, options=options)
  File "C:\Users\runneradmin\micromamba\envs\test\Lib\site-packages\Cython\Compiler\Main.py", line 72, in __init__
    from . import Builtin, CythonScope
  File "C:\Users\runneradmin\micromamba\envs\test\Lib\site-packages\Cython\Compiler\CythonScope.py", line 3, in <module>
    from .UtilityCode import CythonUtilityCode
  File "C:\Users\runneradmin\micromamba\envs\test\Lib\site-packages\Cython\Compiler\UtilityCode.py", line 2, in <module>
    from .TreeFragment import parse_from_strings, StringParseContext
  File "C:\Users\runneradmin\micromamba\envs\test\Lib\site-packages\Cython\Compiler\TreeFragment.py", line 16, in <module>
    from .Visitor import VisitorTransform
  File "Cython/Compiler/Visitor.py", line 13, in init Cython.Compiler.Visitor
  File "C:\Users\runneradmin\micromamba\envs\test\Lib\site-packages\Cython\Compiler\Nodes.py", line 33, in <module>
    from .Pythran import has_np_pythran, pythran_type, is_pythran_buffer
  File "C:\Users\runneradmin\micromamba\envs\test\Lib\site-packages\Cython\Compiler\Pythran.py", line 7, in <module>
    pythran_is_pre_0_9 = tuple(map(int, pythran.__version__.split('.')[0:2])) < (0, 9)
                                        ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pythran' has no attribute '__version__'

This error occurs during GitHub actions and is reproduced on other windows machines. The error is resolved when pythran is explicitly installed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions