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:
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.29.0
|
||||
rev: v2.29.1
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
args: ["--py36-plus"]
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 21.9b0
|
||||
rev: 21.11b1
|
||||
hooks:
|
||||
- id: black
|
||||
args: ["--target-version", "py36"]
|
||||
|
@ -15,19 +15,19 @@ repos:
|
|||
types: []
|
||||
|
||||
- repo: https://github.com/asottile/blacken-docs
|
||||
rev: v1.11.0
|
||||
rev: v1.12.0
|
||||
hooks:
|
||||
- id: blacken-docs
|
||||
args: ["--target-version", "py36"]
|
||||
additional_dependencies: [black==20.8b1]
|
||||
additional_dependencies: [black==21.11b1]
|
||||
|
||||
- repo: https://github.com/PyCQA/isort
|
||||
rev: 5.9.3
|
||||
rev: 5.10.1
|
||||
hooks:
|
||||
- id: isort
|
||||
|
||||
- repo: https://github.com/PyCQA/flake8
|
||||
rev: 3.9.2
|
||||
rev: 4.0.1
|
||||
hooks:
|
||||
- id: flake8
|
||||
additional_dependencies: [flake8-2020, flake8-implicit-str-concat]
|
||||
|
@ -43,6 +43,11 @@ repos:
|
|||
- id: check-merge-conflict
|
||||
- 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
|
||||
rev: 0.5.1
|
||||
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]
|
||||
max_line_length = 88
|
||||
|
||||
|
|
39
setup.py
39
setup.py
|
@ -1,47 +1,12 @@
|
|||
from setuptools import find_packages, setup
|
||||
|
||||
with open("README.md") as f:
|
||||
long_description = f.read()
|
||||
from setuptools import setup
|
||||
|
||||
|
||||
def local_scheme(version):
|
||||
def local_scheme(version) -> str:
|
||||
"""Skip the local version (eg. +xyz of 0.6.1.dev4+gdf99fe2)
|
||||
to be able to upload to Test PyPI"""
|
||||
return ""
|
||||
|
||||
|
||||
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},
|
||||
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