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

convert_script_files does not require script to exist #699

Closed

Conversation

dimbleby
Copy link
Contributor

Scripts can be generated during build. But poetry-core insists that scripts exist ahead of time.

fixes python-poetry/poetry#8856

obviously this is giving up some validation: it is now possible to build a wheel that points at a non-existent script. But

  • I do not see an easy way of getting that back
  • probably it is pretty obvious when that happens
  • it already is possible to point at non-existent code in an entrypoint-style script, so in some sense this just puts things on an equal footing...

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@@ -364,16 +364,6 @@ def convert_script_files(self) -> list[Path]:

abs_path = Path.joinpath(self._path, source)

if not abs_path.exists():
Copy link
Member

Choose a reason for hiding this comment

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

We could put this under if not self._package.build_script: to keep the validation. Without a build script I assume the files must exist at this point.

Copy link
Contributor

@weisslj weisslj Mar 15, 2024

Choose a reason for hiding this comment

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

@radoering in #710 I am doing this, with added test case, @dimbleby encouraged me to take over. Please review 🙏

@radoering
Copy link
Member

Superseded by #710

@radoering radoering closed this Mar 17, 2024
@dimbleby dimbleby deleted the scripts-generated-during-build branch March 17, 2024 18:42
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.

Execute "build" before "scripts"
3 participants