Skip to content

Commit

Permalink
Move setup.py configs to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
tdg5 committed Apr 5, 2024
1 parent 5c6c77b commit 0563d39
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 121 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main-build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ jobs:
pip install .[all]
pip uninstall -y qless-with-throttles
pip freeze > requirements.txt
git diff --quiet
if [ ! $? -eq 0 ]; then
if ! `git diff --quiet`; then
echo "pip freeze caused file changes, failing!"
exit 1
fi
Expand All @@ -43,8 +43,7 @@ jobs:
run: |
source venv/bin/activate
make style
git diff --quiet
if [ ! $? -eq 0 ]; then
if ! `git diff --quiet`; then
echo "make style caused file changes, failing!"
exit 1
fi
Expand All @@ -53,6 +52,7 @@ jobs:
run: |
source venv/bin/activate
make nose
export SETUPTOOLS_SCM_PRETEND_VERSION_FOR_SERVICE_ORIENTED="$(cat VERSION)"
python -m build
- name: Checkout tdg5/github-action-pack
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/other-check-quality-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ jobs:
pip install .[all]
pip uninstall -y qless-with-throttles
pip freeze > requirements.txt
git diff --quiet
if [ ! $? -eq 0 ]; then
if ! `git diff --quiet`; then
echo "pip freeze caused file changes, failing!"
exit 1
fi
Expand All @@ -42,8 +41,7 @@ jobs:
run: |
source venv/bin/activate
make style
git diff --quiet
if [ ! $? -eq 0 ]; then
if ! `git diff --quiet`; then
echo "make style caused file changes, failing!"
exit 1
fi
Expand All @@ -52,4 +50,5 @@ jobs:
run: |
source venv/bin/activate
make nose
export SETUPTOOLS_SCM_PRETEND_VERSION_FOR_SERVICE_ORIENTED="$(cat VERSION)"
python -m build
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@ MANIFEST
venv/
*.sublime-project
*.sublime-workspace

junk/

# Auto-generated
qless/__version__.py
1 change: 1 addition & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Copyright (c) 2012 SEOmoz
Copyright (c) 2024 Danny Guinther

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

90 changes: 87 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,73 @@
[build-system]
requires = ["setuptools>=42"]
requires = [
"setuptools>=69",
"setuptools-scm>=8.0.4",

]
build-backend = "setuptools.build_meta"

[project]
authors = [{name = "Danny Guinther"}]
classifiers = [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.9",
]
dependencies = [
"argparse",
"decorator",
"hiredis",
"redis",
"typing_extensions>=4.8.0",
]
description = "Redis-based Queue Management"
dynamic = [
"version",
]
keywords = [
"job",
"qless",
"redis",
]
license = {text = "MIT"}
name = "qless-with-throttles"
readme = "README.md"

[project.optional-dependencies]
dev = [
"black~=24.2.0",
"build~=1.0.3",
"flake8-pyproject~=1.2.3",
"flake8~=7.0.0",
"isort~=5.8.0",
"mypy~=1.7.0",
"pre-commit~=2.20.0",
"removestar~=1.3.1",
"safety==2.3.4",
"twine~=4.0.2",
"types-decorator~=5.1.8.4",
"types-mock~=5.1.0.2",
]
test = [
"coverage",
"mock",
"nose",
"rednose",
"setuptools>=69",
]
all = ["qless-with-throttles[dev,test]"]

[project.urls]
Homepage = "https://github.com/tdg5/qless-py"
Source = "https://github.com/tdg5/qless-py"
Tracker = "https://github.com/tdg5/qless-py/issues"

[tool.black]
exclude = "qless/qless-core/.*"
exclude = "qless/(lua|qless-core)/.*"
include = "(qless(_test)?|qmore)/.*\\.py$"
line-length = 88
target-version = ["py39"]
Expand All @@ -21,7 +85,7 @@ line_length = 88
lines_after_imports = 2
multi_line_output = 3
profile = "black"
sections = ["FUTURE","STDLIB","THIRDPARTY","FIRSTPARTY","LOCALFOLDER"]
sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"]
skip_glob = ["qless/lua", "qless/qless-core"]
use_parentheses = true

Expand All @@ -47,3 +111,23 @@ verbosity = 2

[tool.pytest.ini_options]
markers = ["integration_test: marks tests as integration tests (deselect with '-m \"not integration_test\"')"]

[tool.setuptools]
script-files = ["bin/qless-py-worker"]

[tool.setuptools.package-data]
"qless" = ["lua/*.lua", "py.typed"]
"qmore" = ["py.typed"]

[tool.setuptools.packages.find]
include = [
"qless",
"qless.abstract",
"qless.queue_resolvers",
"qless.workers",
"qmore",
]
where = ["."]

[tool.setuptools_scm]
version_file = "qless/__version__.py"
107 changes: 0 additions & 107 deletions setup.py

This file was deleted.

0 comments on commit 0563d39

Please sign in to comment.