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

pip: Add support for pyproject.toml #332

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

JakobDev
Copy link
Contributor

@JakobDev JakobDev commented Dec 5, 2022

This PR adds support for reading dependencies from a ypproject.toml. On Python versions older than 3.11, you need to install tomli to use this feature.

@@ -158,6 +169,16 @@ if opts.requirements_file:
except FileNotFoundError:
pass

elif opts.pyproject_file:
Copy link
Member

@TingPing TingPing Jan 5, 2023

Choose a reason for hiding this comment

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

Maybe it should error if both --requirements-file and --pyproject-file are given.

@@ -28,6 +28,8 @@ parser.add_argument('--cleanup', choices=['scripts', 'all'],
help='Select what to clean up after build')
parser.add_argument('--requirements-file', '-r',
help='Specify requirements.txt file')
parser.add_argument('--pyproject-file',
Copy link
Member

Choose a reason for hiding this comment

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

Please rebase and update README.md to include this option.

JakobDev and others added 2 commits June 14, 2023 22:39
Added: error thorwn if both --requirements-file and --pyproject-file are present
Added: readme entry for --pyproject-file
Fixed: readme entry for --requirements-file now warns about mutual exclusivity with --pyproject-file
@ENDrain
Copy link

ENDrain commented Jun 14, 2023

Hello, I've added suggested improvements to the original PR, hope @JakobDev reacts to this soon!

@JakobDev
Copy link
Contributor Author

I forget about this PR. Sorry for that.

@ENDrain Thanks, I have now merged your PR

@ENDrain
Copy link

ENDrain commented Jun 26, 2023

@TingPing can you give this an update please?

@tpikonen
Copy link

This looks like a useful addition. Could you untangle the version history by removing the merges and rebase to current master?

Does support recursive dependencies which use pyproject.toml? That is, if a project has dependencies listed in requirements.txt but one of the dependencies uses pyproject.toml only, do I get all the dependencies in the generated file?

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

Successfully merging this pull request may close these issues.

5 participants