-
Notifications
You must be signed in to change notification settings - Fork 31
Remove use of python setup.py develop/install in the project
#2172
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
base: master
Are you sure you want to change the base?
Conversation
6d87c72 to
124f5f7
Compare
|
View rendered docs @ https://intelpython.github.io/dpctl/pulls/2172/index.html |
|
Array API standard conformance tests for dpctl=0.21.0=py310h93fe807_29 ran successfully. |
|
Array API standard conformance tests for dpctl=0.21.0=py310h93fe807_29 ran successfully. |
fd45fec to
13409b7
Compare
|
Array API standard conformance tests for dpctl=0.21.0=py310h93fe807_30 ran successfully. |
to be reused in gen_docs and gen_coverage
13409b7 to
32f1509
Compare
|
Array API standard conformance tests for dpctl=0.21.0=py310h93fe807_30 ran successfully. |
1 similar comment
|
Array API standard conformance tests for dpctl=0.21.0=py310h93fe807_30 ran successfully. |
python setup.py develop in the projectpython setup.py develop/install in the project
| p.add_argument( | ||
| "--debug", | ||
| default="Release", | ||
| dest="build_type", |
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.
The debug build produces a lot of the warning which probably has to be resolved in the follow-up PR.
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.
a number of them are
icpx: warning: argument unused during compilation: '-Xsycl-target-frontend=spir64 -g0'
which will need some looking at
the remainder are
warning: comparison of integers of different signs: 'py::ssize_t' (aka 'long') and 'std::size_t'
from
assert(dst.get_size() == iter_nelems)
in sorting functions
should be a simple enough fix
00161f1 to
989df1b
Compare
|
Array API standard conformance tests for dpctl=0.21.0=py310h93fe807_32 ran successfully. |
|
Array API standard conformance tests for dpctl=0.21.0=py310h93fe807_31 ran successfully. |
|
Array API standard conformance tests for dpctl=0.21.0=py310h93fe807_32 ran successfully. |
Update `gen_coverage` and `gen_docs` to align with `build_locally`
acb4584 to
a113d01
Compare
|
Array API standard conformance tests for dpctl=0.22.0dev0=py310h93fe807_33 ran successfully. |
|
Array API standard conformance tests for dpctl=0.22.0dev0=py310h93fe807_34 ran successfully. |
1 similar comment
|
Array API standard conformance tests for dpctl=0.22.0dev0=py310h93fe807_34 ran successfully. |
|
Array API standard conformance tests for dpctl=0.22.0dev0=py310h93fe807_35 ran successfully. |
| pushd $d | ||
| conda activate --stack ${{ env.BUILD_ENV_NAME }} | ||
| CC=icx CXX=icpx python setup.py develop -G Ninja || exit 1 | ||
| CC=icx CXX=icpx python setup.py build_ext --inplace -G Ninja || exit 1 |
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.
CONTRIBUTING.md needs to be updated also
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.
and docs/_legacy/docfiles/user_guides/QuickStart.rst and docs/doc_sources/contributor_guides/building.rst
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.
some README.md in the examples folder as well
| import sys | ||
|
|
||
| # add scripts dir to Python path so we can import _build_helper | ||
| sys.path.insert(0, os.path.abspath("scripts")) |
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.
I wonder for what use case we need that? Simple python scripts/build_locally.py works fine without that.
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.
It didn't work for me locally without this, essentially importing from _build_helper wouldn't work without this or an __init__.py
| "--bin-llvm", | ||
| help="Path to folder where llvm-cov/llvm-profdata can be found", | ||
| ) | ||
| p.add_argument("--skip-pytest", dest="run_pytest", action="store_false") |
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.
Missing description of the argument
| env = os.environ.copy() | ||
|
|
||
| if "CMAKE_ARGS" in env and env["CMAKE_ARGS"].strip(): | ||
| warn("Ignoring pre-existing CMAKE_ARGS in environment", "gen_docs") | ||
| del env["CMAKE_ARGS"] | ||
|
|
||
| env["CMAKE_ARGS"] = cmake_args | ||
|
|
||
| print(f"[gen_docs] Using CMake args:\n {env['CMAKE_ARGS']}") |
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.
Would it make sense to move that to a helper function, looks quite the same use across the files?
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.
I plan to remove this, I was mistakenly under the impression that we needed to pass via CMAKE_ARGS when using python setup.py build_ext --inplace, but I can get it working without it
| ) | ||
|
|
||
| # Level Zero state (on unless explicitly disabled) | ||
| if args.no_level_zero: |
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.
I wonder, if --no-level-zero is deprecated, should we base the logic mostly on --target-level-zero option then?
Should we consider level_zero_enabled = False if --target-level-zero is not passed?
| dest="no_level_zero", | ||
| action="store_true", | ||
| default=False, | ||
| help="Disable Level Zero backend (deprecated: use --target-level-zero " |
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.
--target-level-zero OFF does not work
| if args.no_level_zero and args.target_level_zero: | ||
| err( | ||
| "Cannot combine --no-level-zero and --target-level-zero", | ||
| "build_locally", | ||
| ) | ||
|
|
||
| # Level Zero state (on unless explicitly disabled) | ||
| if args.no_level_zero: | ||
| level_zero_enabled = False | ||
| elif args.target_level_zero: | ||
| level_zero_enabled = True |
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.
This is the same in all three scripts and can be moved to the helper as a function.
A warning that
python setup.py developis deprecated and will no longer be supported at the end of October, 2025 has been ongoing for some time when using dpctl build driver script, and can be seen in the CIThis PR proposes instead relying on
pipfor installing dpctl in the script, and reworks the script to maintain use of scikit-buildIn the future, this will also simplify a transition to scikit-build-core
The PR also introduces options
--cleanand--skip-editabletobuild_locallydriver--cleanand--skip-pytesttogen_coveragedriver--cleantogen_docsdriver