From c00c30f6a86ed06d3bdccdb1bb1514fe5895e61c Mon Sep 17 00:00:00 2001 From: Simon Brugman Date: Fri, 13 Jan 2023 16:36:31 +0100 Subject: [PATCH] build: migrate to pyproject.toml --- pyproject.toml | 68 +++++++++++++++++++++++++++++++++++++++++++ requirements-dev.txt | 3 -- requirements/lint.txt | 5 ---- requirements/test.txt | 2 -- setup.cfg | 2 -- setup.py | 58 ------------------------------------ 6 files changed, 68 insertions(+), 70 deletions(-) create mode 100644 pyproject.toml delete mode 100644 requirements-dev.txt delete mode 100644 requirements/lint.txt delete mode 100644 requirements/test.txt delete mode 100644 setup.cfg delete mode 100644 setup.py diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..97a49db --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,68 @@ +[build-system] +build-backend = "setuptools.build_meta" +requires = ["setuptools>=61.2", "setuptools_scm[toml]>=6.2"] + +[project] +name = "flake8-executable" +description="A Flake8 plugin for checking executable permissions and shebangs." +readme="README.md" +keywords=["flake8", "linter","qa", "shebang"] +authors = [ + {name = "Hong Xu", email = "hong@topbug.net"}, + {name = "Simon Brugman", email = "sfbbrugman@gmail.com"}, +] +license={text = 'LGPL v3+'} +requires-python=">=3.7" +classifiers=[ + "Environment :: Console", + "Framework :: Flake8", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", + "Operating System :: OS Independent", + "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", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Software Development :: Quality Assurance", +] +dependencies = [ + "flake8", +] +dynamic = ["version"] + +[project.urls] +url="https://github.com/xuhdev/flake8-executable" + +[tool.setuptools.packages] +find = {} + +[project.optional-dependencies] +dev = [ + "tox", + "flake8-executable[test]", + "flake8-executable[lint]", +] +lint = [ + "pre-commit", +] +test = [ + "pytest", + "pytest-cov", +] + +[project.entry-points] +"flake8.extension" = {EXE00 = "flake8_executable:ExecutableChecker"} + +[tool.setuptools.dynamic] +version = {attr = "flake8_executable.__version__"} + +[tool.setuptools_scm] +write_to = "flake8_executable/_version.py" + +[tool.bandit] +exclude_dirs = ["/.eggs","/tests"] diff --git a/requirements-dev.txt b/requirements-dev.txt deleted file mode 100644 index 2c22600..0000000 --- a/requirements-dev.txt +++ /dev/null @@ -1,3 +0,0 @@ -tox --r requirements/lint.txt --r requirements/test.txt diff --git a/requirements/lint.txt b/requirements/lint.txt deleted file mode 100644 index 7a738a2..0000000 --- a/requirements/lint.txt +++ /dev/null @@ -1,5 +0,0 @@ -bandit==1.6.2 -flake8==3.9.2 -flake8-bugbear==21.4.3 -flake8-comprehensions==3.3.1 -mypy==0.812 diff --git a/requirements/test.txt b/requirements/test.txt deleted file mode 100644 index dea2b2c..0000000 --- a/requirements/test.txt +++ /dev/null @@ -1,2 +0,0 @@ -coverage==5.5 -pytest==6.2.5 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index e77318d..0000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[sdist] -formats=gztar diff --git a/setup.py b/setup.py deleted file mode 100644 index 9059369..0000000 --- a/setup.py +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) 2019 Hong Xu - -# This file is part of flake8-executable. - -# flake8-executable is free software: you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by the -# Free Software Foundation, either version 3 of the License, or (at your -# option) any later version. - -# flake8-executable is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License -# for more details. - -# You should have received a copy of the GNU Lesser General Public License -# along with flake8-executable. If not, see . - -import pathlib - -from setuptools import setup - - -setup( - name="flake8-executable", - description="A Flake8 plugin for checking executable permissions and shebangs.", - long_description=pathlib.Path('README.md').read_text(), - long_description_content_type="text/markdown", - keywords="flake8 linter qa", - author="Hong Xu", - author_email="hong@topbug.net", - url="https://github.com/xuhdev/flake8-executable", - license='LGPL v3+', - packages=["flake8_executable"], - data_files=[("", ["COPYING", "COPYING.GPL"])], - python_requires=">=3.6", - install_requires=["flake8 >= 3.0.0"], - classifiers=[ - "Environment :: Console", - "Framework :: Flake8", - "Intended Audience :: Developers", - "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", - "Operating System :: OS Independent", - "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 :: Only", - "Topic :: Software Development :: Libraries :: Python Modules", - "Topic :: Software Development :: Quality Assurance", - ], - entry_points={ - "flake8.extension": ["EXE00 = flake8_executable:ExecutableChecker"] - }, - use_scm_version={'write_to': 'flake8_executable/_version.py'}, - setup_requires=['setuptools_scm'] -)