Skip to content

ENH: implement editable loader with PEP 829 .start files - #881

Open
dnicolodi wants to merge 1 commit into
mesonbuild:mainfrom
dnicolodi:implement-pep829
Open

ENH: implement editable loader with PEP 829 .start files#881
dnicolodi wants to merge 1 commit into
mesonbuild:mainfrom
dnicolodi:implement-pep829

Conversation

@dnicolodi

Copy link
Copy Markdown
Member

on Python 3.15 and later. Editable wheels are Python version specific, thus there is no need to write both a .pth and a .start file for Python versions that support the latter.

Editable wheels implemented with .pth files just imported the implementation module and relied on the execution of the module body on import for the installation of the module loader. PEP 829 .start files need to specify a callable that takes no arguments. To keep the difference between .pth and .start file implementations to a minimum, define such callable in the implementation module and switch the .pth file to explicitly call it.

Fixes #846

on Python 3.15 and later. Editable wheels are Python version specific,
thus there is no need to write both a .pth and a .start file for
Python versions that support the latter.

Editable wheels implemented with .pth files just imported the
implementation module and relied on the execution of the module body
on import for the installation of the module loader.  PEP 829 .start
files need to specify a callable that takes no arguments. To keep the
difference between .pth and .start file implementations to a minimum,
define such callable in the implementation module and switch the .pth
file to explicitly call it.

Fixes mesonbuild#846
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.

Update editable install support for PEP 829 (.start files)

1 participant