Skip to content

Commit

Permalink
Replace setup.py with pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
peymanslh committed Nov 21, 2024
1 parent 1e8bfa8 commit 6bba808
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 64 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U setuptools twine wheel
python -m pip install -U twine build setuptools-scm
- name: Build package
run: |
python setup.py --version
python setup.py sdist --format=gztar bdist_wheel
twine check dist/*
python -m setuptools_scm
python -m build
twine check --strict dist/*
- name: Upload packages to Jazzband
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
with:
path: ${{ steps.pip-cache.outputs.dir }}
key:
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}
${{ matrix.python-version }}-v1-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/tox.ini') }}
restore-keys: |
${{ matrix.python-version }}-v1-
Expand Down
6 changes: 0 additions & 6 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,3 @@ build:

sphinx:
configuration: docs/conf.py

python:
install:
- requirements: requirements.txt
- method: pip
path: .
76 changes: 76 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,79 @@
[build-system]
requires = ["setuptools>=64", "setuptools_scm[toml]>=8"]
build-backend = "setuptools.build_meta"

[project]
name = "django-pipeline"
requires-python = ">=3.9"
version = "3.1.0"
description = "Pipeline is an asset packaging library for Django."
readme = "README.rst"
authors = [{ "name" = "Timothée Peignier", "email" = "[email protected]" }]
license = { text = "MIT" }
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Framework :: Django :: 5.1",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Utilities",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
]
keywords = [
"django",
"pipeline",
"asset",
"compiling",
"concatenation",
"compression",
"packaging",
]
dependencies = [
# indirect dependencies
"setuptools", # typically needed when pip-tools invokes setup.py
"wheel", # pip plugin needed by pip-tools

]

[project.optional-dependencies]
testing = [
"coveralls",
"tox",
"wheel",
"django",
]

[project.urls]
homepage = "https://github.com/jazzband/django-pipeline/"
documentation = "https://django-pipeline.readthedocs.io/"
repository = "https://github.com/jazzband/django-pipeline"
changelog = "https://github.com/jazzband/django-pipeline/blob/master/HISTORY.rst"

[tool.setuptools]
include-package-data = true

[tool.setuptools.packages.find]
exclude = ["tests", "tests.tests"]

[tool.setuptools_scm]
local_scheme = "dirty-tag"

[tool.black]
line-length = 88
target-version = ["py39"]
Expand Down
5 changes: 0 additions & 5 deletions requirements.txt

This file was deleted.

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 6bba808

Please sign in to comment.