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

Scripts run package functions #5390

Merged
merged 4 commits into from
Oct 9, 2022
Merged

Conversation

jerempy
Copy link
Contributor

@jerempy jerempy commented Oct 6, 2022

The issue

Requested new feature to add the ability to include something like:

main = {call = "foo_package.bar_module:main('dev')"}

#5294

The fix

This adds the ability to parse a callable with module.func in scripts

The checklist

  • Associated issue
  • A news fragment in the news/ directory to describe this fix with the extension .bugfix.rst, .feature.rst, .behavior.rst, .doc.rst. .vendor.rst. or .trivial.rst (this will appear in the release changelog). Use semantic line breaks and name the file after the issue number or the PR #.

@jerempy
Copy link
Contributor Author

jerempy commented Oct 6, 2022

Also, should probably get an update to: https://pipenv.pypa.io/en/latest/advanced/#custom-script-shortcuts

pipenv/cmdparse.py Outdated Show resolved Hide resolved
@matteius matteius requested a review from oz123 October 8, 2022 14:38
@oz123
Copy link
Contributor

oz123 commented Oct 8, 2022

@matteius can you please resolve the merge conflicts?

@matteius
Copy link
Member

matteius commented Oct 9, 2022

@jerempy Hey -- looks like there is merge conflict with the named package categories work that got merged -- could you rebase?

Can now add a callable like {call = "package.module:func('arg')"}
update to vendored tomlkit everywhere

tests were breaking primarily due to the vendored tomlkit classes do not equal the non vendored
@jerempy jerempy force-pushed the Scripts-run-package-functions branch from 2749322 to 5f548d0 Compare October 9, 2022 19:28
@oz123 oz123 merged commit 612241b into pypa:main Oct 9, 2022
oz123 added a commit that referenced this pull request Oct 17, 2022
Following #5390 I realized this code is duplicated
into pipenv, and we can use that instead of the one in vistir.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants