Skip to content

Commit

Permalink
Migration to use pyproject toml instead of setup.py (#82)
Browse files Browse the repository at this point in the history
* migration to pyproject.toml

* fixing workflow

* adding optional dependencies for tests

* added python parametrization for CI pytest
  • Loading branch information
twalen authored May 25, 2023
1 parent b199699 commit 844d79c
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 53 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,20 @@ on:

jobs:
build:

strategy:
fail-fast: false
matrix:
include:
- python-version: "3.8"
- python-version: "3.9"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: ${{ matrix.python-version }}

- name: Install apt dependencies
run: |
Expand All @@ -27,8 +32,7 @@ jobs:
- name: Install pip dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
python setup.py install_egg_info
pip install -e .
pip install -e .[server]
pip install pytest
- name: Run tests
Expand Down
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", "setuptools-scm"]
build-backend = "setuptools.build_meta"

[metadata]
name = "filetracker"

[tool.setuptools]
package-dir = {"filetracker" = "filetracker"}

[project]
name = "filetracker"
authors = [
{name = "SIO2 Project Team", email = "[email protected]"},
]
description = "Filetracker caching file storage"
readme = "README.md"
requires-python = ">=3.7"
license = {text = "GPL"}
classifiers = [
"Framework :: Django",
"Programming Language :: Python :: 3",
]
dependencies = [
"bsddb3==6.2.7",
"flup6",
"gunicorn==19.9.0",
"progressbar2",
"requests",
"six",
]
version = "2.1.5"

[project.urls]
"homepage" = "https://github.com/sio2project/filetracker"

[project.optional-dependencies]
server = [
"gevent==22.10.2",
"greenlet==2.0.2",
]
tests = [
"pytest",
]

[project.scripts]
filetracker = "filetracker.client.shell:main"
filetracker-server = "filetracker.servers.run:main"
filetracker-cache-cleaner = "filetracker.scripts.cachecleaner:main"
filetracker-migrate = "filetracker.scripts.migrate:main"
filetracker-recover = "filetracker.scripts.recover:main"
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

46 changes: 0 additions & 46 deletions setup.py

This file was deleted.

0 comments on commit 844d79c

Please sign in to comment.