put centralized version string in 'version.py'

pull/13/head
Mike Fährmann 8 years ago
parent f7c993d952
commit f434a0711b
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -12,7 +12,6 @@ __author__ = "Mike Fährmann"
__copyright__ = "Copyright 2014-2016 Mike Fährmann" __copyright__ = "Copyright 2014-2016 Mike Fährmann"
__license__ = "GPLv2" __license__ = "GPLv2"
__version__ = "0.5.2"
__maintainer__ = "Mike Fährmann" __maintainer__ = "Mike Fährmann"
__email__ = "mike_faehrmann@web.de" __email__ = "mike_faehrmann@web.de"
@ -26,6 +25,7 @@ import os
import argparse import argparse
import json import json
from . import config, extractor, job, exception from . import config, extractor, job, exception
from .version import __version__
def build_cmdline_parser(): def build_cmdline_parser():
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(

@ -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"

@ -1,5 +1,5 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: UTF-8 -*- # -*- coding: utf-8 -*-
import os.path import os.path
@ -11,15 +11,20 @@ except ImportError:
def read(fname): def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read() return open(os.path.join(os.path.dirname(__file__), fname)).read()
# get version without importing the package
exec(read("gallery_dl/version.py"))
setup( setup(
name="gallery_dl", name="gallery_dl",
version="0.5.2", version=__version__,
description="gallery- and image downloader", description="gallery- and image downloader",
long_description=read("README.rst"), long_description=read("README.rst"),
url="https://github.com/mikf/gallery-dl", url="https://github.com/mikf/gallery-dl",
download_url="https://github.com/mikf/gallery-dl/releases/latest", download_url="https://github.com/mikf/gallery-dl/releases/latest",
author="Mike Fährmann", author="Mike Fährmann",
author_email="mike_faehrmann@web.de", author_email="mike_faehrmann@web.de",
maintainer="Mike Fährmann",
maintainer_email="mike_faehrmann@web.de",
license="GPLv2", license="GPLv2",
install_requires=[ install_requires=[
"requests >= 2.4.2", "requests >= 2.4.2",

Loading…
Cancel
Save