-
Notifications
You must be signed in to change notification settings - Fork 8
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
move most project metadata into pyproject.toml #126
Changes from all commits
0133485
176b10a
bf9bf3d
ea3d6a3
5ca1cd0
b3e216c
d2d07ed
d0de49e
34ac8b5
8e524d7
a79dc7a
1c2e610
4523435
7f80bf0
de6d77a
f927f49
c6bdc6e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,33 @@ | |
|
||
set -e -u -o pipefail | ||
|
||
NUMARGS=$# | ||
ARGS=$* | ||
|
||
HELP="build liblegateboost.so and a 'legateboost' Python wheel, and install that wheel | ||
|
||
$0 [<flag> ...] | ||
|
||
where <flag> is any of: | ||
|
||
--editable install Python wheel in editable mode | ||
" | ||
|
||
function hasArg { | ||
(( NUMARGS != 0 )) && (echo " ${ARGS} " | grep -q " $1 ") | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I know some of this looks a little complicated, but it's all standard across most RAPIDS repos. You'll see something similar in example from I think consistency with all those projects is useful, as it makes it easier for anyone developing on them to also come help out here, and makes it easier to integrate the various RAPIDS build tools into this repo. This |
||
|
||
if hasArg -h || hasArg --help; then | ||
echo "${HELP}" | ||
exit 0 | ||
fi | ||
|
||
# Set defaults for vars modified by flags to this script | ||
PIP_INSTALL_ARGS=( | ||
--no-build-isolation | ||
--no-deps | ||
) | ||
|
||
# ensure 'native' is used if CUDAARCHS isn't set | ||
# (instead of the CMake default which is a specific architecture) | ||
# ref: https://cmake.org/cmake/help/latest/variable/CMAKE_CUDA_ARCHITECTURES.html | ||
|
@@ -10,7 +37,14 @@ declare -r CMAKE_CUDA_ARCHITECTURES="${CUDAARCHS:-native}" | |
legate_root=$( | ||
python -c 'import legate.install_info as i; from pathlib import Path; print(Path(i.libpath).parent.resolve())' | ||
) | ||
echo "Using Legate at $legate_root" | ||
echo "Using Legate at '${legate_root}'" | ||
|
||
cmake -S . -B build -Dlegate_core_ROOT="${legate_root}" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CUDA_ARCHITECTURES="${CMAKE_CUDA_ARCHITECTURES}" | ||
cmake --build build -j | ||
python -m pip install -e . | ||
|
||
if hasArg --editable; then | ||
PIP_INSTALL_ARGS+=("--editable") | ||
fi | ||
|
||
echo "building legateboost Python package..." | ||
python -m pip install "${PIP_INSTALL_ARGS[@]}" . |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,9 +6,32 @@ files: | |
cuda: ["11.8"] | ||
includes: | ||
- build | ||
- build_tools | ||
- docs | ||
- run | ||
- test | ||
py_build: | ||
output: pyproject | ||
pyproject_dir: . | ||
extras: | ||
table: build-system | ||
includes: | ||
- build | ||
py_run: | ||
output: pyproject | ||
pyproject_dir: . | ||
extras: | ||
table: project | ||
includes: | ||
- run | ||
py_test: | ||
output: pyproject | ||
pyproject_dir: . | ||
extras: | ||
table: project.optional-dependencies | ||
key: test | ||
includes: | ||
- test | ||
channels: | ||
- legate | ||
- conda-forge | ||
|
@@ -17,31 +40,37 @@ dependencies: | |
common: | ||
- output_types: [conda] | ||
packages: | ||
- cmake>=3.24.0,!=3.30.0 | ||
- &legate_core legate-core=24.06.* | ||
- openblas | ||
- python-build | ||
- output_types: [conda, pyproject, requirements] | ||
packages: | ||
- cmake>=3.24.0,!=3.30.0 | ||
- &legate_core legate-core==24.06.* | ||
- scikit-build>=0.18.0 | ||
- setuptools>=70.0 | ||
docs: | ||
build_tools: | ||
common: | ||
- output_types: [conda] | ||
packages: | ||
- python-build>=1.2.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moving this to its own conda-specific section, so it doesn't end up in the |
||
docs: | ||
common: | ||
- output_types: [conda, pyproject, requirements] | ||
packages: | ||
- sphinx | ||
- pydata-sphinx-theme | ||
- myst-parser | ||
run: | ||
common: | ||
- output_types: [conda] | ||
- output_types: [conda, pyproject, requirements] | ||
packages: | ||
- cunumeric=24.06.* | ||
- cunumeric==24.06.* | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
- *legate_core | ||
- numpy | ||
- scikit-learn | ||
- typing-extensions>=4.0 | ||
test: | ||
common: | ||
- output_types: [conda] | ||
- output_types: [conda, pyproject, requirements] | ||
packages: | ||
- hypothesis | ||
- matplotlib | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
[build-system] | ||
requires = [ | ||
"cmake>=3.24.0,!=3.30.0", | ||
"legate-core==24.06.*", | ||
"scikit-build>=0.18.0", | ||
"setuptools>=70.0", | ||
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit dependencies.yaml and run `rapids-dependency-file-generator`. | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "legateboost" | ||
version = "0.1" | ||
authors = [ | ||
{name = "NVIDIA Corporation"}, | ||
] | ||
classifiers = [ | ||
"Intended Audience :: Developers", | ||
"Topic :: Scientific/Engineering", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
] | ||
dependencies = [ | ||
"cunumeric==24.06.*", | ||
"legate-core==24.06.*", | ||
"numpy", | ||
"scikit-learn", | ||
"typing-extensions>=4.0", | ||
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit dependencies.yaml and run `rapids-dependency-file-generator`. | ||
description = "GBM libary on Legate" | ||
license = {text = "Apache 2.0"} | ||
requires-python = ">=3.8" | ||
|
||
[project.optional-dependencies] | ||
test = [ | ||
"hypothesis", | ||
"matplotlib", | ||
"mypy", | ||
"nbconvert", | ||
"notebook", | ||
"pytest<8", | ||
"seaborn", | ||
"xgboost", | ||
] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit dependencies.yaml and run `rapids-dependency-file-generator`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing
build.sh
fromci/build_wheel.sh
ensures that here in CI, we're driving the entire CMake build via Python packaging tools (python -m build
, in this case). That ensures that the shared library is actually copied into the wheel, and that therefore the wheels could be installed on their own.That's not the case today. Try downloading a recent wheel artifact, e.g. from https://github.com/rapidsai/legate-boost/actions/runs/10111717786
liblegateboost.so
has not been getting packaged.contents (click me)
Because of the use of
build.sh
, this line was always hit during the build:legate-boost/CMakeLists.txt
Line 17 in 157b427
Which I think led to it not being recompiled in the
_skbuild
directory, which I think is why it's not getitng included in wheels.