mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 16:22:18 -04:00
Merge pull request #207 from ThomasWaldmann/version
have letsencrypt.VERSION, show it in letsencrypt --help, use it in setup.py
This commit is contained in:
commit
e56737de0b
4 changed files with 25 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
|||
include README.rst CHANGES.rst
|
||||
recursive-include letsencrypt *.json
|
||||
recursive-include letsencrypt *.sh
|
||||
recursive-include letsencrypt *.conf
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
"""Let's Encrypt."""
|
||||
__version__ = "0.1"
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import sys
|
|||
import zope.component
|
||||
import zope.interface
|
||||
|
||||
import letsencrypt
|
||||
from letsencrypt.client import CONFIG
|
||||
from letsencrypt.client import client
|
||||
from letsencrypt.client import display
|
||||
|
|
@ -23,7 +24,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" % letsencrypt.__version__)
|
||||
|
||||
parser.add_argument("-d", "--domains", dest="domains", metavar="DOMAIN",
|
||||
nargs="+")
|
||||
|
|
|
|||
22
setup.py
22
setup.py
|
|
@ -1,7 +1,26 @@
|
|||
#!/usr/bin/env python
|
||||
import codecs
|
||||
import os
|
||||
import re
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
|
||||
def read_file(filename, encoding='utf8'):
|
||||
"""Read unicode from given file."""
|
||||
with codecs.open(filename, encoding=encoding) as fd:
|
||||
return fd.read()
|
||||
|
||||
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
# read version number (and other metadata) from package init
|
||||
init_fn = os.path.join(here, 'letsencrypt', '__init__.py')
|
||||
meta = dict(re.findall(r"""__([a-z]+)__ = "([^"]+)""", read_file(init_fn)))
|
||||
|
||||
readme = read_file(os.path.join(here, 'README.rst'))
|
||||
changes = read_file(os.path.join(here, 'CHANGES.rst'))
|
||||
|
||||
install_requires = [
|
||||
'argparse',
|
||||
'jsonschema',
|
||||
|
|
@ -31,8 +50,9 @@ testing_extras = [
|
|||
|
||||
setup(
|
||||
name="letsencrypt",
|
||||
version="0.1",
|
||||
version=meta['version'],
|
||||
description="Let's Encrypt",
|
||||
long_description=readme, # later: + '\n\n' + changes
|
||||
author="Let's Encrypt Project",
|
||||
license="",
|
||||
url="https://letsencrypt.org",
|
||||
|
|
|
|||
Loading…
Reference in a new issue