diff --git a/qdarkstyle/__init__.py b/qdarkstyle/__init__.py index 9acd1477a..c19bf2093 100644 --- a/qdarkstyle/__init__.py +++ b/qdarkstyle/__init__.py @@ -31,6 +31,9 @@ with the correct rc file. import os +__version__ = "1.6" + + def load_stylesheet(pyside=True): """ Loads the stylesheet. Takes care of importing the rc module. diff --git a/setup.py b/setup.py index 792fb28a6..2225e1a60 100644 --- a/setup.py +++ b/setup.py @@ -28,9 +28,19 @@ QDarkStyle is a darks stylesheet for python qt applications """ from setuptools import setup, find_packages +def read_version(): + """ + Reads the version without self importing + """ + with open("qdarkstyle/__init__.py") as f: + lines = f.read().splitlines() + for l in lines: + if "__version__" in l: + return l.split("=")[1].strip().replace('"', "") + setup( name='QDarkStyle', - version='1.5', + version=read_version(), packages=find_packages(), package_data={'qdarkstyle': ["*.qss", "*.qrc", "rc/*.png"]}, url='https://github.com/ColinDuquesnoy/QDarkStyleSheet',