diegoferigo / cmake-build-extension

Setuptools extension to build and package CMake projects
https://pypi.org/project/cmake-build-extension/
MIT License
67 stars 16 forks source link

write __init__.py into a wrong folder #42

Open shi-yan opened 1 year ago

shi-yan commented 1 year ago

The extension tries to write the init.py into the wrong folder. I don't know how to change this behavior

      ==> Building:
      $ cmake --build /home/xxx/work/cpp/build/temp.linux-x86_64-cpython-310_Blah --config Release

      ==> Installing:
      $ cmake --install /home/xxx/work/cpp/build/temp.linux-x86_64-cpython-310_Blan

      error: [Errno 2] No such file or directory: '/home/xxx/work/cpp/build/lib.linux-x86_64-cpython-310/blah/__init__.py'
      [end of output]

The build folder should be temp.linux-x86_64-cpython-310_Blah, but it tries to write the __init__.py file into /home/xxx/work/cpp/build/lib.linux-x86_64-cpython-310/blah/

the above error is triggered by write_top_level_init=init_py, in setup.py