Skip to content

Commit

Permalink
Move to pyproject.toml (#93)
Browse files Browse the repository at this point in the history
  • Loading branch information
regebro authored Oct 18, 2023
1 parent 26b9e3a commit 65590cd
Show file tree
Hide file tree
Showing 6 changed files with 74 additions and 92 deletions.
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[flake8]
max-line-length = 120
33 changes: 10 additions & 23 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,18 @@ jobs:
fail-fast: true
steps:
- uses: actions/checkout@v3
- name: Install dependencies
- name: Install Package
run: |
python -m pip install setuptools==58.2.0 -e .[devenv]
sudo apt-get update
sudo apt-get install libreoffice
- name: Check style with black
run: |
# stop the build if there are Python syntax errors or undefined names
black . --check
- name: Lint with flake8
run: |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --max-line-length=120 --statistics
- name: Check the packaging
python -m pip install virtualenv
make devenv
- name: Check styles
run: |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
pyroma -d .
- name: And MANIFEST
make check
- name: Install Libreoffice
run: |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
check-manifest
sudo apt-get update
sudo apt-get install libreoffice
- name: Test with pytest
run: |
PYTHONPATH=/ pytest --cov=unoserver
coverage xml
- name: Upload coverage
run: |
bash <(curl -Ls https://coverage.codacy.com/get.sh) report -t 6ebaf74314ff4ccd8e87d1f988a4aa2f -r coverage.xml
source ve/bin/activate
make test
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ devenv: ve/bin/fullrelease

ve/bin/fullrelease:
virtualenv $(root_dir)/ve --python python3 --system-site-packages
$(bin_dir)/pip install setuptools$(setuptools_ver) -e .[devenv]
$(bin_dir)/pip install -I setuptools$(setuptools_ver) -e .[devenv]

check: devenv
$(bin_dir)/black src/unoserver tests
Expand Down
61 changes: 61 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
[build-system]
requires = ["setuptools>=61.2"]
build-backend = "setuptools.build_meta"

[project]
name = "unoserver"
version = "2.0b2.dev0"
description = "A server for file conversions with Libre Office"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Topic :: Office/Business",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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",
"License :: OSI Approved :: MIT License",
]
keywords = ["libreoffice", "conversion", "documents", "uno", "unoconv"]
authors = [{name = "Lennart Regebro", email = "[email protected]"}]
license = {text = "MIT"}
urls = {Homepage = "https://github.com/unoconv/unoserver"}
dynamic = ["readme"]
requires-python = ">= 3.8"

[project.optional-dependencies]
devenv = [
"pytest",
"pytest-cov",
"black",
"flake8",
"pyroma",
"check-manifest",
"zest.releaser",
]

[project.scripts]
unoserver = "unoserver.server:main"
unoconvert = "unoserver.client:converter_main"
unocompare = "unoserver.client:comparer_main"

[tool.setuptools]
packages = ["unoserver"]
package-dir = {"" = "src"}
include-package-data = true
zip-safe = false

[tool.setuptools.dynamic]
readme = {file = ["README.rst", "CONTRIBUTORS.rst", "CHANGES.rst"]}

[tool.pytest.ini_options]
testpaths = ["tests"]

[tool.check-manifest]
ignore = """
.pre-commit-config.yaml
tests/*
tests/documents/*"""
65 changes: 0 additions & 65 deletions setup.cfg

This file was deleted.

3 changes: 0 additions & 3 deletions setup.py

This file was deleted.

0 comments on commit 65590cd

Please sign in to comment.