""" Tools for working with Debian-related file formats """ __version__ = "" try: # pylint: disable=no-member import debian._version # type: ignore __version__ = debian._version.__version__ # type: ignore except ImportError: try: # Try to extract the version from the package changelog and # determine whether it is a post-release or pre-release version. import os.path import debian.changelog changelog_filename = os.path.join( os.path.dirname(__file__), '..', '..', 'debian', 'changelog') with open(changelog_filename, 'rb') as fh: c = debian.changelog.Changelog(fh) version = str(c.get_version()) mark = "~" if c.distributions == 'UNRELEASED' else "+" except: # pylint: disable=bare-except # Fake a version string in desperation version = '0.0.0' mark = '-' import datetime timestamp = datetime.datetime.utcnow().strftime("%Y%m%d") __version__ = "%s%sgit%s" % (version, mark, timestamp)
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__pycache__ | Folder | 0755 |
|
|
__init__.py | File | 1.03 KB | 0644 |
|
_version.py | File | 62 B | 0644 |
|
arfile.py | File | 13.1 KB | 0644 |
|
changelog.py | File | 37.06 KB | 0644 |
|
copyright.py | File | 24.06 KB | 0644 |
|
deb822.py | File | 84.21 KB | 0644 |
|
debfile.py | File | 14.61 KB | 0644 |
|
debian_support.py | File | 22.95 KB | 0644 |
|
debtags.py | File | 18.76 KB | 0644 |
|
deprecation.py | File | 1.43 KB | 0644 |
|