Skip to content

Commit ae45d47

Browse files
committed
Use hatch for packaging
Signed-off-by: Aarni Koskela <[email protected]>
1 parent f128956 commit ae45d47

File tree

4 files changed

+63
-88
lines changed

4 files changed

+63
-88
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
pip3 install build
3232
python -m build .
3333
env:
34+
# This is also supported by Hatch; see
35+
# https://github.com/ofek/hatch-vcs#version-source-environment-variables
3436
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DOCKER: ${{ inputs.tag }}
3537

3638
- name: Publish to PyPI

pyproject.toml

Lines changed: 61 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,66 @@
11
[build-system]
2-
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2"]
2+
requires = ["hatchling", "hatch-vcs"]
3+
build-backend = "hatchling.build"
34

4-
[tool.setuptools_scm]
5-
write_to = 'docker/_version.py'
5+
[project]
6+
name = "docker"
7+
dynamic = ["version"]
8+
description = "A Python library for the Docker Engine API."
9+
readme = "README.md"
10+
license = "Apache-2.0"
11+
requires-python = ">=3.8"
12+
maintainers = [
13+
{ name = "Docker Inc.", email = "[email protected]" },
14+
]
15+
classifiers = [
16+
"Development Status :: 5 - Production/Stable",
17+
"Environment :: Other Environment",
18+
"Intended Audience :: Developers",
19+
"License :: OSI Approved :: Apache Software License",
20+
"Operating System :: OS Independent",
21+
"Programming Language :: Python",
22+
"Programming Language :: Python :: 3",
23+
"Programming Language :: Python :: 3.8",
24+
"Programming Language :: Python :: 3.9",
25+
"Programming Language :: Python :: 3.10",
26+
"Programming Language :: Python :: 3.11",
27+
"Programming Language :: Python :: 3.12",
28+
"Topic :: Software Development",
29+
"Topic :: Utilities",
30+
]
31+
32+
dependencies = [
33+
"requests >= 2.26.0",
34+
"urllib3 >= 1.26.0",
35+
"pywin32>=304; sys_platform == \"win32\"",
36+
]
37+
38+
[project.optional-dependencies]
39+
ssh = [
40+
"paramiko>=2.4.3",
41+
]
42+
tls = [] # kept for backwards compatibility
43+
websockets = [
44+
"websocket-client >= 1.3.0",
45+
]
46+
47+
[project.urls]
48+
Changelog = "https://docker-py.readthedocs.io/en/stable/change-log.html"
49+
Documentation = "https://docker-py.readthedocs.io"
50+
Homepage = "https://github.com/docker/docker-py"
51+
Source = "https://github.com/docker/docker-py"
52+
Tracker = "https://github.com/docker/docker-py/issues"
53+
54+
[tool.hatch.version]
55+
source = "vcs"
56+
57+
[tool.hatch.build.hooks.vcs]
58+
version-file = "docker/_version.py"
59+
60+
[tool.hatch.build.targets.sdist]
61+
include = [
62+
"/docker",
63+
]
664

765
[tool.ruff]
866
target-version = "py38"

setup.cfg

Lines changed: 0 additions & 3 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)