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

build: Add packaging build system #3

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

matthewfeickert
Copy link
Member

@matthewfeickert matthewfeickert commented Feb 11, 2025

  • Use src/ directory layout.
  • Add missing metadata, such as requires-python.
  • Add packaging support using hatch build-system.

Add packaging support. Enables

$ uvx --from build pyproject-build .
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - hatchling>=1.13.0
* Getting build dependencies for sdist...
* Building sdist...
* Building wheel from sdist
* Creating isolated environment: venv+pip...
* Installing packages in isolated environment:
  - hatchling>=1.13.0
* Getting build dependencies for wheel...
* Building wheel...
Successfully built func_adl_type_generator-0.1.0.tar.gz and func_adl_type_generator-0.1.0-py3-none-any.whl
$ uvx twine check --strict dist/*
Checking dist/func_adl_type_generator-0.1.0-py3-none-any.whl: PASSED
Checking dist/func_adl_type_generator-0.1.0.tar.gz: PASSED
$ python -m tarfile --list dist/*.tar.gz
func_adl_type_generator-0.1.0/src/func_adl_type_generator/atlas_release_type_builder.py 
func_adl_type_generator-0.1.0/.gitignore 
func_adl_type_generator-0.1.0/LICENSE 
func_adl_type_generator-0.1.0/README.md 
func_adl_type_generator-0.1.0/pyproject.toml 
func_adl_type_generator-0.1.0/PKG-INFO 
$ python -m zipfile --list dist/*.whl
File Name                                             Modified             Size
func_adl_type_generator/atlas_release_type_builder.py 2020-02-02 00:00:00        12020
func_adl_type_generator-0.1.0.dist-info/METADATA 2020-02-02 00:00:00         2300
func_adl_type_generator-0.1.0.dist-info/WHEEL  2020-02-02 00:00:00           87
func_adl_type_generator-0.1.0.dist-info/entry_points.txt 2020-02-02 00:00:00          103
func_adl_type_generator-0.1.0.dist-info/licenses/LICENSE 2020-02-02 00:00:00        11357
func_adl_type_generator-0.1.0.dist-info/RECORD 2020-02-02 00:00:00          591

* Use src/ directory layout.
* Add missing metadata, such as requires-python.
* Add packaging support using hatch build-system.
@matthewfeickert
Copy link
Member Author

@gordonwatts This doesn't address your question from the other day fully, but this allows for things to be packaged correctly, which allows for PR #4, which will start to simplify things.

This is ready for review.

license = { text = "MIT" }
requires-python = ">=3.8"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm setting this here as it is really important to set some Python version. If this needs to get bumped down to Python 3.7 that's fine, but it shouldn't be absent.

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.

1 participant