tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Lightgbm package



On Wed, Feb 14, 2024 at 05:11:52PM -0700, Brook Milligan wrote:
> I am trying to package the python lightgpm (https://pypi.org/project/lightgbm/) and am not sure how to proceed.  The install directions say to use the following command:
> 
> 	pip install --no-binary lightgbm lightgbm
> 
> This works (see transcript file attached below) but it seems not to integrate with pkgsrc particularly well.  There is no setup.py file, so egg.mk does not work.  Similarly, wheel.mk does not work.

It's always good to provide more details when something "doesn't work".

In this case, I started from scratch and added wheel.mk. When building, I see:

===> Building for py311-lightgbm-4.3.0
* Building wheel...

Traceback (most recent call last):
  File "/usr/pkg/lib/python3.11/site-packages/pyproject_hooks/_impl.py", line 321, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
  File "/usr/pkg/lib/python3.11/site-packages/pyproject_hooks/_in_process/_in_process.py", line 77, in _build_backend
    obj = import_module(mod_path)
          ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/pkg/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'scikit_build_core'

ERROR Backend 'scikit_build_core.build' is not available.
*** Error code 1

This tells us what needs to be installed without even looking at
pyproject.toml where you see the same information in the
[build-system] section.

This build dependency is currently not packaged, it seems to be the
successor for py-scikit-build. I'll take a look at packaging it.
 Thomas


Home | Main Index | Thread Index | Old Index