mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 00:02:14 -04:00
have letsencrypt.VERSION, show it in letsencrypt --help, use it in setup.py
note: we had some discussion about potential problems importing VERSION from main package. SO link: http://stackoverflow.com/questions/2058802/how-can-i-get-the-version-defined-in-setup-py-setuptools-in-my-package See also my comment in __init__.py - maybe we can add that "version detection from git tags" magic later.
This commit is contained in:
parent
c5db07cf0a
commit
9c98e1e7e5
3 changed files with 13 additions and 2 deletions
|
|
@ -1 +1,10 @@
|
|||
"""Let's Encrypt."""
|
||||
|
||||
# do not import stuff here. this file is used by setup.py, thus importing
|
||||
# stuff here might break setup.py as dependencies are not installed yet.
|
||||
|
||||
VERSION_TUPLE = 0, 1, 0, "a0"
|
||||
"""version tuple: major, minor, micro, {a|b|rc}N - see PEP440"""
|
||||
|
||||
VERSION = "%d.%d.%d%s" % VERSION_TUPLE
|
||||
"""version as str"""
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import sys
|
|||
import zope.component
|
||||
import zope.interface
|
||||
|
||||
from letsencrypt import VERSION
|
||||
from letsencrypt.client import CONFIG
|
||||
from letsencrypt.client import client
|
||||
from letsencrypt.client import display
|
||||
|
|
@ -19,7 +20,7 @@ from letsencrypt.client import log
|
|||
def main(): # pylint: disable=too-many-statements,too-many-branches
|
||||
"""Command line argument parsing and main script execution."""
|
||||
parser = argparse.ArgumentParser(
|
||||
description="An ACME client that can update Apache configurations.")
|
||||
description="letsencrypt client %s" % VERSION)
|
||||
|
||||
parser.add_argument("-d", "--domains", dest="domains", metavar="DOMAIN",
|
||||
nargs="+")
|
||||
|
|
|
|||
3
setup.py
3
setup.py
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
from setuptools import setup
|
||||
|
||||
from letsencrypt import VERSION
|
||||
|
||||
install_requires = [
|
||||
'argparse',
|
||||
|
|
@ -31,7 +32,7 @@ testing_extras = [
|
|||
|
||||
setup(
|
||||
name="letsencrypt",
|
||||
version="0.1",
|
||||
version=VERSION,
|
||||
description="Let's Encrypt",
|
||||
author="Let's Encrypt Project",
|
||||
license="",
|
||||
|
|
|
|||
Loading…
Reference in a new issue