Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply setup-py-upgrade #178

Merged
merged 5 commits into from
Nov 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.7.2
rev: v2.7.4
hooks:
- id: pyupgrade
args: ["--py36-plus"]
Expand All @@ -12,23 +12,23 @@ repos:
args: ["--target-version", "py36"]

- repo: https://gitlab.com/pycqa/flake8
rev: 3.8.3
rev: 3.8.4
hooks:
- id: flake8
additional_dependencies: [flake8-2020, flake8-implicit-str-concat]

- repo: https://github.com/timothycrosley/isort
rev: 5.4.2
rev: 5.6.4
hooks:
- id: isort

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.6.0
rev: v1.7.0
hooks:
- id: python-check-blanket-noqa

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
rev: v3.3.0
hooks:
- id: check-merge-conflict
- id: check-toml
Expand All @@ -40,3 +40,8 @@ repos:
- id: pydocstyle
args: ["--convention", "google"]
files: "src/"

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v1.15.1
hooks:
- id: setup-cfg-fmt
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
[build-system]
requires = ["setuptools>=42", "wheel", "setuptools_scm[toml]>=3.4"]
build-backend = "setuptools.build_meta"

[tool.black]
target_version = ["py36"]

[tool.setuptools_scm]
local_scheme = "no-local-version"
51 changes: 51 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
[metadata]
name = humanize
description = Python humanize utilities
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/jmoiron/humanize
author = Jason Moiron
author_email = jmoiron@jmoiron.net
maintainer = Hugo van Kemenade
license = MIT
license_file = LICENCE
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Operating System :: OS Independent
Programming Language :: Python
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 :: Implementation :: CPython
Programming Language :: Python :: Implementation :: PyPy
Topic :: Text Processing
Topic :: Text Processing :: General
keywords = humanize time size
project_urls =
Source=https://github.com/jmoiron/humanize
Issue tracker=https://github.com/jmoiron/humanize/issues
Funding=https://tidelift.com/subscription/pkg/pypi-humanize?utm_source=pypi-humanize&utm_medium=pypi

[options]
packages = find:
install_requires =
setuptools
python_requires = >=3.6
include_package_data = True
package_dir = =src
zip_safe = False

[options.extras_require]
tests =
freezegun
pytest
pytest-cov

[options.packages.find]
where = src

[flake8]
max_line_length = 88

Expand Down
58 changes: 2 additions & 56 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,57 +1,3 @@
from setuptools import find_packages, setup
from setuptools import setup

with open("README.md", encoding="UTF-8") as f:
long_description = f.read()


def local_scheme(version):
"""Skip the local version (eg. +xyz of 0.6.1.dev4+gdf99fe2)
to be able to upload to Test PyPI"""
return ""


setup(
name="humanize",
description="Python humanize utilities",
long_description=long_description,
long_description_content_type="text/markdown",
author="Jason Moiron",
author_email="jmoiron@jmoiron.net",
maintainer="Hugo van Kemenade",
url="https://github.com/jmoiron/humanize",
project_urls={
"Source": "https://github.com/jmoiron/humanize",
"Issue tracker": "https://github.com/jmoiron/humanize/issues",
"Funding": "https://tidelift.com/subscription/pkg/pypi-humanize?"
"utm_source=pypi-humanize&utm_medium=pypi",
},
license="MIT",
keywords="humanize time size",
packages=find_packages(where="src"),
package_dir={"": "src"},
include_package_data=True,
zip_safe=False,
use_scm_version={"local_scheme": local_scheme},
install_requires=["setuptools"], # pkg_resources
setup_requires=["setuptools_scm"],
extras_require={"tests": ["freezegun", "pytest", "pytest-cov"]},
python_requires=">=3.6",
# Get strings from https://pypi.org/pypi?%3Aaction=list_classifiers
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"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 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Text Processing",
"Topic :: Text Processing :: General",
],
)
setup()