Automatically build fishery client during wheel creation #181
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This replaces the project build system with setuptools so setup.py can be used to build the fishery client.
When the source distribution is created, the new MANIFEST.in file will inform setuptools to exclude build artifacts like
.svelte-kit/
,build/
, andnode_modules/
. Once the wheel is being built, setup.py will use npx to locally install yarn and then build the client. The resultingbuild/
subdirectory can then be copied tobuild/lib/fishery/client
for setuptools to bundle it into the wheel.Other changes
To avoid including the client's source code as part of the wheel, include_package_data was disabled. This means that all data files must be explicitly described in pyproject.toml with glob patterns under the
[tool.setuptools.package-data]
table.To avoid un-necessarily enabling namespace packages,
sardine/cli/
was re-structured to be a regular package (i.e. having an__init__.py
). The originalsardine.cli.main
entrypoint can still be used, but the new and preferred entrypoint is nowsardine.cli
.