lab.nexedi.com will be down from Thursday, 20 March 2025, 07:30:00 UTC for a duration of approximately 2 hours

Commit 7865c7d4 authored by Michael Tremer's avatar Michael Tremer

python: Correctly set and use __version__

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 581e599c
......@@ -17,6 +17,7 @@ Makefile.in
/stamp-h1
/src/python/location
/src/python/location-importer
/src/python/__init__.py
/src/systemd/location-update.service
/src/systemd/location-update.timer
/test.db
......
......@@ -148,7 +148,6 @@ CLEANFILES += \
src/libloc.pc
dist_pkgpython_PYTHON = \
src/python/__init__.py \
src/python/database.py \
src/python/downloader.py \
src/python/export.py \
......@@ -156,6 +155,15 @@ dist_pkgpython_PYTHON = \
src/python/importer.py \
src/python/logger.py
pkgpython_PYTHON = \
src/python/__init__.py
EXTRA_DIST += \
src/python/__init__.py.in
CLEANFILES += \
src/python/__init__.py
pyexec_LTLIBRARIES = \
src/python/_location.la
......
......@@ -17,6 +17,8 @@
# #
###############################################################################
__version__ = "@VERSION@"
# Import everything from the C module
from _location import *
......
......@@ -28,6 +28,7 @@ import urllib.error
import urllib.parse
import urllib.request
from . import __version__
from _location import Database, DATABASE_VERSION_LATEST
DATABASE_FILENAME = "location.db.xz"
......@@ -71,7 +72,7 @@ class Downloader(object):
# Update headers
headers.update({
"User-Agent" : "location/@VERSION@",
"User-Agent" : "location/%s" % __version__,
})
# Set headers
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment