diff --git a/CHANGES.rst b/CHANGES.rst index 31c59c8..e080f78 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -12,6 +12,12 @@ Changelog - Test pre-release of python 3.12. [gforcada] +- Use `pyproject.toml` rather than `setup.py`. + [gforcada] + +- Switch from `setuptools` to `hatchling`. + [gforcada] + 2.1.0 (2022-12-23) ------------------ diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2d87475 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,46 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] +name = "flake8-builtins" +version = "2.1.1.dev0" +authors = [ + { name="Gil Forcada Codinachs", email="gil.gnome@gmail.com" }, +] +description = "Check for python builtins being used as variables or parameters" +keywords = ["pep8", "flake8", "python", ] +license = {file = "LICENSE"} +readme = "README.rst" +requires-python = ">=3.8" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Framework :: Flake8", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Software Development", + "Topic :: Software Development :: Quality Assurance", +] +dependencies = ["flake8"] + +[project.urls] +"Homepage" = "https://github.com/gforcada/flake8-builtins" +"Bug Tracker" = "https://github.com/gforcada/flake8-builtins/issues" +"Changelog" = "https://github.com/gforcada/flake8-builtins/blob/master/CHANGES.rst" + +[project.optional-dependencies] +test = ["pytest"] + +[project.entry-points."flake8.extension"] +A00 = "flake8_builtins:BuiltinsChecker" diff --git a/setup.py b/setup.py deleted file mode 100644 index 42a613a..0000000 --- a/setup.py +++ /dev/null @@ -1,64 +0,0 @@ -from setuptools import setup - -short_description = 'Check for python builtins being used as variables or parameters.' - - -def read_file(filename): - with open(filename) as file_obj: - file_contents = file_obj.read() - return file_contents - - -long_description = f""" -{read_file('README.rst')} -{read_file('CHANGES.rst')} -""" - - -setup( - name='flake8-builtins', - version='2.1.1.dev0', - description=short_description, - long_description=long_description, - # Get more from https://pypi.org/classifiers/ - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Environment :: Console', - 'Framework :: Flake8', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: GNU General Public License v2 (GPLv2)', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - 'Programming Language :: Python :: Implementation :: CPython', - 'Programming Language :: Python :: Implementation :: PyPy', - 'Topic :: Software Development', - 'Topic :: Software Development :: Quality Assurance', - ], - python_requires='>=3.8', - keywords='pep8 flake8 python', - author='Gil Forcada', - author_email='gil.gnome@gmail.com', - url='https://github.com/gforcada/flake8-builtins', - license='GPL version 2', - py_modules=['flake8_builtins'], - include_package_data=True, - test_suite='run_tests', - zip_safe=False, - install_requires=[ - 'flake8', - ], - extras_require={ - 'test': [ - 'pytest', - ], - }, - entry_points={ - 'flake8.extension': ['A00 = flake8_builtins:BuiltinsChecker'], - }, -)