diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..4904a2d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,55 @@ +[build-system] +build-backend = "hatchling.build" + +requires = [ "hatch-vcs", "hatchling" ] + +[project] +name = "aleph-message" +description = "Aleph.im message specification" +readme = "README.md" +license = { file = "LICENSE" } +authors = [ + { name = "Hugo Herter", email = "git@hugoherter.com" }, +] +requires-python = ">=3" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Programming Language :: Python :: 3", + "Intended Audience :: Developers", + "Topic :: System :: Distributed Computing", +] +dynamic = [ "version" ] +dependencies = [ + "pydantic>=1.10.5,<2.0.0", + "typing_extensions>=4.5.0", +] +urls.Documentation = "https://aleph.im/" +urls.Homepage = "https://github.com/aleph-im/aleph-message" +scripts.pyaleph = "aleph.commands:run" + +[tool.hatch.metadata] +allow-direct-references = true + +[tool.hatch.version] +source = "vcs" + +[tool.hatch.build.targets.wheel] +packages = [ + "Dockerfile", + "LICENSE", + "pyproject.toml", + "README.md", +] + +[tool.hatch.build.targets.sdist] +include = [ + "Dockerfile", + "LICENSE", + "pyproject.toml", + "README.md", +] + +[tool.pytest] +markers = [ + "slow: marks tests as slow (deselect with '-m \"not slow\"')", +] diff --git a/pytest.ini b/pytest.ini deleted file mode 100644 index 7617853..0000000 --- a/pytest.ini +++ /dev/null @@ -1,3 +0,0 @@ -[pytest] -markers = - slow: marks tests as slow (deselect with '-m "not slow"') diff --git a/setup.py b/setup.py deleted file mode 100644 index 1c4cce1..0000000 --- a/setup.py +++ /dev/null @@ -1,63 +0,0 @@ -# -*- coding: utf-8 -*- -"""Aleph Message - Python library for the Aleph.im message specification -(c) 2022 OKESO for Aleph.im -""" - -import os -import re - - -def get_version(): - version_file = os.path.join("aleph_message", "__init__.py") - initfile_lines = open(version_file, "rt").readlines() - version = r"^__version__ = ['\"]([^'\"]*)['\"]" - - for line in initfile_lines: - mo = re.search(version, line, re.M) - if mo: - return mo.group(1) - raise RuntimeError(f"Unable to find version string in {version_file}.") - - -from setuptools import setup - -# allow setup.py to be run from any path -os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) - -with open("README.md") as file: - long_description = file.read() - -setup( - name="aleph-message", - version=get_version(), - description="Aleph.im message specification ", - long_description=long_description, - long_description_content_type="text/markdown", - author="Hugo Herter", - author_email="git@hugoherter.com", - url="https://github.com/aleph-im/aleph-message", - packages=[ - "aleph_message", - "aleph_message.models", - "aleph_message.models.execution", - ], - package_data={ - "aleph_message": ["py.typed"], - "aleph_message.models": ["py.typed"], - "aleph_message.models.execution": ["py.typed"], - }, - data_files=[], - install_requires=[ - "pydantic>=1.10.5,<2.0.0", - "typing_extensions>=4.5.0", - ], - license="MIT", - platform="any", - keywords="aleph.im message validation specification", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Programming Language :: Python :: 3", - "Intended Audience :: Developers", - "Topic :: System :: Distributed Computing", - ], -)