Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modernize packaging using pyproject.toml #759

Merged
merged 3 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,17 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: release-${{ hashFiles('**/setup.py') }}
key: release-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
release-
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools twine wheel
python -m pip install -U pip build twine
- name: Build package
run: |
python setup.py --version
python setup.py sdist --format=gztar bdist_wheel
python -m build
twine check dist/*
- name: Upload packages to Jazzband
Expand Down
70 changes: 58 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,63 @@
[tool.coverage.run]
source = ["sorl"]
omit = [
"*/sorl-thumbnail/sorl/__init__.py",
"*/sorl/thumbnail/__init__.py",
"*/sorl/thumbnail/conf/__init__.py",
"*/sorl/thumbnail/admin/__init__.py",
]
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
[project]
name = "sorl-thumbnail"
dynamic = ["version"]
description = "Thumbnails for Django"
readme = "README.rst"
license = {file = "LICENSE"}
keywords = ["django", "thumbnail", "sorl"]
authors = [
{name = "Mikko Hellsing", email = "[email protected]"},
]
maintainers = [
{name = "Jazzband", email = "[email protected]"}
]
requires-python = ">= 3.8"
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'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',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
'Topic :: Multimedia :: Graphics',
'Framework :: Django',
'Framework :: Django :: 4.2',
'Framework :: Django :: 5.0',
'Framework :: Django :: 5.1',
]

[project.urls]
Homepage = "https://sorl-thumbnail.readthedocs.io/en/latest/"
Repository = "https://github.com/jazzband/sorl-thumbnail"


[tool.coverage.run]
source = ["sorl"]
omit = [
"*/sorl-thumbnail/sorl/__init__.py",
"*/sorl/thumbnail/__init__.py",
"*/sorl/thumbnail/conf/__init__.py",
"*/sorl/thumbnail/admin/__init__.py",
]

[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
]

# below line is required to generating versions with setuptools_scm
[tool.setuptools_scm]

[tool.ruff]
exclude = [
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

38 changes: 0 additions & 38 deletions setup.py

This file was deleted.

Loading