Skip to content

Commit

Permalink
setup.py -> pyproject.toml, version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjc committed Nov 16, 2022
1 parent 5240f7b commit 5c1e131
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 56 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install package and pytest
run: |
python setup.py install
pip install -U .
pip install pytest
- name: Run tests
run: |
Expand Down
8 changes: 7 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ command will install the plugin with its dependencies::

$ conda install -c conda-forge flake8-rst-docstrings

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

$ pip install -e .[develop]

The new validator should be automatically included when using ``flake8`` which
may now report additional validation codes starting with ``RST`` (as defined
above). For example::
Expand Down Expand Up @@ -245,6 +250,7 @@ Version History
======= ========== ===========================================================
Version Released Changes
------- ---------- -----------------------------------------------------------
v0.3.0 2022-11-16 - Replaced ``setup.py`` with ``pyproject.toml``.
v0.2.7 2022-07-15 - Fix where function signature occurred in docstring body.
v0.2.6 2022-06-07 - Configuration option to define additional substitutions
(e.g. from Sphinx) for ``RST305`` (contribution from
Expand Down Expand Up @@ -303,7 +309,7 @@ This plugin is on GitHub at https://github.com/peterjc/flake8-rst-docstrings
To make a new release once tested locally and on TravisCI::

$ 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?rst?docstrings-X.Y.Z*

Expand Down
2 changes: 1 addition & 1 deletion flake8_rst_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
re.VERBOSE,
)

__version__ = "0.2.7"
__version__ = "0.3.0"


rst_prefix = "RST"
Expand Down
50 changes: 50 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[build-system]
requires = ['pip>=20.3', 'setuptools>=61', 'wheel']
build-backend = 'setuptools.build_meta'

[project]
name = 'flake8-rst-docstrings'
description = 'Python docstring reStructuredText (RST) validator for flake8'
keywords = ['strings', 'formatting', 'style', 'docstrings', 'reStructuredText']
license = {text = 'MIT'}
readme = 'README.rst'
authors = [
{name = 'Peter J. A. Cock'}
]
maintainers = [
{name = 'Peter J. A. Cock', email = 'p.j.a.cock@googlemail.com'}
]
classifiers = [
'Development Status :: 4 - Beta',
'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',
'restructuredtext_lint',
'pygments',
]
dynamic = ['version']
[project.entry-points]
'flake8.extension' = {RST = 'flake8_rst_docstrings:reStructuredTextChecker'}
[project.optional-dependencies]
develop = ['build', 'twine']
[project.urls]
Homepage = 'https://github.com/peterjc/flake8-rst-docstrings'
'Source Code' = 'https://github.com/peterjc/flake8-rst-docstrings/'
'Bug Tracker' = 'https://github.com/peterjc/flake8-rst-docstrings/issues'
Documentation = 'https://github.com/peterjc/flake8-rst-docstrings/blob/master/README.rst'

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

This file was deleted.

0 comments on commit 5c1e131

Please sign in to comment.