diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba4c1e0..c476bd8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9", "pypy3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "pypy3.9", "pypy3.10"] steps: - uses: actions/checkout@v4 - name: Set up Python @@ -24,3 +24,14 @@ jobs: run: python -m pip install -r requirements-dev.txt - name: Run tests run: pytest --cov=fluent + + build: + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - run: pipx run hatch build + - uses: actions/upload-artifact@v2 + with: + name: dist + path: dist/*.* diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 3248bb2..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,4 +0,0 @@ -include README.rst -include setup.py -include COPYING -include test/*py diff --git a/fluent/__about__.py b/fluent/__about__.py new file mode 100644 index 0000000..4b4d30f --- /dev/null +++ b/fluent/__about__.py @@ -0,0 +1 @@ +__version__ = '0.10.1dev1' diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8140e03 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,54 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "fluent-logger" +dynamic = ["version"] +description = "A Python logging handler for Fluentd event collector" +readme = "README.rst" +license = { file = "COPYING" } +requires-python = ">=3.7" +authors = [ + { name = "Kazuki Ohta", email = "kazuki.ohta@gmail.com" }, +] +maintainers = [ + { name = "Arcadiy Ivanov", email = "arcadiy@ivanov.biz" }, + { name = "Inada Naoki", email = "songofacandy@gmail.com" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: System :: Logging", +] +dependencies = [ + "msgpack>=1.0", +] + +[project.urls] +Download = "https://pypi.org/project/fluent-logger/" +Homepage = "https://github.com/fluent/fluent-logger-python" + +[tool.hatch.version] +path = "fluent/__about__.py" + +[tool.hatch.build.targets.sdist] +exclude = [ + "/.github", + "/.tox", + "/.venv", +] + +[tool.hatch.build.targets.wheel] +include = [ + "/fluent", +] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index b8f2760..0000000 --- a/setup.cfg +++ /dev/null @@ -1,10 +0,0 @@ -[nosetests] -match = ^test_ -cover-package = fluent -with-coverage = 1 -cover-erase = 1 -cover-branches = 1 -cover-inclusive = 1 -cover-min-percentage = 70 -[bdist_wheel] -universal = 1 diff --git a/setup.py b/setup.py deleted file mode 100755 index 1453d55..0000000 --- a/setup.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/python - -from os import path - -try: - from setuptools import setup -except ImportError: - from distutils.core import setup - -README = path.abspath(path.join(path.dirname(__file__), 'README.rst')) -desc = 'A Python logging handler for Fluentd event collector' - -setup( - name='fluent-logger', - version='0.10.0', - description=desc, - long_description=open(README).read(), - package_dir={'fluent': 'fluent'}, - packages=['fluent'], - install_requires=['msgpack>1.0'], - author='Kazuki Ohta', - author_email='kazuki.ohta@gmail.com', - maintainer='Arcadiy Ivanov', - maintainer_email='arcadiy@ivanov.biz', - url='https://github.com/fluent/fluent-logger-python', - download_url='https://pypi.org/project/fluent-logger/', - license='Apache License, Version 2.0', - classifiers=[ - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.5', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: Implementation :: CPython', - 'Programming Language :: Python :: Implementation :: PyPy', - 'Development Status :: 5 - Production/Stable', - 'Topic :: System :: Logging', - 'Intended Audience :: Developers', - ], - python_requires='>=3.5', - test_suite='tests' -)