Skip to content

Commit

Permalink
Replace setup.py by pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
claudep committed Feb 3, 2024
1 parent 2c254ae commit 3f90ac9
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 80 deletions.
3 changes: 0 additions & 3 deletions .coveragerc

This file was deleted.

13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11

- name: Get pip cache dir
id: pip-cache
Expand All @@ -29,19 +29,18 @@ jobs:
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: release-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}
key: release-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/tox.ini') }}
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 setuptools 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
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ 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-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox tox-gh-actions
python -m pip install --upgrade coverage[toml] tox tox-gh-actions
- name: Tox tests
run: |
Expand Down
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-toml
- id: check-added-large-files
- id: check-ast
- id: check-yaml
Expand Down
5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

2 changes: 1 addition & 1 deletion docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ editor itself and 'django-tinymce' (lower case) to refer to the Django applicati

Installation
------------
#. Install django-tinymce using `pip`_ (or any other way to install python package) from `PyPI`_. If you need to use a different way to install django-tinymce you can place the ``tinymce`` module on your Python path. You can put it into your Django project directory or run ``python setup.py install`` from a shell. ::
#. Install django-tinymce using `pip`_ (or any other way to install python package) from `PyPI`_. If you need to use a different way to install django-tinymce you can place the ``tinymce`` module on your Python path. ::

pip install django-tinymce

Expand Down
56 changes: 55 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "django-tinymce"
version = "3.6.1"
description = """
A Django application that contains a widget to render a
form field as a TinyMCE editor."""
readme = "README.rst"
authors = [
{name = "Aljosa Mohorovic", email = "aljosa.mohorovic@gmail.com"},
]
maintainers = [
{name = "Rémy Hubscher", email = "hubscher.remy@gmail.com"},
{name = "Claude Paroz", email = "claude@2xlibre.net"},
]
license = {text = "MIT License"}
requires-python = ">=3.8"
dependencies = [
"django>=3.2",
]
keywords = ["django", "widget", "tinymce"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"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 :: Software Development :: Libraries :: Application Frameworks",
"Topic :: Software Development :: Libraries :: Python Modules",
]

[project.urls]
Homepage = "https://github.com/jazzband/django-tinymce"
Documentation = "https://django-tinymce.readthedocs.org/"
Changelog = "https://github.com/jazzband/django-tinymce/blob/master/CHANGELOG.rst"

[tool.black]
line-length = 99
skip-numeric-underscore-normalization = true
Expand All @@ -17,7 +67,7 @@ exclude = '''
force_grid_wrap = 0
include_trailing_comma = true
known_first_party = 'lib,model,presenters'
known_third_party = ["django", "setuptools"]
known_third_party = ["django"]
line_length = 99
multi_line_output = 3
skip_glob = ''
Expand All @@ -26,3 +76,7 @@ combine_as_imports = true

# If set, imports will be sorted within their section independent to the import_type.
force_sort_within_sections = true

[tool.coverage.run]
source = ["tinymce"]
branch = true
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

58 changes: 0 additions & 58 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ deps =
dj42: Django>=4.2,<5.0
dj50: Django>=5.0,<5.1
djmain: https://github.com/django/django/archive/main.tar.gz
coverage
coverage[toml]
pyenchant
usedevelop = True
ignore_outcome =
Expand Down

0 comments on commit 3f90ac9

Please sign in to comment.