Skip to content

Commit

Permalink
Add pyproject.toml and update setup.py for new build system
Browse files Browse the repository at this point in the history
  • Loading branch information
hadijannat committed Jul 20, 2024
1 parent 50dfbce commit 5c4f852
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 37 deletions.
2 changes: 2 additions & 0 deletions basyx/aas/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# basyx/aas/version.py
__version__ = '0.1.0'
52 changes: 19 additions & 33 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,58 +1,44 @@
[build-system]
requires = ["setuptools>=40.8.0", "wheel"]
requires = ["setuptools>=45", "wheel", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[project]
name = "basyx-python-sdk"
version = "1.0.0" # actual version
version = "0.1.0"
description = "The Eclipse BaSyx Python SDK, an implementation of the Asset Administration Shell for Industry 4.0 systems"
authors = [
{name = "The Eclipse BaSyx Authors", email = "admins@iat.rwth-aachen.de"} # actual authors
{ name = "The Eclipse BaSyx Authors", email = "admins@iat.rwth-aachen.de" }
]
readme = "README.md"
license = {file = "LICENSE"}
license = { file = "LICENSE" }
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Development Status :: 5 - Production/Stable"
]
requires-python = ">=3.8"
dependencies = [
"jsonschema~=4.7",
"python-dateutil>=2.8,<3",
"lxml>=4.2,<5",
"python-dateutil>=2.8,<3.0",
"pyecma376-2>=0.2.4",
"urllib3>=1.26,<2.0",
"lxml-stubs~=0.5.1",
]

[project.optional-dependencies]
dev = [
"pycodestyle",
"mypy",
"coverage",
"codeblocks",
"types-python-dateutil",
]

docs = [
"sphinx",
"sphinx-rtd-theme",
"sphinx-argparse",
]

test = [
"pytest",
"pytest-cov",
"pyecma376-2>=0.2.4"
]

[project.urls]
Homepage = "https://github.com/eclipse-basyx/basyx-python-sdk"

[tool.setuptools.packages.find]
exclude = ["test", "test.*"]
[project.scripts]
aas-compliance-check = "basyx.aas.compliance_tool.cli:main"

[tool.setuptools]
packages = ["basyx"]

[tool.setuptools.package-data]
"basyx" = ["py.typed"]
"basyx.aas.examples.data" = ["TestFile.pdf"]
basyx = ["py.typed"]
"basyx.aas.examples.data" = ["TestFile.pdf"]

[tool.setuptools.exclude-package-data]
"*" = ["test", "test.*"]

[tool.setuptools_scm]
26 changes: 22 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
from setuptools import setup, find_packages
#!/usr/bin/env python3
# Copyright (c) 2019-2024 the Eclipse BaSyx Authors
#
# This program and the accompanying materials are made available under the terms of the MIT License, available in
# the LICENSE file of this project.
#
# SPDX-License-Identifier: MIT

# Metadata is now in pyproject.toml, but we need this file for backwards compatibility
setup(
import setuptools

with open("README.md", "r", encoding='utf-8') as fh:
long_description = fh.read()

setuptools.setup(
name="basyx-python-sdk",
packages=find_packages(exclude=["test", "test.*"]),
# version is managed by pyproject.toml
author="The Eclipse BaSyx Authors",
description="The Eclipse BaSyx Python SDK, an implementation of the Asset Administration Shell for Industry 4.0 "
"systems",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/eclipse-basyx/basyx-python-sdk",
packages=setuptools.find_packages(exclude=["test", "test.*"]),
zip_safe=False,
package_data={
"basyx": ["py.typed"],
"basyx.aas.examples.data": ["TestFile.pdf"],
Expand Down

0 comments on commit 5c4f852

Please sign in to comment.