Closed
Description
Currently, when building a distribution, if a py.typed file needs to be created, this happens during the generate_setup_file()
step. The file is added to the typeshed directory and will get copied to the tmp dir during the copy_stubs()
step. This is problematic for a few reasons:
- Conceptually,
generate_setup_file()
makes no modifications. It just returns the setup.py file as a string. The exception being creating thepy.typed
file if necessary. - The build process now modifies the typeshed directory, when it should be considered "read-only".
- This also means that the build process can't be started twice before cleaning the typeshed dir.
- This is especially problematic in local development environments, where your local typeshed directory gets modified and you can't run the integration tests twice.
The solution is to create a new step between copy_stubs()
and copy_changelog()
that creates the py.typed
marker directly in the tmpdir. I'll send a PR after the current batch of PRs was processed.