Skip to content

Commit

Permalink
Migrate setup.cfg to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Sep 3, 2022
1 parent e1ff335 commit 412f907
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 76 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
python-version: "3.10"
cache: pip
cache-dependency-path: setup.cfg
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: setup.cfg
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: |
Expand Down
6 changes: 0 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ repos:
- id: end-of-file-fixer
- id: requirements-txt-fixer

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.0.0
hooks:
- id: setup-cfg-fmt
args: [--max-py-version=3.11, --include-version-classifiers]

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 0.3.5
hooks:
Expand Down
75 changes: 75 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,71 @@ requires = [
"setuptools_scm[toml]>=6.2",
]

[project]
name = "pypistats"
description = "Python interface to PyPI Stats API https://pypistats.org/api"
readme = "README.md"
keywords = [
"BigQuery",
"downloads",
"PyPI",
"statistics",
"stats",
]
license = {text = "MIT"}
authors = [{name = "Hugo van Kemenade"}]
requires-python = ">=3.7"
dependencies = [
"httpx>=0.19",
'importlib-metadata; python_version < "3.8"',
"platformdirs",
"prettytable>=2.4",
"pytablewriter[html]>=0.63",
"python-dateutil",
"python-slugify",
"termcolor",
]
dynamic = [
"version",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: End Users/Desktop",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"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",
]
[project.optional-dependencies]
numpy = [
"numpy",
]
pandas = [
"pandas",
]
tests = [
"freezegun",
"pytest",
"pytest-cov",
"respx>=0.11",
]

[project.urls]
Changelog = "https://github.com/hugovk/pypistats/releases"
Homepage = "https://github.com/hugovk/pypistats"
Source = "https://github.com/hugovk/pypistats"

[project.scripts]
pypistats = "pypistats.cli:main"


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

Expand All @@ -14,5 +79,15 @@ profile = "black"
[tool.pytest.ini_options]
addopts = "--color=yes"

[tool.setuptools]
package-dir = {"" = "src"}
zip-safe = true
license-files = ["LICENSE.txt"]
include-package-data = false

[tool.setuptools.packages.find]
where = ["src"]
namespaces = false

[tool.setuptools_scm]
local_scheme = "no-local-version"
67 changes: 0 additions & 67 deletions setup.cfg

This file was deleted.

4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
from setuptools import setup

setup()
setup(
setup_requires=["setuptools_scm"],
)

0 comments on commit 412f907

Please sign in to comment.