-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change: start to port from setup.cfg to pyproject.toml
- Loading branch information
Showing
2 changed files
with
133 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
# .. seealso:: https://packaging.python.org/en/latest/guides/writing-pyproject-toml/ | ||
[project] | ||
name = "anyconfig" | ||
dynamic = [ | ||
"version", | ||
] | ||
description = "Library provides common APIs to load and dump configuration files in various formats" | ||
readme = "README.rst" | ||
authors = [ | ||
{"name" = "Satoru SATOH", email = "[email protected]"}, | ||
] | ||
maintainers = [ | ||
{"name" = "Satoru SATOH", email = "[email protected]"}, | ||
] | ||
license = { text = "MIT"} | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Intended Audience :: Developers", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Environment :: Console", | ||
"Operating System :: OS Independent", | ||
"Topic :: Software Development :: Libraries :: Python Modules", | ||
"Topic :: Text Processing :: Markup", | ||
"Topic :: Utilities", | ||
"License :: OSI Approved :: MIT License", | ||
] | ||
# .. note:: It requires nothing at minimum. | ||
#dependencies = [ | ||
#] | ||
|
||
[project.urls] | ||
Homepage = "https://github.com/ssato/python-anyconfig" | ||
Documentation = "http://python-anyconfig.readthedocs.org" | ||
Repository = "https://github.com/ssato/python-anyconfig" | ||
Issues = "https://github.com/ssato/python-anyconfig/issues" | ||
Changelog = "https://github.com/ssato/python-anyconfig/blob/next/NEWS" | ||
Download = "https://pypi.python.org/pypi/anyconfig" | ||
"Download RPMs" = "https://copr.fedoraproject.org/coprs/ssato/python-anyconfig/" | ||
CI = "https://github.com/ssato/python-anyconfig/actions" | ||
|
||
[build-system] | ||
requires = [ | ||
"setuptools >= 61.0", | ||
"wheel", | ||
] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[tool.setuptools.package-dir] | ||
"" = "src" | ||
|
||
[tool.setuptools.package-data] | ||
anyconfig = [ | ||
"py.typed", | ||
] | ||
|
||
[tool.setuptools.packages.find] | ||
where = [ | ||
"src" | ||
] | ||
|
||
[project.optional-dependencies] | ||
yaml = [ | ||
"pyyaml", | ||
] | ||
toml = [ | ||
"tomli; python_version < '3.11'", | ||
"tomli-w", | ||
] | ||
query = [ | ||
"jmespath", | ||
] | ||
schema = [ | ||
"jsonschema", | ||
] | ||
template = [ | ||
"Jinja2", | ||
] | ||
|
||
[project.scripts] | ||
anyconfig_cli = "anyconfig.cli:main" | ||
|
||
# .. seealso:: https://docs.pytest.org/en/stable/reference/customize.html#pyproject-toml | ||
[tool.pytest.ini_options] | ||
testpaths = [ | ||
"tests", | ||
] | ||
addopts = "--cov=src -vv -rxXs --cov --cov-report xml" | ||
|
||
# .. note:: | ||
# | ||
# The following options are not supported by pyproject.toml or I don't know | ||
# how to port from setup.cfg. | ||
# | ||
# | ||
# [meta] | ||
# long_description = | ||
# python-anyconfig is a python library provides common APIs to load and dump | ||
# configuration files in various formats with some useful features such as | ||
# contents merge, templates, query, schema validation and generation support. | ||
# | ||
# - Home: https://github.com/ssato/python-anyconfig | ||
# - Author: Satoru SATOH <[email protected]> | ||
# - License: MIT | ||
|
||
#[aliases] | ||
# dists = clean --all sdist bdist_wheel | ||
|
||
# .. note:: It's not well supported. | ||
# .. seealso:: https://github.com/pypa/packaging-problems/issues/72 | ||
# | ||
# Disabled because it does not work in CentOS 8. | ||
# [options.data_files] | ||
# share/man/man1 = | ||
# docs/anyconfig_cli.1 | ||
|
||
# .. seealso:: https://stackoverflow.com/a/64487610 | ||
# | ||
# flake8] | ||
# per-file-ignores = | ||
# tests/res/*/*/*/*.py: W605, B018 | ||
# tests/res/*/*/*/*/*.py: W605, B018 | ||
# | ||
# max-complexity = 10 | ||
# select = C,E,F,W,B | ||
# | ||
# # .. seealso:: https://www.flake8rules.com/rules/W504.html | ||
# ignore = W503 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,92 +1,8 @@ | ||
# .. seealso:: https://setuptools.readthedocs.io/en/latest/setuptools.html#configuring-setup-using-setup-cfg-files | ||
|
||
# .. seealso:: https://wheel.readthedocs.io/en/stable/ | ||
[bdist_wheel] | ||
universal = 1 | ||
|
||
[aliases] | ||
dists = clean --all sdist bdist_wheel | ||
|
||
[metadata] | ||
name = anyconfig | ||
#version = attr: anyconfig.__version__ | ||
description = Library provides common APIs to load and dump configuration files in various formats | ||
project_urls = | ||
CI: Github Actions = https://github.com/ssato/python-anyconfig/actions | ||
Download = https://pypi.python.org/pypi/anyconfig | ||
Download RPMs = https://copr.fedoraproject.org/coprs/ssato/python-anyconfig/ | ||
Documentation = http://python-anyconfig.readthedocs.org | ||
Bug Tracker = https://github.com/ssato/python-anyconfig/issues | ||
Source = https://github.com/ssato/python-anyconfig | ||
long_description = | ||
python-anyconfig is a python library provides common APIs to load and dump | ||
configuration files in various formats with some useful features such as | ||
contents merge, templates, query, schema validation and generation support. | ||
|
||
- Home: https://github.com/ssato/python-anyconfig | ||
- Author: Satoru SATOH <[email protected]> | ||
- License: MIT | ||
|
||
author = Satoru SATOH | ||
author_email = [email protected] | ||
maintainer = Satoru SATOH | ||
maintainer_email = [email protected] | ||
license = MIT | ||
url = https://github.com/ssato/python-anyconfig | ||
classifiers = | ||
Development Status :: 4 - Beta | ||
Intended Audience :: Developers | ||
Programming Language :: Python | ||
Programming Language :: Python :: 3 | ||
Programming Language :: Python :: 3.8 | ||
Programming Language :: Python :: 3.9 | ||
Programming Language :: Python :: 3.10 | ||
Programming Language :: Python :: 3.11 | ||
Programming Language :: Python :: 3.12 | ||
Environment :: Console | ||
Operating System :: OS Independent | ||
Topic :: Software Development :: Libraries :: Python Modules | ||
Topic :: Text Processing :: Markup | ||
Topic :: Utilities | ||
License :: OSI Approved :: MIT License | ||
|
||
[options] | ||
include_package_data = True | ||
packages = find: | ||
package_dir = | ||
= src | ||
|
||
# Disabled because it does not work in CentOS 8. | ||
# [options.data_files] | ||
# share/man/man1 = | ||
# docs/anyconfig_cli.1 | ||
|
||
[options.package_data] | ||
anyconfig = py.typed | ||
|
||
[options.extras_require] | ||
yaml = | ||
pyyaml | ||
toml = | ||
tomli; python_version < "3.11" | ||
tomli-w | ||
query = | ||
jmespath | ||
schema = | ||
jsonschema | ||
template = | ||
Jinja2 | ||
|
||
[options.packages.find] | ||
where = src | ||
exclude = | ||
tests | ||
tests.* | ||
|
||
[options.entry_points] | ||
console_scripts = | ||
anyconfig_cli = anyconfig.cli:main | ||
|
||
[flake8] | ||
per-file-ignores = | ||
tests/res/*/*/*/*.py: W605, B018 | ||
|
@@ -97,13 +13,3 @@ select = C,E,F,W,B | |
|
||
# .. seealso:: https://www.flake8rules.com/rules/W504.html | ||
ignore = W503 | ||
|
||
[tool:pytest] | ||
testpaths = | ||
tests | ||
|
||
python_files = | ||
test_*.py | ||
Test*.py | ||
|
||
addopts = --cov=src -vv -rxXs --cov --cov-report xml |