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

Use pyproject.toml to specify build requirements #1061

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ksivaman
Copy link
Member

Description

setup_requires is deprecated (pep ref) and will be removed in setuptools v75.0.0. This PR uses the newer pyproject.toml to specify build time dependencies. We can consider gradually moving over other functionality to pyproject.toml as required.

Type of change

  • Documentation change (change only to the documentation, either a fix or a new content)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Infra/Build change
  • Code refractor

Changes

Please list the changes introduced in this PR:

  • Change A
  • Change B

Checklist:

  • I have read and followed the contributing guidelines
  • The functionality is complete
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@ksivaman ksivaman added the build Build system label Jul 30, 2024
@ksivaman ksivaman requested a review from denera July 30, 2024 22:59
@ksivaman ksivaman self-assigned this Jul 30, 2024
@ksivaman
Copy link
Member Author

/te-ci

@phu0ngng phu0ngng requested a review from timmoon10 July 30, 2024 23:04
Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
Copy link
Collaborator

@timmoon10 timmoon10 left a comment

Choose a reason for hiding this comment

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

Modernizing to use pyproject.toml would be nice for multiple reasons, but it will probably break user workflows (see #981 (comment)). In particular, pip install . will no longer work and users will need to add the ---no-build-isolation flag. It may be worthwhile, but we should be aware.

.github/workflows/build.yml Outdated Show resolved Hide resolved


def uninstall_te_fw_packages():
subprocess.check_call(
subprocess.run(
Copy link
Collaborator

Choose a reason for hiding this comment

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

check_call is nice since it will print out the error message if the process fails:

Suggested change
subprocess.run(
subprocess.check_call(

We could alternatively call with check=True or manually check the return code.

build_tools/utils.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
transformer_engine/jax/setup.py Outdated Show resolved Hide resolved
Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
setup.py Outdated Show resolved Hide resolved
@timmoon10 timmoon10 self-requested a review August 1, 2024 18:49
Signed-off-by: Kirthi Shankar Sivamani <[email protected]>
Copy link
Collaborator

@yaox12 yaox12 Aug 15, 2024

Choose a reason for hiding this comment

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

Can we add a section for the black formatter in pyproject.toml to declare the following arguments? It's useful when we want to format the code locally.

args: [--line-length=100, --preview, --enable-unstable-feature=string_processing]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Build system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants