Skip to content

Commit

Permalink
Use Hatch instead of Flit for building the project
Browse files Browse the repository at this point in the history
Similar to psf/black#3233 , let's witch to Hatch that is more powerful and lets use use fancy-pypi-readme
  • Loading branch information
kaxil committed Dec 28, 2022
1 parent 0b523ba commit bf84594
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions python-sdk/pyproject.toml
@@ -1,19 +1,18 @@
[build-system]
requires = ["flit_core ~=3.2"]
build-backend = "flit_core.buildapi"
requires = ["hatchling>=1.8.0", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"

[project]
name = "astro-sdk-python"
dynamic = ["version"]
dynamic = ["readme", "version"]
description = """
Astro SDK allows rapid and clean development of {Extract, Load, Transform} workflows using Python and SQL, powered by Apache Airflow.
"""

authors = [
{ name = "Astronomer", email = "humans@astronomer.io" },
]
readme = "README.md"
license = { file = "LICENSE" }
license-files = { paths = ["../LICENSE"] }

requires-python = ">=3.7"
dependencies = [
Expand Down Expand Up @@ -122,9 +121,22 @@ markers = [
"integration"
]

[tool.hatch.version]
path = "src/astro/__init__.py"

[tool.flit.module]
name = "astro" # Or "astro.sql" if you just want this directory, not the entire 'astro'.
[tool.hatch.build.targets.sdist]
exclude = ["tests", "tests_integration", "dev"]

[tool.hatch.build.targets.wheel]
only-include = ["src"]
sources = ["src"]

[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"
fragments = [
{ path = "README.md" },
{ path = "docs/CHANGELOG.md" },
]

[tool.mypy]
color_output = true
Expand Down

0 comments on commit bf84594

Please sign in to comment.