tttapa / py-build-cmake

Modern, PEP 517 compliant build backend for creating Python packages with extensions built using CMake.
https://pypi.org/project/py-build-cmake
MIT License
38 stars 6 forks source link

Module name cannot actually differ from project name #1

Closed Thesola10 closed 2 years ago

Thesola10 commented 2 years ago

When trying to build a module (here called hactool) in a project with a different name (here pyhactool), it seems like this module discards the name value from tool.py-build-cmake.module:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/pep517/in_process/_in_process.py", line 363, in <module>
    main()
  File "/usr/lib/python3.10/site-packages/pep517/in_process/_in_process.py", line 345, in main
    json_out['return_val'] = hook(**hook_input['kwargs'])
  File "/usr/lib/python3.10/site-packages/pep517/in_process/_in_process.py", line 314, in build_sdist
    return backend.build_sdist(sdist_directory, config_settings)
  File "/tmp/build-env-cj8x38zt/lib/python3.10/site-packages/py_build_cmake/build.py", line 83, in build_sdist
    pkg = Module(norm_name, src_dir / cfg.module.get('directory', '.'))
  File "/tmp/build-env-cj8x38zt/lib/python3.10/site-packages/flit_core/common.py", line 59, in __init__
    raise ValueError("No file/folder found for module {}".format(name))
ValueError: No file/folder found for module pyhactool
tttapa commented 2 years ago

Thanks for the report, this should be fixed in v0.0.5.

Thesola10 commented 2 years ago

README.md

Planned features

  • ...
  • OSX support

By the way, I haven't noticed any issues performing builds on macOS. Am I missing something?

tttapa commented 2 years ago

It's just there because I don't have any Macs to rigorously test the package :) In theory everything should be platform-agnostic, but you never know.