Skip to content

Commit 844d79c

Browse files
authored
Migration to use pyproject toml instead of setup.py (#82)
* migration to pyproject.toml * fixing workflow * adding optional dependencies for tests * added python parametrization for CI pytest
1 parent b199699 commit 844d79c

File tree

4 files changed

+60
-53
lines changed

4 files changed

+60
-53
lines changed

.github/workflows/pytest.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,20 @@ on:
99

1010
jobs:
1111
build:
12-
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- python-version: "3.8"
17+
- python-version: "3.9"
1318
runs-on: ubuntu-latest
1419

1520
steps:
1621
- uses: actions/checkout@v3
17-
- name: Set up Python 3.8
22+
- name: Set up Python ${{ matrix.python-version }}
1823
uses: actions/setup-python@v4
1924
with:
20-
python-version: 3.8
25+
python-version: ${{ matrix.python-version }}
2126

2227
- name: Install apt dependencies
2328
run: |
@@ -27,8 +32,7 @@ jobs:
2732
- name: Install pip dependencies
2833
run: |
2934
python -m pip install --upgrade pip wheel setuptools
30-
python setup.py install_egg_info
31-
pip install -e .
35+
pip install -e .[server]
3236
pip install pytest
3337
3438
- name: Run tests

pyproject.toml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[build-system]
2+
requires = ["setuptools", "setuptools-scm"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[metadata]
6+
name = "filetracker"
7+
8+
[tool.setuptools]
9+
package-dir = {"filetracker" = "filetracker"}
10+
11+
[project]
12+
name = "filetracker"
13+
authors = [
14+
{name = "SIO2 Project Team", email = "[email protected]"},
15+
]
16+
description = "Filetracker caching file storage"
17+
readme = "README.md"
18+
requires-python = ">=3.7"
19+
license = {text = "GPL"}
20+
classifiers = [
21+
"Framework :: Django",
22+
"Programming Language :: Python :: 3",
23+
]
24+
dependencies = [
25+
"bsddb3==6.2.7",
26+
"flup6",
27+
"gunicorn==19.9.0",
28+
"progressbar2",
29+
"requests",
30+
"six",
31+
]
32+
version = "2.1.5"
33+
34+
[project.urls]
35+
"homepage" = "https://github.com/sio2project/filetracker"
36+
37+
[project.optional-dependencies]
38+
server = [
39+
"gevent==22.10.2",
40+
"greenlet==2.0.2",
41+
]
42+
tests = [
43+
"pytest",
44+
]
45+
46+
[project.scripts]
47+
filetracker = "filetracker.client.shell:main"
48+
filetracker-server = "filetracker.servers.run:main"
49+
filetracker-cache-cleaner = "filetracker.scripts.cachecleaner:main"
50+
filetracker-migrate = "filetracker.scripts.migrate:main"
51+
filetracker-recover = "filetracker.scripts.recover:main"

setup.cfg

Lines changed: 0 additions & 2 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)