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

use pyproject.toml configuration #203

Merged
merged 6 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 0 additions & 3 deletions .coveragerc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Lint with black
uses: psf/black@stable
with:
options: "--check --diff --line-length=79"
options: "--check --diff"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,17 @@ local-uninstall:

.PHONY: update-depends
update-depends:
pip-compile -U $(DEV_DEPENDS).in
pip-compile --extra dev -o dev-requirements.txt -U pyproject.toml

.PHONY: lint
lint:
black . --line-length=79
black .
isort .
mypy --install-types --non-interactive .

.PHONY: test
test:
python setup.py test
pytest

.PHONY: deploy
deploy: build
Expand All @@ -55,7 +56,7 @@ test-deploy: build

.PHONY: build
build: clean
python setup.py sdist bdist_wheel
python -m build

.PHONY: clean
clean:
Expand Down
15 changes: 0 additions & 15 deletions dev-requirements.in

This file was deleted.

28 changes: 14 additions & 14 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile dev-requirements.in
# pip-compile --extra=dev --output-file=dev-requirements.txt pyproject.toml
#
attrs==22.1.0
# via pytest
autopep8==2.0.0
# via -r dev-requirements.in
# via pip-licenses (pyproject.toml)
black==24.3.0
# via -r dev-requirements.in
# via pip-licenses (pyproject.toml)
bleach==5.0.1
# via readme-renderer
build==0.9.0
Expand All @@ -32,7 +32,7 @@ cryptography==42.0.4
# via secretstorage
docutils==0.19
# via
# -r dev-requirements.in
# pip-licenses (pyproject.toml)
# readme-renderer
exceptiongroup==1.2.0
# via pytest
Expand All @@ -45,7 +45,7 @@ importlib-metadata==5.1.0
iniconfig==1.1.1
# via pytest
isort==5.10.1
# via -r dev-requirements.in
# via pip-licenses (pyproject.toml)
jaraco-classes==3.2.3
# via keyring
jeepney==0.8.0
Expand All @@ -57,7 +57,7 @@ keyring==23.11.0
more-itertools==9.0.0
# via jaraco-classes
mypy==0.991
# via -r dev-requirements.in
# via pip-licenses (pyproject.toml)
mypy-extensions==0.4.3
# via
# black
Expand All @@ -72,7 +72,7 @@ pathspec==0.10.2
pep517==0.13.0
# via build
pip-tools==6.11.0
# via -r dev-requirements.in
# via pip-licenses (pyproject.toml)
pkginfo==1.9.2
# via twine
platformdirs==2.6.0
Expand All @@ -94,17 +94,17 @@ pygments==2.15.0
# readme-renderer
# rich
pypandoc==1.10
# via -r dev-requirements.in
# via pip-licenses (pyproject.toml)
pytest==7.2.0
# via
# pytest-cov
# pytest-pycodestyle
pytest-cov==4.0.0
# via -r dev-requirements.in
# via pip-licenses (pyproject.toml)
pytest-pycodestyle==2.3.1
# via -r dev-requirements.in
# via pip-licenses (pyproject.toml)
pytest-runner==6.0.0
# via -r dev-requirements.in
# via pip-licenses (pyproject.toml)
readme-renderer==37.3
# via twine
requests==2.32.0
Expand All @@ -131,9 +131,9 @@ tomli==2.0.1
# pep517
# pytest
tomli-w==1.0.0
# via -r dev-requirements.in
# via pip-licenses (pyproject.toml)
twine==4.0.2
# via -r dev-requirements.in
# via pip-licenses (pyproject.toml)
typing-extensions==4.10.0
# via
# black
Expand All @@ -149,7 +149,7 @@ webencodings==0.5.1
# via bleach
wheel==0.38.4
# via
# -r dev-requirements.in
# pip-licenses (pyproject.toml)
# pip-tools
zipp==3.19.1
# via importlib-metadata
Expand Down
3 changes: 0 additions & 3 deletions piplicenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,9 @@

__pkgname__ = "pip-licenses"
__version__ = "4.5.0"
__author__ = "raimon"
__license__ = "MIT"
__summary__ = (
mbalatsko marked this conversation as resolved.
Show resolved Hide resolved
"Dump the software license list of Python packages installed with pip."
)
__url__ = "https://github.com/raimon49/pip-licenses"


FIELD_NAMES = (
Expand Down
79 changes: 79 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
[build-system]
requires = ["setuptools>=40.9.0", "wheel", "setuptools_scm"]
build-backend = "setuptools.build_meta"

[project]
name = "pip-licenses"
version = "4.4.0"
mbalatsko marked this conversation as resolved.
Show resolved Hide resolved
description = "Dump the software license list of Python packages installed with pip."
readme = "README.md"
requires-python = ">=3.8"
license = {text = "MIT"}
authors = [
{name = "raimon", email = "[email protected]"}
]
keywords = ["pip", "pypi", "package", "license", "check"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: System :: Systems Administration",
"Topic :: System :: System Shells",
"Typing :: Typed"
]
dependencies = [
"prettytable >= 2.3.0",
"tomli >= 2"
]

[project.optional-dependencies]
dev = [
"autopep8",
"black",
"docutils",
"isort",
"wheel",
"mypy",
"pip-tools",
"pypandoc",
"pytest-cov",
"pytest-pycodestyle",
"pytest-runner",
"twine",
"tomli-w"
]

[project.urls]
Homepage = "https://github.com/raimon49/pip-licenses"
Releases = "https://github.com/raimon49/pip-licenses/releases"
Issues = "https://github.com/raimon49/pip-licenses/issues"

[project.scripts]
pip-licenses = "piplicenses:main"

[tool.setuptools]
py-modules = ["piplicenses"]

[tool.pytest.ini_options]
addopts = "--pycodestyle -v --cov --cov-report term-missing"

[tool.black]
line-length = 79

[tool.isort]
line_length = 72
known_first_party = ["piplicenses"]
profile = "black"

[tool.mypy]
mypy_path = "stubs/"
exclude = ["venv"]

[tool.coverage.run]
include = ["piplicenses.py"]
2 changes: 0 additions & 2 deletions requirements.in

This file was deleted.

6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# This file is autogenerated by pip-compile with Python 3.8
# by the following command:
#
# pip-compile requirements.in
# pip-compile --output-file=requirements.txt pyproject.toml
#
prettytable==3.9.0
# via -r requirements.in
# via pip-licenses (pyproject.toml)
tomli==2.0.1
# via -r requirements.in
# via pip-licenses (pyproject.toml)
wcwidth==0.2.13
# via prettytable
67 changes: 0 additions & 67 deletions setup.cfg

This file was deleted.

Loading