Skip to content

Commit b4d0db3

Browse files
committed
Switch from setuptools to hatch
1 parent 1450164 commit b4d0db3

File tree

33 files changed

+338
-128
lines changed

33 files changed

+338
-128
lines changed

docs/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
# sys.path.insert(0, os.path.abspath('.'))
1616

1717
import sphinx_bootstrap_theme
18+
from saturnin.sdk.__about__ import __version__
1819

1920
# -- Project information -----------------------------------------------------
2021

@@ -23,10 +24,10 @@
2324
author = 'Pavel Císař'
2425

2526
# The short X.Y version
26-
version = '0.8.0'
27+
version = __version__
2728

2829
# The full version, including alpha/beta/rc tags
29-
release = '0.8.0'
30+
release = __version__
3031

3132

3233
# -- General configuration ---------------------------------------------------

examples/apps/dummy/pyproject.toml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
[build-system]
2-
requires = ["setuptools >= 53.0.0", "wheel"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
44

55
[project]
66
name = "saturnin-example-app-dummy"
7-
version = "0.1.0"
7+
dynamic = ["version"]
88
description = "Test dummy application"
99
readme = "README.rst"
1010
requires-python = ">=3.8"
1111
license = { file = "LICENSE" }
12-
authors = [{ name = "Pavel Císař", email = "pcisar@users.sourceforge.net"}]
13-
keywords = ["text", "filter", "micro"]
12+
authors = [
13+
{ name = "Pavel Cisar", email = "pcisar@users.sourceforge.net"},
14+
]
15+
keywords = ["Saturnin", "example", "application"]
1416
classifiers = [
1517
"Development Status :: 4 - Beta",
1618
"Intended Audience :: Developers",
@@ -30,12 +32,23 @@ dependencies = [
3032
[project.urls]
3133
Home = "https://github.com/FirebirdSQL/saturnin-sdk"
3234
Documentation = "https://saturnin-sdk.rtfd.io"
33-
"Bug Reports" = "https://github.com/FirebirdSQL/saturnin-sdk/issues"
34-
Funding = "https://www.firebirdsql.org/en/donate/"
35+
Issues = "https://github.com/FirebirdSQL/saturnin-sdk/issues"
36+
Funding = "https://github.com/sponsors/pcisar"
3537
Source = "https://github.com/FirebirdSQL/saturnin-sdk"
3638

3739
[project.entry-points."saturnin.application"]
3840
"c7463ede-17f2-59e5-9fd0-43a3e39beccb" = "saturnin.examples.apps.dummy.api:APP_DESCRIPTOR"
3941

40-
[tool.setuptools]
41-
zip-safe = true
42+
[tool.hatch.version]
43+
path = "src/saturnin/examples/apps/dummy/api.py"
44+
pattern = "(?i)^(APP_VERSION)(: *str)? *= *([\\'\"])v?(?P<version>.+?)\\3"
45+
46+
[tool.hatch.build.targets.sdist]
47+
include = ["src"]
48+
49+
[tool.hatch.build.targets.wheel]
50+
packages = ["src/saturnin"]
51+
52+
[tool.hatch.envs.default]
53+
dependencies = [
54+
]

examples/apps/dummy/setup.py

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-FileCopyrightText: 2018-present The Firebird Project <www.firebirdsql.org>
2+
#
3+
# SPDX-License-Identifier: MIT

examples/apps/dummy/src/saturnin/examples/apps/dummy/api.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#coding:utf-8
1+
# SPDX-FileCopyrightText: 2023-present The Firebird Project <www.firebirdsql.org>
2+
#
3+
# SPDX-License-Identifier: MIT
24
#
35
# PROGRAM/MODULE: Saturnin examples
46
# FILE: saturnin/examples/apps/dummy/api.py
@@ -25,7 +27,7 @@
2527
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2628
# SOFTWARE.
2729
#
28-
# Copyright (c) 2019 Firebird Project (www.firebirdsql.org)
30+
# Copyright (c) 2023 Firebird Project (www.firebirdsql.org)
2931
# All Rights Reserved.
3032
#
3133
# Contributor(s): Pavel Císař (original code)

examples/apps/dummy/src/saturnin/examples/apps/dummy/application.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#coding:utf-8
1+
# SPDX-FileCopyrightText: 2023-present The Firebird Project <www.firebirdsql.org>
2+
#
3+
# SPDX-License-Identifier: MIT
24
#
35
# PROGRAM/MODULE: Saturnin examples
46
# FILE: saturnin/examples/apps/dummy/application.py
@@ -25,7 +27,7 @@
2527
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2628
# SOFTWARE.
2729
#
28-
# Copyright (c) 2019 Firebird Project (www.firebirdsql.org)
30+
# Copyright (c) 2023 Firebird Project (www.firebirdsql.org)
2931
# All Rights Reserved.
3032
#
3133
# Contributor(s): Pavel Císař (original code)

examples/apps/print_file/README.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
Saturnin print file application
33
===============================
44

5-
This sample application prints text files with optional syntax highlight.
5+
This sample application uses text reader and writer microservices from saturnin-core package
6+
to print text files with optional syntax highlight.

examples/apps/print_file/pyproject.toml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
[build-system]
2-
requires = ["setuptools >= 53.0.0", "wheel"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling"]
3+
build-backend = "hatchling.build"
44

55
[project]
66
name = "saturnin-example-app-printfile"
7-
version = "0.1.0"
7+
dynamic = ["version"]
88
description = "Print text file application"
99
readme = "README.rst"
1010
requires-python = ">=3.8"
1111
license = { file = "LICENSE" }
12-
authors = [{ name = "Pavel Císař", email = "pcisar@users.sourceforge.net"}]
13-
keywords = ["text", "filter", "micro"]
12+
authors = [
13+
{ name = "Pavel Cisar", email = "pcisar@users.sourceforge.net"},
14+
]
15+
keywords = ["Saturnin", "example", "application"]
1416
classifiers = [
1517
"Development Status :: 4 - Beta",
1618
"Intended Audience :: Developers",
@@ -30,12 +32,23 @@ dependencies = [
3032
[project.urls]
3133
Home = "https://github.com/FirebirdSQL/saturnin-sdk"
3234
Documentation = "https://saturnin-sdk.rtfd.io"
33-
"Bug Reports" = "https://github.com/FirebirdSQL/saturnin-sdk/issues"
34-
Funding = "https://www.firebirdsql.org/en/donate/"
35+
Issues = "https://github.com/FirebirdSQL/saturnin-sdk/issues"
36+
Funding = "https://github.com/sponsors/pcisar"
3537
Source = "https://github.com/FirebirdSQL/saturnin-sdk"
3638

3739
[project.entry-points."saturnin.application"]
3840
"826ecaca-d3b6-11ed-97b5-5c879cc92822" = "saturnin.examples.apps.print_file.api:APP_DESCRIPTOR"
3941

40-
[tool.setuptools]
41-
zip-safe = true
42+
[tool.hatch.version]
43+
path = "src/saturnin/examples/apps/print_file/api.py"
44+
pattern = "(?i)^(APP_VERSION)(: *str)? *= *([\\'\"])v?(?P<version>.+?)\\3"
45+
46+
[tool.hatch.build.targets.sdist]
47+
include = ["src"]
48+
49+
[tool.hatch.build.targets.wheel]
50+
packages = ["src/saturnin"]
51+
52+
[tool.hatch.envs.default]
53+
dependencies = [
54+
]

examples/apps/print_file/setup.py

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# SPDX-FileCopyrightText: 2018-present The Firebird Project <www.firebirdsql.org>
2+
#
3+
# SPDX-License-Identifier: MIT

0 commit comments

Comments
 (0)