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