Skip to content

Commit

Permalink
dynamic version
Browse files Browse the repository at this point in the history
  • Loading branch information
dem214 committed May 26, 2023
1 parent 21a95e4 commit 95edd70
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[project]
name = "xspf-lib"
version = "0.3.3"
description = "Library for work with xspf format"
authors = [
{name = "Dzmitry Izaitka", email = "[email protected]"},
Expand All @@ -18,6 +17,7 @@ classifiers = [
"Topic :: Multimedia :: Video",
"Topic :: Software Development :: Libraries :: Python Modules",
]
dynamic = ["version"]

[project.urls]
Source = "https://github.com/dem214/xspf-lib"
Expand All @@ -28,6 +28,11 @@ Documentation = "https://xspf-lib.readthedocs.io/"
requires = ["pdm-backend"]
build-backend = "pdm.backend"

[tool.pdm.version]
source = "scm"
write_to = "xspf_lib/_version.py"
write_template = "__version__ = '{}'"

[tool.pdm.dev-dependencies]
test = [
"pytest>=7.3.1",
Expand Down
2 changes: 1 addition & 1 deletion xspf_lib/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""Module helps to work with xspf playlists."""

__all__ = ["Playlist", "Track", "Attribution", "Extension", "Link", "Meta", "URI"]

import xml.etree.ElementTree as Et

from ._version import __version__
from .constants import XML_NAMESPACE
from .elements import Attribution, Extension, Link, Meta, Playlist, Track
from .types import URI
Expand Down
1 change: 1 addition & 0 deletions xspf_lib/_version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "editable"

0 comments on commit 95edd70

Please sign in to comment.