Convert setup.py to static setup.cfg and format with setup-cfg-fmt
This commit is contained in:
parent
a0bdc3c5ac
commit
b3fb55586c
|
@ -1,12 +1,12 @@
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
rev: v2.29.0
|
rev: v2.29.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyupgrade
|
||||||
args: ["--py36-plus"]
|
args: ["--py36-plus"]
|
||||||
|
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 21.9b0
|
rev: 21.11b1
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: black
|
||||||
args: ["--target-version", "py36"]
|
args: ["--target-version", "py36"]
|
||||||
|
@ -15,19 +15,19 @@ repos:
|
||||||
types: []
|
types: []
|
||||||
|
|
||||||
- repo: https://github.com/asottile/blacken-docs
|
- repo: https://github.com/asottile/blacken-docs
|
||||||
rev: v1.11.0
|
rev: v1.12.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: blacken-docs
|
- id: blacken-docs
|
||||||
args: ["--target-version", "py36"]
|
args: ["--target-version", "py36"]
|
||||||
additional_dependencies: [black==20.8b1]
|
additional_dependencies: [black==21.11b1]
|
||||||
|
|
||||||
- repo: https://github.com/PyCQA/isort
|
- repo: https://github.com/PyCQA/isort
|
||||||
rev: 5.9.3
|
rev: 5.10.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
|
|
||||||
- repo: https://github.com/PyCQA/flake8
|
- repo: https://github.com/PyCQA/flake8
|
||||||
rev: 3.9.2
|
rev: 4.0.1
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
additional_dependencies: [flake8-2020, flake8-implicit-str-concat]
|
additional_dependencies: [flake8-2020, flake8-implicit-str-concat]
|
||||||
|
@ -43,6 +43,11 @@ repos:
|
||||||
- id: check-merge-conflict
|
- id: check-merge-conflict
|
||||||
- id: check-yaml
|
- id: check-yaml
|
||||||
|
|
||||||
|
- repo: https://github.com/asottile/setup-cfg-fmt
|
||||||
|
rev: v1.20.0
|
||||||
|
hooks:
|
||||||
|
- id: setup-cfg-fmt
|
||||||
|
|
||||||
- repo: https://github.com/tox-dev/tox-ini-fmt
|
- repo: https://github.com/tox-dev/tox-ini-fmt
|
||||||
rev: 0.5.1
|
rev: 0.5.1
|
||||||
hooks:
|
hooks:
|
||||||
|
|
49
setup.cfg
49
setup.cfg
|
@ -1,3 +1,52 @@
|
||||||
|
[metadata]
|
||||||
|
name = pylast
|
||||||
|
description = A Python interface to Last.fm and Libre.fm
|
||||||
|
long_description = file: README.md
|
||||||
|
long_description_content_type = text/markdown
|
||||||
|
url = https://github.com/pylast/pylast
|
||||||
|
author = Amr Hassan <amr.hassan@gmail.com> and Contributors
|
||||||
|
author_email = amr.hassan@gmail.com
|
||||||
|
license = Apache-2.0
|
||||||
|
license_file = LICENSE.txt
|
||||||
|
classifiers =
|
||||||
|
Development Status :: 5 - Production/Stable
|
||||||
|
License :: OSI Approved :: Apache Software License
|
||||||
|
Programming Language :: Python :: 3
|
||||||
|
Programming Language :: Python :: 3 :: Only
|
||||||
|
Programming Language :: Python :: 3.6
|
||||||
|
Programming Language :: Python :: 3.7
|
||||||
|
Programming Language :: Python :: 3.8
|
||||||
|
Programming Language :: Python :: 3.9
|
||||||
|
Programming Language :: Python :: 3.10
|
||||||
|
Programming Language :: Python :: Implementation :: CPython
|
||||||
|
Programming Language :: Python :: Implementation :: PyPy
|
||||||
|
Topic :: Internet
|
||||||
|
Topic :: Multimedia :: Sound/Audio
|
||||||
|
Topic :: Software Development :: Libraries :: Python Modules
|
||||||
|
keywords =
|
||||||
|
Last.fm
|
||||||
|
music
|
||||||
|
scrobble
|
||||||
|
scrobbling
|
||||||
|
|
||||||
|
[options]
|
||||||
|
packages = find:
|
||||||
|
python_requires = >=3.6
|
||||||
|
package_dir = =src
|
||||||
|
setup_requires =
|
||||||
|
setuptools-scm
|
||||||
|
|
||||||
|
[options.packages.find]
|
||||||
|
where = src
|
||||||
|
|
||||||
|
[options.extras_require]
|
||||||
|
tests =
|
||||||
|
flaky
|
||||||
|
pytest
|
||||||
|
pytest-cov
|
||||||
|
pytest-random-order
|
||||||
|
pyyaml
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
max_line_length = 88
|
max_line_length = 88
|
||||||
|
|
||||||
|
|
39
setup.py
39
setup.py
|
@ -1,47 +1,12 @@
|
||||||
from setuptools import find_packages, setup
|
from setuptools import setup
|
||||||
|
|
||||||
with open("README.md") as f:
|
|
||||||
long_description = f.read()
|
|
||||||
|
|
||||||
|
|
||||||
def local_scheme(version):
|
def local_scheme(version) -> str:
|
||||||
"""Skip the local version (eg. +xyz of 0.6.1.dev4+gdf99fe2)
|
"""Skip the local version (eg. +xyz of 0.6.1.dev4+gdf99fe2)
|
||||||
to be able to upload to Test PyPI"""
|
to be able to upload to Test PyPI"""
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="pylast",
|
|
||||||
description="A Python interface to Last.fm and Libre.fm",
|
|
||||||
long_description=long_description,
|
|
||||||
long_description_content_type="text/markdown",
|
|
||||||
author="Amr Hassan <amr.hassan@gmail.com> and Contributors",
|
|
||||||
author_email="amr.hassan@gmail.com",
|
|
||||||
url="https://github.com/pylast/pylast",
|
|
||||||
license="Apache2",
|
|
||||||
keywords=["Last.fm", "music", "scrobble", "scrobbling"],
|
|
||||||
packages=find_packages(where="src"),
|
|
||||||
package_dir={"": "src"},
|
|
||||||
use_scm_version={"local_scheme": local_scheme},
|
use_scm_version={"local_scheme": local_scheme},
|
||||||
setup_requires=["setuptools_scm"],
|
|
||||||
extras_require={
|
|
||||||
"tests": ["flaky", "pytest", "pytest-cov", "pytest-random-order", "pyyaml"]
|
|
||||||
},
|
|
||||||
python_requires=">=3.6",
|
|
||||||
classifiers=[
|
|
||||||
"Development Status :: 5 - Production/Stable",
|
|
||||||
"License :: OSI Approved :: Apache Software License",
|
|
||||||
"Topic :: Internet",
|
|
||||||
"Topic :: Multimedia :: Sound/Audio",
|
|
||||||
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
||||||
"Programming Language :: Python :: 3",
|
|
||||||
"Programming Language :: Python :: 3.6",
|
|
||||||
"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",
|
|
||||||
"Programming Language :: Python :: Implementation :: CPython",
|
|
||||||
"Programming Language :: Python :: Implementation :: PyPy",
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue