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

Distr opts improvements base #2032

Closed

Conversation

KOLANICH
Copy link
Contributor

@KOLANICH KOLANICH commented Mar 19, 2020

Problem

For #2034 and #2036 we need to load pyproject.toml. To do it we need to know the path of the dir where it is situated. We also want this path to be used to load setup.cfg properly. We also don't want to do these ops if their result is unneeded, since they are a bit costly.

Summary of changes

  • Implemented ''get_setup_py_path'' that allows to get a path of ''setup.py'' file.
  • Implemented ''get_setup_py_dir'' that allows to get a path of a dir where''setup.py'' file resides.
  • Implemented ''read_toml'' that just reads a TOML file. Needs ''toml' lib.
  • Implemented ''read_pyproject_toml'' that just reads ''pyproject.toml' file.
  • Implemented ''FinalizeDistributionOptionsHookArgsCache'' that does these operations lazily and caches their results, to use them for hooks in future.

Pull Request Checklist

  • Changes have tests
  • News fragment added in changelog.d. See documentation for details

@KOLANICH KOLANICH force-pushed the distr_opts_improvements_base branch from 2750fee to 7bf540d Compare March 19, 2020 11:22
… stuff. When an entry point now fails to be loaded, it doesn't disrupt building process.
…setuptools.finalize_distribution_options hook
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.

2 participants