Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix config-settings handling in pip install #9115

Merged
merged 5 commits into from
May 10, 2023

Conversation

hcho3
Copy link
Collaborator

@hcho3 hcho3 commented May 2, 2023

Also test --config-settings in the CI so that we know it is not broken.

@hcho3 hcho3 changed the title Fix config_settings handling in pip install Fix config-settings handling in pip install May 2, 2023
@hcho3
Copy link
Collaborator Author

hcho3 commented May 3, 2023

Collecting pyspark (from -r doc/requirements.txt (line 13))
  Downloading pyspark-3.4.0.tar.gz (310.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 310.8/310.8 MB 174.2 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
      [end of output]  

For some reason, the doc build is broken :(

Comment on lines +82 to +83
if not build_config.use_system_libxgboost:
copy_with_logging(libxgboost, lib_path, logger=logger)
Copy link
Collaborator Author

@hcho3 hcho3 May 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I manually tested this change by:

  1. Create a new Conda environment.
  2. Build XGBoost from the source using CMake:
conda activate my_env
cmake .. -GNinja -DCMAKE_INSTALL_PREFIX="$CONDA_PREFIX" -DCMAKE_INSTALL_LIBDIR="lib"
  1. Install libxgboost into the Conda env:
ninja install
  1. Install the Python package with use_system_libxgboost flag:
pip install -v .  --config-settings use_system_libxgboost=True
  1. Inspect $CONDA_PREFIX to ensure that only one copy of libxgboost.so is installed in the Conda environment.
$ find . -name libxgboost.so
./lib/libxgboost.so

@hcho3
Copy link
Collaborator Author

hcho3 commented May 3, 2023

I filed readthedocs/readthedocs.org#10285 to notify RTD about the broken doc build.

Copy link
Member

@trivialfis trivialfis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, assuming all CI tests pass.

@hcho3
Copy link
Collaborator Author

hcho3 commented May 4, 2023

@trivialfis Can we ignore the RTD error for now? The RTD won't deploy the latest bug fix until next Tuesday.

@trivialfis
Copy link
Member

Yup, let's skip the unrelated errors.

@rongou Have you seen this error before https://buildkite.com/xgboost/xgboost-ci/builds/2386 ?

@rongou
Copy link
Contributor

rongou commented May 4, 2023

@trivialfis no, but will take a look.

Copy link
Member

@trivialfis trivialfis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feel free to merge it.

@hcho3 hcho3 merged commit 0cd4382 into dmlc:master May 10, 2023
@hcho3 hcho3 deleted the fix_config_settings branch May 10, 2023 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants