Skip to content

Commit

Permalink
Merge pull request #39 from jelmer/pyproject.toml
Browse files Browse the repository at this point in the history
Migrate to pyproject.toml
  • Loading branch information
jelmer authored Mar 8, 2023
2 parents 5cdbd25 + bc4c42b commit 6bfa17d
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 65 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
filename = prometheus_xmpp/
45 changes: 23 additions & 22 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,26 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip pyasn1 aiohttp
python setup.py develop
- name: Style checks
run: |
python -m pip install flake8
python -m flake8 prometheus_xmpp
- name: Typing checks
run: |
pip install -U mypy types-pytz types-jinja2 types-PyYAML
python -m mypy --ignore-missing-imports prometheus_xmpp
- name: Test suite run
run: |
python -m unittest tests.test_suite
env:
PYTHONHASHSEED: random
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip pyasn1 aiohttp
python setup.py develop
- name: Style checks
run: |
python -m pip install flake8
python -m flake8 prometheus_xmpp
- name: Typing checks
run: |
pip install -U mypy types-pytz types-jinja2 types-PyYAML
python -m mypy --ignore-missing-imports prometheus_xmpp
- name: Test suite run
run: |
python -m pip install ".[testing]"
python -m unittest tests.test_suite
env:
PYTHONHASHSEED: random
51 changes: 51 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[project]
name = "prometheus-xmpp-alerts"
authors = [{name = "Jelmer Vernooij", email = "[email protected]"}]
description = "Prometheus XMPP Alerts hook"
license = {text = "Apachev2"}
keywords = ["prometheus xmpp jabber"]
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
"Topic :: Software Development :: Version Control",
]
requires-python = ">= 3.7"
dependencies = [
"slixmpp",
"aiohttp",
"pytz",
"pyyaml",
"aiohttp_openmetrics",
"jinja2",
"bs4",
]
dynamic = ["version"]

[project.urls]
Homepage = "https://jelmer.uk/code/prometheus-xmpp-alerts"
"Bug Tracker" = "https://github.com/jelmer/prometheus-xmpp-alerts/issues"
Repository = "https://github.com/jelmer/prometheus-xmpp-alerts"
GitHub = "https://github.com/jelmer/prometheus-xmpp-alerts"

[project.scripts]
prometheus-xmpp-alerts = "prometheus_xmpp.__main__:main"

[project.optional-dependencies]
testing = ["pytz"]

[tool.setuptools]
packages = ["prometheus_xmpp"]
include-package-data = false

[tool.setuptools.dynamic]
version = {attr = "prometheus_xmpp.__version__"}
43 changes: 0 additions & 43 deletions setup.cfg

This file was deleted.

0 comments on commit 6bfa17d

Please sign in to comment.