Skip to content

Commit 51e60ca

Browse files
committed
Add initial pyproject.toml
--- + Update package init to explicitly export __version__
1 parent 5fc8aa0 commit 51e60ca

2 files changed

Lines changed: 69 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
[build-system]
2+
# We use scikit-build-core to build our project, which heavily relies on certain
3+
# dependencies to be installed:
4+
# - CMake
5+
# - Ninja
6+
# - A compatible compiler (GCC recommended)
7+
requires = ["scikit-build-core", "setuptools-scm>=8"]
8+
build-backend = "scikit_build_core.build"
9+
10+
[project]
11+
name = "icspacket"
12+
dynamic = ["version"]
13+
description = "Python classes to interact with industrial control systems (ICS) using various protocols."
14+
readme = "README.md"
15+
# Currently, Python 3.11 is NOT supported due to breaking changes within the
16+
# typing module. Additionally, caterpillar-py requires at least Python 3.12 to
17+
# prevent unintentional side-effects.
18+
requires-python = ">3.11"
19+
keywords = [
20+
"ics",
21+
"ics-security",
22+
"libiec61850",
23+
"iec61850",
24+
"iso8823",
25+
"iso8237",
26+
"cotp",
27+
"tpkt",
28+
"goose",
29+
]
30+
authors = [{ name = "MatrixEditor" }]
31+
classifiers = [
32+
"Development Status :: 4 - Beta",
33+
"Programming Language :: Python",
34+
"Programming Language :: Python :: 3.12",
35+
"Programming Language :: Python :: 3.13",
36+
# Python 3.14 installation works but CI is not configured yet, so installation
37+
# must be performed manually.
38+
"Programming Language :: Python :: 3.14",
39+
"Programming Language :: Python :: Implementation :: CPython",
40+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
41+
]
42+
dependencies = [
43+
"caterpillar-py", # binary protocols
44+
"bitarray", # asn1c-python extensions
45+
# --- dependencies for examples
46+
"rich", # colored terminal output and logging
47+
"cmd2", # advanced command shells (cmd 2.0)
48+
]
49+
50+
[project.urls]
51+
Documentation = "https://github.com/MatrixEditor/icspacket#readme"
52+
Issues = "https://github.com/MatrixEditor/icspacket/issues"
53+
GitHub = "https://github.com/MatrixEditor/icspacket"
54+
55+
[tool.scikit-build.cmake]
56+
# NOTE: To enable extra debugging output at runtime you might also add
57+
# -DASN_EMIT_DEBUG=1 as a compile-time define.
58+
# build-type = "Debug"
59+
60+
# --- Dynamic Version scheme
61+
[tool.scikit-build]
62+
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
63+
sdist.include = ["src/icspacket/_version.py"]
64+
65+
[tool.setuptools_scm]
66+
write_to = "src/icspacket/_version.py"

src/icspacket/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@
1515
# along with this program. If not, see <https://www.gnu.org/licenses/>.
1616

1717
# just export only one version candidate
18-
from ._version import __version__
18+
from ._version import __version__
19+
20+
__all__ = ["__version__"]

0 commit comments

Comments
 (0)