diff --git a/gallery_dl/__init__.py b/gallery_dl/__init__.py index 009cabd4..9e97fe41 100644 --- a/gallery_dl/__init__.py +++ b/gallery_dl/__init__.py @@ -12,7 +12,6 @@ __author__ = "Mike Fährmann" __copyright__ = "Copyright 2014-2016 Mike Fährmann" __license__ = "GPLv2" -__version__ = "0.5.2" __maintainer__ = "Mike Fährmann" __email__ = "mike_faehrmann@web.de" @@ -26,6 +25,7 @@ import os import argparse import json from . import config, extractor, job, exception +from .version import __version__ def build_cmdline_parser(): parser = argparse.ArgumentParser( diff --git a/gallery_dl/version.py b/gallery_dl/version.py new file mode 100644 index 00000000..89029b32 --- /dev/null +++ b/gallery_dl/version.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- + +# Copyright 2016 Mike Fährmann +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. + +__version__ = "0.5.2" diff --git a/setup.py b/setup.py index 30064681..cfe7e121 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# -*- coding: UTF-8 -*- +# -*- coding: utf-8 -*- import os.path @@ -11,15 +11,20 @@ except ImportError: def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() +# get version without importing the package +exec(read("gallery_dl/version.py")) + setup( name="gallery_dl", - version="0.5.2", + version=__version__, description="gallery- and image downloader", long_description=read("README.rst"), url="https://github.com/mikf/gallery-dl", download_url="https://github.com/mikf/gallery-dl/releases/latest", author="Mike Fährmann", author_email="mike_faehrmann@web.de", + maintainer="Mike Fährmann", + maintainer_email="mike_faehrmann@web.de", license="GPLv2", install_requires=[ "requests >= 2.4.2",