liquidctl/pyproject.toml

81 lines
2.5 KiB
TOML
Raw Normal View History

build: move to PEP 517 The build backend remains setuptools (for now). Additionally, setuptools_scm is adopted, in place of our previous ad-hoc handling of extracting version information from git. This plugin also provides some interesting extra features, like automatic inclusion of all versioned data files; now MANIFEST.in only needs to specify the very few files to exclude from the source distribution. On the other hand, the DIST_NAME and DIST_PACKAGE environment variables are currently not being used. Their main purpose is somewhat fulfilled with platform.platform(); and by not using them the new build setup can be completely declarative, requiring users to run no custom code or ours when building or installing liquidctl. As the build backend is setuptools, setup.cfg is used for metadata and other backend configuration, per the current setuptools docs.[^1] This also means that we have yet not moved to PEP 621 ("Storing project metadata in pyproject.toml").[^2] To build the sdist and universal wheel, use python-build.[^3] Locally, pip is still a suitable way to install, and --editable mode is still supported. But when re-packing for Linux or other distributions, consider python-installer.[^4][^5][^6] [^1]: https://setuptools.pypa.io/en/latest/build_meta.html [^2]: https://www.python.org/dev/peps/pep-0621/ [^3]: https://github.com/pypa/build [^4]: https://github.com/pradyunsg/installer [^5]: https://lists.archlinux.org/pipermail/arch-dev-public/2022-February/030737.html [^6]: https://wiki.archlinux.org/title/Python_package_guidelines#Standards_based_(PEP_517)
2022-02-23 23:14:53 +01:00
[build-system]
requires = [
"setuptools >= 45",
"setuptools_scm[toml] >= 6.2",
"wheel",
]
build-backend = "setuptools.build_meta"
[tool.setuptools_scm]
write_to = "liquidctl/_version.py"
# keep the following parameters in sync with liquidctl/version.py
version_scheme = "release-branch-semver"
build: move to PEP 517 The build backend remains setuptools (for now). Additionally, setuptools_scm is adopted, in place of our previous ad-hoc handling of extracting version information from git. This plugin also provides some interesting extra features, like automatic inclusion of all versioned data files; now MANIFEST.in only needs to specify the very few files to exclude from the source distribution. On the other hand, the DIST_NAME and DIST_PACKAGE environment variables are currently not being used. Their main purpose is somewhat fulfilled with platform.platform(); and by not using them the new build setup can be completely declarative, requiring users to run no custom code or ours when building or installing liquidctl. As the build backend is setuptools, setup.cfg is used for metadata and other backend configuration, per the current setuptools docs.[^1] This also means that we have yet not moved to PEP 621 ("Storing project metadata in pyproject.toml").[^2] To build the sdist and universal wheel, use python-build.[^3] Locally, pip is still a suitable way to install, and --editable mode is still supported. But when re-packing for Linux or other distributions, consider python-installer.[^4][^5][^6] [^1]: https://setuptools.pypa.io/en/latest/build_meta.html [^2]: https://www.python.org/dev/peps/pep-0621/ [^3]: https://github.com/pypa/build [^4]: https://github.com/pradyunsg/installer [^5]: https://lists.archlinux.org/pipermail/arch-dev-public/2022-February/030737.html [^6]: https://wiki.archlinux.org/title/Python_package_guidelines#Standards_based_(PEP_517)
2022-02-23 23:14:53 +01:00
[tool.pytest.ini_options]
addopts = "--doctest-modules -ra"
[tool.black]
line-length = 100
target-version = ["py37"]
extend-exclude = '''
/*
To have all items start with |, this isn't a real comment; still, it
shouldn't match any real path.
*/
2022-02-24 20:00:28 +01:00
# don't override what's automatically generated by setuptools_scm
| (^/liquidctl/_version\.py$)
# exclude some old files, pending a future conversion; by default, any new
# files should *not* be excluded
| (^/conftest\.py$)
| (^/extra/contrib/fusion_rgb_cycle\.py$)
| (^/extra/windows/LQiNFO\.py$)
| (^/liquidctl/cli\.py$)
| (^/liquidctl/driver/__init__\.py$)
| (^/liquidctl/driver/asetek\.py$)
| (^/liquidctl/driver/asetek_pro\.py$)
| (^/liquidctl/driver/commander_core\.py$)
| (^/liquidctl/driver/commander_pro\.py$)
| (^/liquidctl/driver/corsair_hid_psu\.py$)
| (^/liquidctl/driver/ddr4\.py$)
| (^/liquidctl/driver/hydro_platinum\.py$)
| (^/liquidctl/driver/kraken2\.py$)
| (^/liquidctl/driver/nvidia\.py$)
| (^/liquidctl/driver/nzxt_epsu\.py$)
| (^/liquidctl/driver/rgb_fusion2\.py$)
| (^/liquidctl/driver/smart_device\.py$)
| (^/liquidctl/driver/smbus\.py$)
| (^/liquidctl/driver/usb\.py$)
| (^/liquidctl/error\.py$)
| (^/liquidctl/extraversion\.py$)
| (^/liquidctl/keyval\.py$)
| (^/liquidctl/pmbus\.py$)
| (^/liquidctl/util\.py$)
| (^/tests/_testutils\.py$)
| (^/tests/test_api\.py$)
| (^/tests/test_asetek\.py$)
| (^/tests/test_asetek_pro\.py$)
| (^/tests/test_backward_compatibility_10\.py$)
| (^/tests/test_backward_compatibility_11\.py$)
| (^/tests/test_backward_compatibility_12\.py$)
| (^/tests/test_backward_compatibility_13\.py$)
| (^/tests/test_backward_compatibility_14\.py$)
| (^/tests/test_backward_compatibility_15\.py$)
| (^/tests/test_cli\.py$)
| (^/tests/test_commander_core\.py$)
| (^/tests/test_commander_pro\.py$)
| (^/tests/test_corsair_hid_psu\.py$)
| (^/tests/test_ddr4\.py$)
| (^/tests/test_hidapi_device\.py$)
| (^/tests/test_hydro_platinum\.py$)
| (^/tests/test_keyval\.py$)
| (^/tests/test_kraken2\.py$)
| (^/tests/test_nvidia\.py$)
| (^/tests/test_nzxt_epsu\.py$)
| (^/tests/test_rgb_fusion2\.py$)
| (^/tests/test_smart_device\.py$)
| (^/tests/test_smbus\.py$)
| (^/tests/test_usb\.py$)
'''