-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate to
pyproject.toml
and Git versioning (#568)
* Migrate to `pyproject.toml` * Switch from `setup.py bdist_wheel` to `python -m build`
- Loading branch information
Showing
9 changed files
with
81 additions
and
69 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
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
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,5 +0,0 @@ | ||
MAJOR_VERSION = 0 | ||
MINOR_VERSION = 36 | ||
PATCH_VERSION = "0.dev0" | ||
__short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}" | ||
__version__ = f"{__short_version__}.{PATCH_VERSION}" | ||
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
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,66 @@ | ||
[build-system] | ||
requires = ["setuptools>=61.0.0", "wheel", "setuptools-git-versioning<2"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "bellows" | ||
dynamic = ["version"] | ||
description = "Library implementing EZSP" | ||
urls = {repository = "https://github.com/zigpy/bellows"} | ||
authors = [ | ||
{name = "Russell Cloran", email = "[email protected]"} | ||
] | ||
readme = "README.md" | ||
license = {text = "GPL-3.0"} | ||
requires-python = ">=3.8" | ||
dependencies = [ | ||
"click", | ||
"click-log>=0.2.1", | ||
"pure_pcapy3==1.0.1", | ||
"voluptuous", | ||
"zigpy>=0.54.1", | ||
'async-timeout; python_version<"3.11"', | ||
] | ||
|
||
[tool.setuptools.packages.find] | ||
exclude = ["tests", "tests.*"] | ||
|
||
[project.optional-dependencies] | ||
testing = [ | ||
"pytest>=7.1.2", | ||
"pytest-asyncio>=0.19.0", | ||
"pytest-timeout>=2.1.0", | ||
"pytest-mock>=3.8.2", | ||
"pytest-cov>=3.0.0", | ||
] | ||
|
||
[tool.setuptools-git-versioning] | ||
enabled = true | ||
|
||
[project.scripts] | ||
bellows = "bellows.cli.main:main" | ||
|
||
[tool.isort] | ||
profile = "black" | ||
# will group `import x` and `from x import` of the same module. | ||
force_sort_within_sections = true | ||
known_first_party = ["bellows", "tests"] | ||
forced_separate = "tests" | ||
combine_as_imports = true | ||
|
||
[tool.mypy] | ||
ignore_errors = true | ||
|
||
[tool.pytest.ini_options] | ||
asyncio_mode = "auto" | ||
|
||
[tool.flake8] | ||
exclude = [".venv", ".git", ".tox", "docs", "venv", "bin", "lib", "deps", "build"] | ||
# To work with Black | ||
max-line-length = 88 | ||
# W503: Line break occurred before a binary operator | ||
# E203: Whitespace before ':' | ||
# E501: line too long | ||
# D202 No blank lines allowed after function docstring | ||
ignore = ["W503", "E203", "E501", "D202"] | ||
per-file-ignores = ["tests/*:F811,F401,F403"] |
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 |
---|---|---|
|
@@ -16,4 +16,5 @@ pytest-timeout | |
pytest-asyncio>=0.17 | ||
pytest>=7.1.3 | ||
zigpy>=0.54.1 | ||
ruff==0.0.261 | ||
ruff==0.0.261 | ||
Flake8-pyproject |
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,29 +1,4 @@ | ||
"""Setup module for bellows""" | ||
import setuptools | ||
|
||
from setuptools import find_packages, setup | ||
|
||
import bellows | ||
|
||
setup( | ||
name="bellows", | ||
version=bellows.__version__, | ||
description="Library implementing EZSP", | ||
url="http://github.com/zigpy/bellows", | ||
author="Russell Cloran", | ||
author_email="[email protected]", | ||
license="GPL-3.0", | ||
packages=find_packages(exclude=["tests", "tests.*"]), | ||
entry_points={"console_scripts": ["bellows=bellows.cli.main:main"]}, | ||
install_requires=[ | ||
"click", | ||
"click-log>=0.2.1", | ||
"pure_pcapy3==1.0.1", | ||
"voluptuous", | ||
"zigpy>=0.54.1", | ||
'async-timeout; python_version<"3.11"', | ||
], | ||
dependency_links=[ | ||
"https://codeload.github.com/rcloran/pure-pcapy-3/zip/master", | ||
], | ||
tests_require=["asynctest", "pytest", "pytest-asyncio"], | ||
) | ||
if __name__ == "__main__": | ||
setuptools.setup() |
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