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

Automatically build fishery client during wheel creation #181

Merged
merged 9 commits into from
Mar 11, 2023

Conversation

thegamecracks
Copy link
Collaborator

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/, and node_modules/. Once the wheel is being built, setup.py will use npx to locally install yarn and then build the client. The resulting build/ subdirectory can then be copied to build/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 original sardine.cli.main entrypoint can still be used, but the new and preferred entrypoint is now sardine.cli.

This is needed to work with having namespace packages disabled.
`sardine.cli.main` will still exist, but the preferred entrypoint
should be `sardine.cli` or `sardine-config`.
- Adds setup.py with build subcommand to run yarn build
- Excludes .svelte-kit and build artifacts from sdist
- Disables include_package_data for setuptools
  This makes MANIFEST.in only apply to the source distribution,
  which is necessary to avoid including the fishery client's source.
  As a consequence, data files must be explicitly listed in pyproject.toml.
Actually might be a better idea to explicitly upgrade dependencies
than to grab the latest compatible versions each time
@Bubobubobubobubo Bubobubobubobubo merged commit b43dd15 into main Mar 11, 2023
@thegamecracks thegamecracks deleted the npm-build branch March 11, 2023 14:24
This pull request was closed.
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.

2 participants