Skip to content

Commit 36bc853

Browse files
authored
Merge pull request #178 from graingert/apply-setup-py-upgrade
2 parents c24f3e3 + 55b5c18 commit 36bc853

4 files changed

Lines changed: 70 additions & 61 deletions

File tree

.pre-commit-config.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/asottile/pyupgrade
3-
rev: v2.7.2
3+
rev: v2.7.4
44
hooks:
55
- id: pyupgrade
66
args: ["--py36-plus"]
@@ -12,23 +12,23 @@ repos:
1212
args: ["--target-version", "py36"]
1313

1414
- repo: https://gitlab.com/pycqa/flake8
15-
rev: 3.8.3
15+
rev: 3.8.4
1616
hooks:
1717
- id: flake8
1818
additional_dependencies: [flake8-2020, flake8-implicit-str-concat]
1919

2020
- repo: https://github.com/timothycrosley/isort
21-
rev: 5.4.2
21+
rev: 5.6.4
2222
hooks:
2323
- id: isort
2424

2525
- repo: https://github.com/pre-commit/pygrep-hooks
26-
rev: v1.6.0
26+
rev: v1.7.0
2727
hooks:
2828
- id: python-check-blanket-noqa
2929

3030
- repo: https://github.com/pre-commit/pre-commit-hooks
31-
rev: v3.2.0
31+
rev: v3.3.0
3232
hooks:
3333
- id: check-merge-conflict
3434
- id: check-toml
@@ -40,3 +40,8 @@ repos:
4040
- id: pydocstyle
4141
args: ["--convention", "google"]
4242
files: "src/"
43+
44+
- repo: https://github.com/asottile/setup-cfg-fmt
45+
rev: v1.15.1
46+
hooks:
47+
- id: setup-cfg-fmt

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
1+
[build-system]
2+
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]
3+
build-backend = "setuptools.build_meta"
4+
15
[tool.black]
26
target_version = ["py36"]
7+
8+
[tool.setuptools_scm]
9+
local_scheme = "no-local-version"

setup.cfg

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,54 @@
1+
[metadata]
2+
name = humanize
3+
description = Python humanize utilities
4+
long_description = file: README.md
5+
long_description_content_type = text/markdown
6+
url = https://github.com/jmoiron/humanize
7+
author = Jason Moiron
8+
author_email = jmoiron@jmoiron.net
9+
maintainer = Hugo van Kemenade
10+
license = MIT
11+
license_file = LICENCE
12+
classifiers =
13+
Development Status :: 5 - Production/Stable
14+
Intended Audience :: Developers
15+
License :: OSI Approved :: MIT License
16+
Operating System :: OS Independent
17+
Programming Language :: Python
18+
Programming Language :: Python :: 3
19+
Programming Language :: Python :: 3 :: Only
20+
Programming Language :: Python :: 3.6
21+
Programming Language :: Python :: 3.7
22+
Programming Language :: Python :: 3.8
23+
Programming Language :: Python :: 3.9
24+
Programming Language :: Python :: Implementation :: CPython
25+
Programming Language :: Python :: Implementation :: PyPy
26+
Topic :: Text Processing
27+
Topic :: Text Processing :: General
28+
keywords = humanize time size
29+
project_urls =
30+
Source=https://github.com/jmoiron/humanize
31+
Issue tracker=https://github.com/jmoiron/humanize/issues
32+
Funding=https://tidelift.com/subscription/pkg/pypi-humanize?utm_source=pypi-humanize&utm_medium=pypi
33+
34+
[options]
35+
packages = find:
36+
install_requires =
37+
setuptools
38+
python_requires = >=3.6
39+
include_package_data = True
40+
package_dir = =src
41+
zip_safe = False
42+
43+
[options.extras_require]
44+
tests =
45+
freezegun
46+
pytest
47+
pytest-cov
48+
49+
[options.packages.find]
50+
where = src
51+
152
[flake8]
253
max_line_length = 88
354

setup.py

Lines changed: 2 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,3 @@
1-
from setuptools import find_packages, setup
1+
from setuptools import setup
22

3-
with open("README.md", encoding="UTF-8") as f:
4-
long_description = f.read()
5-
6-
7-
def local_scheme(version):
8-
"""Skip the local version (eg. +xyz of 0.6.1.dev4+gdf99fe2)
9-
to be able to upload to Test PyPI"""
10-
return ""
11-
12-
13-
setup(
14-
name="humanize",
15-
description="Python humanize utilities",
16-
long_description=long_description,
17-
long_description_content_type="text/markdown",
18-
author="Jason Moiron",
19-
author_email="jmoiron@jmoiron.net",
20-
maintainer="Hugo van Kemenade",
21-
url="https://github.com/jmoiron/humanize",
22-
project_urls={
23-
"Source": "https://github.com/jmoiron/humanize",
24-
"Issue tracker": "https://github.com/jmoiron/humanize/issues",
25-
"Funding": "https://tidelift.com/subscription/pkg/pypi-humanize?"
26-
"utm_source=pypi-humanize&utm_medium=pypi",
27-
},
28-
license="MIT",
29-
keywords="humanize time size",
30-
packages=find_packages(where="src"),
31-
package_dir={"": "src"},
32-
include_package_data=True,
33-
zip_safe=False,
34-
use_scm_version={"local_scheme": local_scheme},
35-
install_requires=["setuptools"], # pkg_resources
36-
setup_requires=["setuptools_scm"],
37-
extras_require={"tests": ["freezegun", "pytest", "pytest-cov"]},
38-
python_requires=">=3.6",
39-
# Get strings from https://pypi.org/pypi?%3Aaction=list_classifiers
40-
classifiers=[
41-
"Development Status :: 5 - Production/Stable",
42-
"Intended Audience :: Developers",
43-
"License :: OSI Approved :: MIT License",
44-
"Operating System :: OS Independent",
45-
"Programming Language :: Python",
46-
"Programming Language :: Python :: 3",
47-
"Programming Language :: Python :: 3.6",
48-
"Programming Language :: Python :: 3.7",
49-
"Programming Language :: Python :: 3.8",
50-
"Programming Language :: Python :: 3.9",
51-
"Programming Language :: Python :: 3 :: Only",
52-
"Programming Language :: Python :: Implementation :: CPython",
53-
"Programming Language :: Python :: Implementation :: PyPy",
54-
"Topic :: Text Processing",
55-
"Topic :: Text Processing :: General",
56-
],
57-
)
3+
setup()

0 commit comments

Comments
 (0)