Skip to content
Closed
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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
url = "https://github.com/NethServer/python3-nethsec",
license = "GPLv3",
package_dir = {'': 'src'},
packages = ['nethsec', 'nethsec.utils', 'nethsec.firewall', 'nethsec.mwan', 'nethsec.dpi', 'nethsec.ipsec', 'nethsec.ovpn', 'nethsec.users', 'nethsec.reverse_proxy', 'nethsec.inventory', 'nethsec.conntrack', 'nethsec.ldif', 'nethsec.objects', 'nethsec.snort'],
packages = ['nethsec', 'nethsec.utils', 'nethsec.firewall', 'nethsec.mwan', 'nethsec.dpi', 'nethsec.ipsec', 'nethsec.ovpn', 'nethsec.users', 'nethsec.reverse_proxy', 'nethsec.inventory', 'nethsec.conntrack', 'nethsec.ldif', 'nethsec.objects', 'nethsec.snort', 'nethsec.semver'],
requires = [ "pyuci" ],
classifiers = [
"Programming Language :: Python :: 3",
Expand Down
5 changes: 5 additions & 0 deletions src/nethsec/semver/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# python3-semver

Manuallu imported from https://github.com/python-semver/python-semver/

Commit: cc5b1d370f74c7a1775da5cfcbaca954bbb9f3bd
37 changes: 37 additions & 0 deletions src/nethsec/semver/__about__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
"""
Metadata about semver.

Contains information about semver's version, the implemented version
of the semver specifictation, author, maintainers, and description.

.. autodata:: __author__

.. autodata:: __description__

.. autodata:: __maintainer__

.. autodata:: __version__

.. autodata:: SEMVER_SPEC_VERSION
"""

#: Semver version
__version__ = "3.0.4"

#: Original semver author
__author__ = "Kostiantyn Rybnikov"

#: Author's email address
__author_email__ = "k-bx@k-bx.com"

#: Current maintainer
__maintainer__ = ["Sebastien Celles", "Tom Schraitle"]

#: Maintainer's email address
__maintainer_email__ = "s.celles@gmail.com"

#: Short description about semver
__description__ = "Python helper for Semantic Versioning (https://semver.org)"

#: Supported semver specification
SEMVER_SPEC_VERSION = "2.0.0"
49 changes: 49 additions & 0 deletions src/nethsec/semver/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"""
Semver package major release 3.

A Python module for semantic versioning. Simplifies comparing versions.
"""

from .version import Version, VersionInfo
from .__about__ import (
__version__,
__author__,
__maintainer__,
__author_email__,
__description__,
__maintainer_email__,
SEMVER_SPEC_VERSION,
)

__all__ = [
"bump_build",
"bump_major",
"bump_minor",
"bump_patch",
"compare",
"bump_prerelease",
"finalize_version",
"format_version",
"match",
"max_ver",
"min_ver",
"parse",
"parse_version_info",
"replace",
"cmd_bump",
"cmd_compare",
"cmd_nextver",
"cmd_check",
"createparser",
"process",
"main",
"Version",
"VersionInfo",
"__version__",
"__author__",
"__maintainer__",
"__author_email__",
"__description__",
"__maintainer_email__",
"SEMVER_SPEC_VERSION",
]
12 changes: 12 additions & 0 deletions src/nethsec/semver/_types.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
"""Typing for semver."""

from functools import partial
from typing import Union, Optional, Tuple, Dict, Iterable, Callable, TypeVar

VersionPart = Union[int, Optional[str]]
VersionTuple = Tuple[int, int, int, Optional[str], Optional[str]]
VersionDict = Dict[str, VersionPart]
VersionIterator = Iterable[VersionPart]
String = Union[str, bytes]
F = TypeVar("F", bound=Callable)
Decorator = Union[Callable[..., F], partial]
Loading