Skip to content

Commit ed7d87c

Browse files
authored
Merge pull request #43 from cryptomilk/asn-pyproject
Migrate from setup.py to pyproject
2 parents 622b1f1 + c4ebc71 commit ed7d87c

33 files changed

+82
-88
lines changed

.github/workflows/ci.yml

+13-8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
name: Run Python Tests
23
on:
34
push:
@@ -10,16 +11,20 @@ on:
1011
jobs:
1112
build:
1213
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
17+
1318
steps:
14-
- uses: actions/checkout@v2
15-
- name: Install Python 3
16-
uses: actions/setup-python@v1
19+
- uses: actions/checkout@v3
20+
- name: Set up Python ${{ matrix.python-version }}
21+
uses: actions/setup-python@v4
1722
with:
18-
python-version: 3.8
23+
python-version: ${{ matrix.python-version }}
1924
- name: Install dependencies
2025
run: |
2126
sudo apt-get install libkrb5-dev
22-
python3 -m pip install --upgrade pip
23-
pip3 install -r requirements.txt
24-
- name: Run tests
25-
run: pushd tests; python3 runner.py; popd
27+
python -m pip install --upgrade pip
28+
python -m pip install tox tox-gh-actions
29+
- name: Test with tox
30+
run: tox

pyproject.toml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[build-system]
2+
requires = ["setuptools >= 61.0"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "cepces"
7+
version = "0.3.9"
8+
requires-python = ">=3.8"
9+
dependencies = [
10+
"cryptography >= 1.2",
11+
"requests",
12+
"requests_gssapi >= 1.2.2"
13+
]
14+
license = { file = "LICENSE" }
15+
authors = [
16+
{ name = "Daniel Uvehag", email = "[email protected]" }
17+
]
18+
keywords = ["certificate ca cep ces adcs wstep xcep"]
19+
classifiers = [
20+
"Development Status :: 5 - Production/Stable",
21+
"Environment :: Console",
22+
"Intended Audience :: System Administrators",
23+
"Topic :: System :: Systems Administration",
24+
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
25+
"Programming Language :: Python :: 3.9",
26+
"Programming Language :: Python :: 3.10",
27+
"Programming Language :: Python :: 3.11",
28+
"Programming Language :: Python :: 3.12"
29+
]
30+
description = "CEP/CES library."
31+
readme = "README.rst"
32+
33+
[project.urls]
34+
"Homepage" = "https://github.com/openSUSE/cepces"
35+
"Bug Tracker" = "https://github.com/openSUSE/cepces/issues"
36+
37+
[tool.setuptools.data-files]
38+
"libexec/certmonger" = ["bin/cepces-submit"]

requirements.txt

-3
This file was deleted.

setup.py

-77
This file was deleted.
File renamed without changes.

cepces/auth.py src/cepces/auth.py

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

cepces/core.py src/cepces/core.py

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

cepces/log.py src/cepces/log.py

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tox.ini

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
[tox]
2+
requires =
3+
tox>=4
4+
env_list = lint, type, 3.9, 3.10, 3.11, 3.12, 3.13
5+
6+
[gh-actions]
7+
python =
8+
3.9: py39
9+
3.10: py310, mypy
10+
3.11: py311, mypy
11+
3.12: py312, mypy
12+
3.13: py313, mypy
13+
14+
[testenv]
15+
description = run unit tests
16+
changedir = tests
17+
commands = {envpython} runner.py
18+
19+
; [testenv:lint]
20+
; description = run linters
21+
; skip_install = true
22+
; deps =
23+
; black
24+
; commands = black {posargs:.}
25+
;
26+
; [testenv:type]
27+
; description = run type checks
28+
; deps =
29+
; mypy
30+
; commands =
31+
; mypy {posargs:src tests}

0 commit comments

Comments
 (0)