Skip to content

setup.py clean cythonizes file and leaves directory unclean #122

@gspr

Description

@gspr

Describe the bug
Calling setup.py with clean as argument should clean up the build directories. However, it currently causes the cythonization of ot/lp/emd_wrap.pyx, leaving the build directory unclean. This is a problem for downstream distributions.

To Reproduce
Steps to reproduce the behavior:

  1. Check out a clean copy of the code.
  2. Observe there is no ot/lp/emd_wrap.cpp.
  3. Run python3 setup.py clean.

Expected behavior
A clean build directory.

Actual outcome

$ python3 setup.py clean
Compiling ot/lp/emd_wrap.pyx because it changed.
[1/1] Cythonizing ot/lp/emd_wrap.pyx
/usr/lib/python3/dist-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/gspr/tmp/POT/ot/lp/emd_wrap.pyx
  tree = Parsing.p_module(s, pxd, full_module_name)
running clean

$ head -n 1 ot/lp/emd_wrap.cpp
/* Generated by Cython 0.29.14 */
  • OS: Debian 11 (Testing)
  • Python version: 3.7.6
  • How was POT installed: source, both 1b58440 and 0.6.0 were tested

Metadata

Metadata

Assignees

No one assigned

    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