Commit 308382c 1 parent bbeecc0 commit 308382c Copy full SHA for 308382c
File tree 1 file changed +15
-2
lines changed
1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -312,8 +312,21 @@ if test "${INSTALL}" = true; then
312
312
echo ' requires = ["setuptools"]' >> ./pyproject.toml
313
313
echo ' build-backend = "setuptools.build_meta"' >> ./pyproject.toml
314
314
echo " " >> ./pyproject.toml
315
- echo " recursive-include lightgbm *.dll *.dylib *.so" > ./MANIFEST.in
315
+ echo " recursive-include lightgbm VERSION.txt py.typed *.py *.so" > ./MANIFEST.in
316
316
echo " " >> ./MANIFEST.in
317
+ # create a setup.cfg for systems with setuptools<61 (e.g Ubuntu 22.04 python3-pip)
318
+ # ref: https://github.com/microsoft/LightGBM/issues/6665#issuecomment-2412748042
319
+ echo ' [metadata]' > ./setup.cfg
320
+ echo ' name = lightgbm' >> ./setup.cfg
321
+ echo " version = $( head -1 ../VERSION.txt) " >> ./setup.cfg
322
+ echo ' description = lightgbm' >> ./setup.cfg
323
+ echo " " >> ./setup.cfg
324
+ echo ' [options]' >> ./setup.cfg
325
+ echo ' packages = lightgbm' >> ./setup.cfg
326
+ echo ' include_package_data = True' >> ./setup.cfg
327
+ echo " " >> ./setup.cfg
328
+ echo ' [options.packages.find]' >> ./setup.cfg
329
+ echo ' where = lightgbm' >> ./setup.cfg
317
330
mkdir -p ./lightgbm/lib
318
331
if test -f ../lib_lightgbm.so; then
319
332
echo " found pre-compiled lib_lightgbm.so"
@@ -376,4 +389,4 @@ if test "${INSTALL}" = true; then
376
389
fi
377
390
378
391
echo " cleaning up"
379
- rm -rf ./lightgbm-python
392
+ # rm -rf ./lightgbm-python
You can’t perform that action at this time.
0 commit comments