build_ext runs twice when doing "pip install -e"

75 Views Asked by At

I am compiling OpenAI Triton from source. When running "pip install -e python" in the root dir, which uses this setup.py https://github.com/openai/triton/blob/main/python/setup.py, I see:

(pytorch) C:\work\Repos\triton>pip install -e python
Obtaining file:///C:/work/Repos/triton/python
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... done
  Preparing editable metadata (pyproject.toml) ... done
.....
      running build_py
      running build_ext
      -- Adding Python module
.....
      running build_ext
      -- Adding Python module
.....

which makes totally no sense ! I've added a print in the code, and it indeed

class CMakeBuild(build_ext):
    def run(self):

is run twice, for the same (single) extension. Has anyone seen something similar before ? Why can it happen ? I am on Windows btw, latest pip version and everything.

0

There are 0 best solutions below