Skip to content

Commit

Permalink
packaging: migrate to declarative setup.cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
deronnax committed Oct 31, 2023
1 parent ac6fe59 commit 077626a
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 67 deletions.
44 changes: 44 additions & 0 deletions setup.cfg
@@ -1,3 +1,47 @@
[metadata]
name = flake8-isort
version = 6.1.1.dev0
author = Gil Forcada
author_email = gil.gnome@gmail.com
license = GPL version 2
description = flake8 plugin that integrates isort .
keywords = pep8, flake8, python, isort, imports
url = https://github.com/gforcada/flake8-isort
long_description = file:README.rst

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

[options]
py_modules = flake8_isort
zip_safe = False
install_requires = flake8; isort >= 5.0.0, <6
include_package_data = True
python_requires = >=3.8
test_suite = run_tests

[options.entry_points]
flake8.extension = I00 = flake8_isort:Flake8Isort

[options.extras_require]
test = pytest

[zest.releaser]
create-wheel = yes

Expand Down
68 changes: 1 addition & 67 deletions setup.py
@@ -1,69 +1,3 @@
from setuptools import setup

short_description = 'flake8 plugin that integrates isort .'


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-isort',
version='6.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 isort imports',
author='Gil Forcada',
author_email='gil.gnome@gmail.com',
url='https://github.com/gforcada/flake8-isort',
license='GPL version 2',
py_modules=[
'flake8_isort',
],
include_package_data=True,
test_suite='run_tests',
zip_safe=False,
install_requires=[
'flake8',
'isort >= 5.0.0, <6',
],
extras_require={
'test': [
'pytest',
],
},
entry_points={
'flake8.extension': [
'I00 = flake8_isort:Flake8Isort',
],
},
)
setup()
13 changes: 13 additions & 0 deletions tox.ini
@@ -0,0 +1,13 @@
[tox]
env_list =
py310
minversion = 4.11.3

[testenv]
description = run the tests with pytest
package = wheel
wheel_build_env = .pkg
deps =
pytest>=6
commands =
pytest {tty:--color=yes} run_tests.py {posargs}

0 comments on commit 077626a

Please sign in to comment.