Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ def hello():
spec.path("/hello", resource=hello)
```

To get the version of the library, use feature detection:

```python
from importlib.metadata

importlib.metadata.version("apispec_fromfile")
```

# Related links

* Contribute: https://github.com/ovh/python-apispec-fromfile/blob/master/CONTRIBUTING.md
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[project]
name = "apispec-fromfile"
version = "1.0.3"
authors = [
{ name = "OVHcloud", email = "opensource@ovhcloud.com" },
]
Expand All @@ -12,6 +11,7 @@ requires-python = ">=3.10"
dependencies = [
"apispec[yaml]>=6.9.0",
]
dynamic = ["version"]
keywords = ["openapi", "apispec"]
classifiers = [
"Environment :: Plugins",
Expand All @@ -33,7 +33,7 @@ classifiers = [
Repository = "https://github.com/ovh/python-apispec-fromfile"

[build-system]
requires = ["setuptools>=77.0.3"]
requires = ["setuptools>=80", "setuptools-scm[simple]>=9.2"]
build-backend = "setuptools.build_meta"

[tool.ruff]
Expand Down
4 changes: 0 additions & 4 deletions src/apispec_fromfile/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import pkg_resources

from .plugin import FromFilePlugin
from .plugin import from_file


__version__ = str(pkg_resources.get_distribution("apispec-fromfile").parsed_version)

__all__ = [
"FromFilePlugin",
"from_file",
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ envlist =
[testenv]
deps =
pytest
setuptools<82
commands =
pytest {posargs} tests

Expand Down