Commit 5653ad71 authored by Michael Tremer's avatar Michael Tremer

downloader: Fetch __version__ from C module

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent d0a490be
......@@ -28,8 +28,7 @@ import urllib.error
import urllib.parse
import urllib.request
from . import __version__
from _location import Database, DATABASE_VERSION_LATEST
from _location import Database, DATABASE_VERSION_LATEST, __version__
DATABASE_FILENAME = "location.db.xz"
MIRRORS = (
......
......@@ -117,6 +117,10 @@ PyMODINIT_FUNC PyInit__location(void) {
if (!m)
return NULL;
// Version
if (PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION))
return NULL;
// AS
if (PyType_Ready(&ASType) < 0)
return NULL;
......
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