Skip to content

Comments

convert_script_files does not require script to exist#699

Closed
dimbleby wants to merge 1 commit intopython-poetry:mainfrom
dimbleby:scripts-generated-during-build
Closed

convert_script_files does not require script to exist#699
dimbleby wants to merge 1 commit intopython-poetry:mainfrom
dimbleby:scripts-generated-during-build

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...

@sonarqubecloud
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


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