Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Build failure with cython 0.28 #10295

@asitstands

Description

@asitstands

make cython, which runs python setup.py build_ext --inplace --with-cython, fails with the following errors. My environment is Arch linux with python 3.6.4, cython 0.28.1, and setuptools 39.0.1.

Compiling mxnet/cython/ndarray.pyx because it changed.
Compiling mxnet/cython/symbol.pyx because it changed.
[1/2] Cythonizing mxnet/cython/ndarray.pyx

Error compiling Cython file:
------------------------------------------------------------
...
# Licensed to the Apache Software Foundation (ASF) under one
^
------------------------------------------------------------

mxnet/cython/ndarray.pyx:1:0: 'mxnet/_cy3/.ndarray' is not a valid module name
Traceback (most recent call last):
  File "setup.py", line 108, in <module>
    ext_modules=config_cython(),
  File "setup.py", line 96, in config_cython
    return cythonize(ret)
  File "/usr/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1026, in cythonize
    cythonize_one(*args)
  File "/usr/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1146, in cythonize_one
    raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: mxnet/cython/ndarray.pyx

Downgrading cython to 0.27.3 resolves this but gives warnings and different errors.

Warning: Extension name 'mxnet/_cy3/.ndarray' does not match fully qualified name 'ndarray' of 'mxnet/cython/ndarray.pyx'
Warning: Extension name 'mxnet/_cy3/.symbol' does not match fully qualified name 'symbol' of 'mxnet/cython/symbol.pyx'
Compiling mxnet/cython/ndarray.pyx because it changed.
Compiling mxnet/cython/symbol.pyx because it changed.
[1/2] Cythonizing mxnet/cython/ndarray.pyx
[2/2] Cythonizing mxnet/cython/symbol.pyx
running build_ext
error: each element of 'ext_modules' option must be an Extension instance or 2-tuple

If I run python setup.py build_ext --with-cython (without --inplace), the build succeeds with cython 0.27.3.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions