Skip to content

Commit

Permalink
Migrate from setup.py and setup.cfg to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Wobrock committed Oct 29, 2023
1 parent b1f1dd6 commit 0320cf1
Show file tree
Hide file tree
Showing 25 changed files with 85 additions and 85 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 5.x.y

Miscellaneous:

- Migrated from `setup.py` and `setup.cfg` to `pyproject.toml`

## 5.0.0

- **Breaking change**: stop silently ignoring when the internal `sqlmigrate` call fails and the linter cannot analyse the migration.
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
prune tests
include README.md
include LICENSE
include CHANGELOG.md
include MANIFEST.in
recursive-include docs *
include tox.ini
include pyproject.toml
7 changes: 4 additions & 3 deletions docs/internals/publishing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

A small note on how the linter is usually published to PyPi:

- `rm -r django_migration_linter.egg-info/`
- `pip install wheel twine`
- `python3 setup.py sdist bdist_wheel --universal`
- `rm -r django_migration_linter.egg-info/ dist/`
- `pip install --upgrade build`
- `python -m build`
- `pip install --upgrade twine`
- `twine upload dist/django_migration_linter-X.Y.Z-py3-none-any.whl dist/django-migration-linter-X.Y.Z.tar.gz`
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ You can also ignore backward incompatible migration tests by adding this option

`python manage.py lintmigrations --exclude-migration-tests ALTER_COLUMN`

The migration test codes can be found in the [corresponding source code files](../django_migration_linter/sql_analyser/base.py).
The migration test codes can be found in the [corresponding source code files](../src/django_migration_linter/sql_analyser/base.py).

## Production usage example

Expand Down
68 changes: 68 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "django-migration-linter"
version = "5.0.0"
description = "Detect backward incompatible migrations for your django project"
authors = [
{ name="3YOURMIND GmbH", email="[email protected]" },
]
maintainers = [{name = "David Wobrock", email = "[email protected]"}]
readme = "README.md"
requires-python = ">=3.7"
dependencies = [
"django>=2.2",
"appdirs>=1.4.3",
"toml>=0.10.2",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Environment :: Web Environment",
"Framework :: Django",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.0",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
keywords = [
"django",
"migration",
"lint",
"linter",
"database",
"backward",
"compatibility",
]


[project.urls]
Changelog = "https://github.com/3YOURMIND/django-migration-linter/blob/main/CHANGELOG.md"
Repository = "https://github.com/3YOURMIND/django-migration-linter"

[project.optional-dependencies]
test = [
"tox>=4.6.3",
"mysqlclient>=2.1.1",
"psycopg2>=2.9.6",
"django_add_default_value>=0.4.0",
"coverage>=7.2.7",
]

[tool.isort]
multi_line_output = 3
include_trailing_comma = "True"
force_grid_wrap = 0
use_parentheses = "True"
ensure_newline_before_comments = "True"
line_length = 88
add_imports = [ "from __future__ import annotations" ]
13 changes: 0 additions & 13 deletions setup.cfg

This file was deleted.

68 changes: 0 additions & 68 deletions setup.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,7 @@ commands =
coverage xml -i
extras = test
pip_pre = true

[flake8]
max-line-length=88
ignore=E203,W503

0 comments on commit 0320cf1

Please sign in to comment.