summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2021-04-20 09:27:10 +0200
committermathieui <mathieui@mathieui.net>2021-04-20 09:27:10 +0200
commit7f0febb929b0db51f300a2986be98af3ff32ca79 (patch)
treee6697fff32af7c4ff51b8eacbebc4d814320c023
parent0d52344a31d67b9899b551cc1ef551def4b98eea (diff)
parent44392fa2d993a6bb2d64b08b56bddec6daed5d5f (diff)
downloadslixmpp-7f0febb929b0db51f300a2986be98af3ff32ca79.tar.gz
slixmpp-7f0febb929b0db51f300a2986be98af3ff32ca79.tar.bz2
slixmpp-7f0febb929b0db51f300a2986be98af3ff32ca79.tar.xz
slixmpp-7f0febb929b0db51f300a2986be98af3ff32ca79.zip
Merge branch 'use-runpy-for-version-data' into 'master'
fix: use runpy to get versiion-data See merge request poezio/slixmpp!158
-rwxr-xr-xsetup.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 06645e69..e8ab2ea0 100755
--- a/setup.py
+++ b/setup.py
@@ -7,6 +7,7 @@
# This software is licensed as described in the README.rst and LICENSE
# file, which you should have received as part of this distribution.
+import runpy
import os
from pathlib import Path
from subprocess import call, DEVNULL, check_output, CalledProcessError
@@ -17,9 +18,10 @@ except ImportError:
from distutils.core import setup
from run_tests import TestCommand
-from slixmpp.version import __version__
-VERSION = __version__
+version_mod = runpy.run_path('slixmpp/version.py')
+VERSION = version_mod['__version__']
+
DESCRIPTION = ('Slixmpp is an elegant Python library for XMPP (aka Jabber).')
with open('README.rst', encoding='utf8') as readme:
LONG_DESCRIPTION = readme.read()