-
Notifications
You must be signed in to change notification settings - Fork 228
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
pyproject.toml #2981
base: develop
Are you sure you want to change the base?
pyproject.toml #2981
Conversation
whl packagesetup.py:
pyproject.toml:
pip showsetup.py
pyproject.toml
|
run: | | ||
python -m build -C--global-option=--release |
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.
There is no way to pass global option to control format of version, that used env variable instead
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 was more convenient to pass this option into CLI.
repo_root = os.path.dirname(os.path.realpath(__file__)) | ||
run = subprocess.run(["git", "diff-index", "--quiet", "HEAD"], cwd=repo_root) # nosec | ||
if run.returncode == 1: | ||
dev_version_id += "dirty" |
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.
Detect editable mode pip install -e
is not possible to check here, instead of it add dirty suffix if code was modified.
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 previous editable
suffix was more correct.
elif package_type == "build_w": | ||
run_cmd_line = f"{python_executable_with_venv} -m build -n -w" |
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.
--no-isolation, -n disable building the project in an isolated virtual environment. Build dependencies must be installed
separately when this option is used
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.
LGTM
@@ -39,8 +39,9 @@ jobs: | |||
env: | |||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |||
NNCF_RELEASE_BUILD: "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.
These changes need to be placed in our release procedure documentation.
run: | | ||
python -m build -C--global-option=--release |
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 was more convenient to pass this option into CLI.
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.
From my perspective, it is not correct to place helper-like files named with _
at the root of the project.
@alexsu52, @AlexKoff88, could you please comment on this?
# NOTE 1: This module generates the dynamic version for the package during the build process. | ||
# It provides the version attribute for setuptools as specified in pyproject.toml: | ||
# [tool.setuptools.dynamic] | ||
# version = { attr = "_version_helper.version" } |
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.
repo_root = os.path.dirname(os.path.realpath(__file__)) | ||
run = subprocess.run(["git", "diff-index", "--quiet", "HEAD"], cwd=repo_root) # nosec | ||
if run.returncode == 1: | ||
dev_version_id += "dirty" |
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 previous editable
suffix was more correct.
@@ -0,0 +1,150 @@ | |||
[build-system] | |||
requires = ["setuptools>=61.0"] |
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.
Why the recommended setuptools
version was bupmed?
Changes
Use pyproject.toml instead of setup.py
Reason for changes
Tests
nightly/job/install_onnx/543/
nightly/job/install_ov/567/
nightly/job/install_pt_cpu/566/
nightly/job/ubuntu20_install_tf/672/