Migrate from setup.py and setup.cfg to pyproject.toml
This commit is contained in:
1 parent
b1f1dd68bb
commit
0320cf10dd
25 files changed
+85
-85
No files matched your search
@@ -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.
|
||||
|
||||
@@ -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
|
||||
@@ -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`
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
@@ -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="fb@3yourmind.com" },
|
||||
]
|
||||
maintainers = [{name = "David Wobrock", email = "david.wobrock@gmail.com"}]
|
||||
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" ]
|
||||
@@ -1,13 +0,0 @@
|
||||
[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
|
||||
|
||||
[flake8]
|
||||
max-line-length=88
|
||||
ignore=E203,W503
|
||||
@@ -1,68 +0,0 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import ast
|
||||
import re
|
||||
from os import path
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
|
||||
PROJECT_DIR = path.abspath(path.dirname(__file__))
|
||||
|
||||
|
||||
def get_version():
|
||||
constants = path.join(PROJECT_DIR, "django_migration_linter", "constants.py")
|
||||
_version_re = re.compile(r"__version__\s+=\s+(?P<version>.*)")
|
||||
with open(constants) as f:
|
||||
match = _version_re.search(f.read())
|
||||
version = match.group("version") if match is not None else '"unknown"'
|
||||
return str(ast.literal_eval(version))
|
||||
|
||||
|
||||
with open(path.join(PROJECT_DIR, "README.md")) as f:
|
||||
long_description = f.read()
|
||||
|
||||
|
||||
setup(
|
||||
name="django-migration-linter",
|
||||
version=get_version(),
|
||||
description="Detect backward incompatible migrations for your django project",
|
||||
long_description=long_description,
|
||||
long_description_content_type="text/markdown",
|
||||
url="https://github.com/3YOURMIND/django-migration-linter",
|
||||
author="3YOURMIND GmbH",
|
||||
author_email="david.wobrock@gmail.com",
|
||||
license="Apache License 2.0",
|
||||
packages=find_packages(include=["django_migration_linter*"]),
|
||||
install_requires=[
|
||||
"django>=2.2",
|
||||
"appdirs>=1.4.3",
|
||||
"toml>=0.10.2",
|
||||
],
|
||||
extras_require={
|
||||
"test": [
|
||||
"tox>=4.6.3",
|
||||
"mysqlclient>=2.1.1",
|
||||
"psycopg2>=2.9.6",
|
||||
"django_add_default_value>=0.4.0",
|
||||
"coverage>=7.2.7",
|
||||
],
|
||||
},
|
||||
keywords="django migration lint linter database backward compatibility",
|
||||
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",
|
||||
],
|
||||
)
|
||||
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.
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Reference in new issue
Block a user