pyproject.toml (146 lines of code) (raw):
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
[build-system]
requires = ["hatchling", "hatch-fancy-pypi-readme"]
build-backend = "hatchling.build"
[project]
name="apache-dubbo"
requires-python = ">=3.9"
authors = [
{name = "Apache Dubbo Community", email = "dev@dubbo.apache.org"}
]
maintainers = [
{name = "Apache Dubbo Community", email = "dev@dubbo.apache.org"}
]
description = "Python Implementation For Apache Dubbo."
license = "Apache-2.0"
license-files = ["LICEN[CS]E.*"]
keywords=["dubbo", "rpc","grpc", "dubbo-python", "http2", "network"]
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Framework :: AsyncIO",
"Topic :: Internet",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Networking",
]
dependencies = [
"h2>=4.1.0",
"uvloop>=0.19.0; platform_system!='Windows'",
"psutil>=6.0.0",
]
dynamic = ["version", "readme"]
[project.urls]
Homepage = "https://cn.dubbo.apache.org"
Documentation = "https://cn.dubbo.apache.org/en/overview/mannual/python-sdk/"
Repository = "https://github.com/apache/dubbo-python"
Issues = "https://github.com/apache/dubbo/issues"
[project.optional-dependencies]
zookeeper = [
"kazoo>=2.10.0",
]
### Hatch settings ###
[tool.hatch.version]
path = "src/dubbo/__about__.py"
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
"/README.md",
]
[tool.hatch.build.targets.wheel]
packages = ["src/dubbo"]
[tool.hatch.metadata.hooks.fancy-pypi-readme]
content-type = "text/markdown"
[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]]
path = "README.md"
### Ruff settings ###
# Top-level
[tool.ruff]
target-version = "py39"
line-length = 120
extend-exclude = ["samples/proto"]
# Format
[tool.ruff.format]
docstring-code-format = true
# Lint
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # Check for missing imports (auto-fixable)
"UP", # pyupgrade
"ASYNC", # flake8-async
"ISC", # Checks for implicit literal string concatenation (auto-fixable)
"LOG", # Checking the use of logging objects
"G", # Check for logging format issues (auto-fixable)
]
ignore = [
"ISC001" # may casue conflict with ruff
]
[tool.ruff.lint.isort]
combine-as-imports = true
section-order = [
"future",
"standard-library",
"third-party",
"first-party",
"local-folder"
]
### Coverage settings ###
[tool.coverage.run]
branch = true
relative_files = true
include = ["src/dubbo/*"]
[tool.coverage.report]
# Skip coverage report for 100% covered files
skip_covered = true
exclude_also = [
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"@(abc\\.)?abstractmethod",
"@(typing(_extensions)?\\.)?overload",
"if (typing(_extensions)?\\.)?TYPE_CHECKING:"
]
### Mypy settings ###
[tool.mypy]
ignore_missing_imports = true
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
check_untyped_defs = true
### Pytest settings ###
[tool.pytest]
addopts = "-rxXs"
testpaths = ["tests"]
python_files = [
"test_*.py"
]