Skip to content

Commit

Permalink
Use Hatchling to modern package building
Browse files Browse the repository at this point in the history
Replace `setup.py` with `pyproject.toml` to modernize packaging
  • Loading branch information
kaxil committed Jul 25, 2024
1 parent 376fa20 commit dbb6b39
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 113 deletions.
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include LICENSE
include README.md
include setup.py
include pyproject.toml
prune tests
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ setup-dev: ## Setup development environment

.PHONY: venv
venv: venv/bin/activate
venv/bin/activate: setup.py
venv/bin/activate: pyproject.toml
@test -d venv || virtualenv -p python3 venv
@${PYTHON} -m pip install -U pip
@${PYTHON} -m pip install -e .[dev]
Expand Down
57 changes: 57 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "dag-factory"
dynamic = ["version"]
description = "Dynamically build Apache Airflow DAGs from YAML files"
authors = [{ name = "Astronomer", email = "[email protected]" }]
readme = "README.md"
license = "Apache-2.0"
license-files = { paths = ["LICENSE"] }
requires-python = ">=3.8"
keywords = ["airflow", "apache-airflow", "provider", "astronomer", "dag"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: Apache Software License",
"Topic :: Database",
"Framework :: Apache Airflow",
"Intended Audience :: Developers",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
]
dependencies = [
"apache-airflow>=2.0",
"apache-airflow-providers-http",
"apache-airflow-providers-cncf-kubernetes",
"pyyaml",
"packaging",
]


[project.optional-dependencies]
dev = [
"pytest>=6.0",
"black",
"pylint",
"pytest-cov",
"tox",
]

[project.urls]
Source = "https://github.com/astronomer/dag-factory"

[tool.hatch.version]
path = "dagfactory/__version__.py"

[tool.hatch.build.targets.sdist]
include = ["dagfactory"]

[tool.hatch.build.targets.wheel]
packages = ["dagfactory"]
111 changes: 0 additions & 111 deletions setup.py

This file was deleted.

0 comments on commit dbb6b39

Please sign in to comment.