Skip to content

Commit

Permalink
v0.3.4, setup.py to pyproject.toml for build
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc committed Nov 17, 2022
1 parent 09bb151 commit d8f2f0a
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 50 deletions.
8 changes: 7 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ Version History
======= ============ ===========================================================
Version Release date Changes
------- ------------ -----------------------------------------------------------
v0.3.4 2022-11-17 - Replaces ``setup.py`` with ``pyproject.toml`` for build.
v0.3.3 2022-05-16 - Cope with line-length as string in pyproject.toml config.
v0.3.2 2022-02-25 - Use ``tomli`` library to match black, contribution from
`Brian Helba <https://github.com/brianhelba>`_.
Expand Down Expand Up @@ -223,10 +224,15 @@ Developers

This plugin is on GitHub at https://github.com/peterjc/flake8-black

Developers may install the plugin from the git repository with optional build
dependencies::

$ pip install -e .[develop]

To make a new release once tested locally and online::

$ git tag vX.Y.Z
$ python setup.py sdist --formats=gztar && python setup.py bdist_wheel
$ python -m build
$ git push origin master --tags
$ twine upload dist/flake8?black-X.Y.Z*

Expand Down
4 changes: 2 additions & 2 deletions flake8_black.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from flake8 import LOG


__version__ = "0.3.3"
__version__ = "0.3.4"

black_prefix = "BLK"

Expand Down Expand Up @@ -223,7 +223,7 @@ def run(self):
except BadBlackConfig as err:
msg = "997 Invalid TOML file: %s" % err
except Exception as err:
msg = "999 Unexpected exception: %s" % err
msg = "999 Unexpected exception: %r" % err
else:
assert (
new_code != source
Expand Down
49 changes: 49 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[build-system]
requires = ['pip>=21.3', 'setuptools>=61', 'wheel']
build-backend = 'setuptools.build_meta'

[project]
name = 'flake8-black'
description = 'flake8 plugin to call black as a code style validator'
keywords = ['black', 'formatting', 'style', 'flake8']
license = {text = 'MIT'}
readme = 'README.rst'
authors = [
{name = 'Peter J. A. Cock'}
]
maintainers = [
{name = 'Peter J. A. Cock', email = '[email protected]'}
]
classifiers = [
'Intended Audience :: Developers',
'Framework :: Flake8',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Software Development :: Quality Assurance',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only'
]
requires-python = '>=3.7'
dependencies = [
'flake8>=3',
'black>=22.1.0',
'tomli',
]
dynamic = ['version']
[project.entry-points]
'flake8.extension' = {RST = 'flake8_black:BlackStyleChecker'}
[project.optional-dependencies]
develop = ['build', 'twine']
[project.urls]
Homepage = 'https://github.com/peterjc/flake8-black'
'Source Code' = 'https://github.com/peterjc/flake8-black/'
'Bug Tracker' = 'https://github.com/peterjc/flake8-black/issues'
Documentation = 'https://github.com/peterjc/flake8-black/blob/master/README.rst'

[tool.setuptools]
py-modules = ['flake8_black']
zip-safe = true
[tool.setuptools.dynamic]
version = {attr = 'flake8_black.__version__'}
47 changes: 0 additions & 47 deletions setup.py

This file was deleted.

0 comments on commit d8f2f0a

Please sign in to comment.