mirror of
https://github.com/certbot/certbot.git
synced 2026-06-08 00:02:14 -04:00
put file reading into function, we'll soon need that for more stuff
like e.g. reading long_description from README.rst + CHANGES.rst.
This commit is contained in:
parent
219b25cd98
commit
af8edbc21c
2 changed files with 7 additions and 4 deletions
|
|
@ -1,3 +1,2 @@
|
|||
"""Let's Encrypt."""
|
||||
|
||||
__version__ = "0.1"
|
||||
|
|
|
|||
10
setup.py
10
setup.py
|
|
@ -5,13 +5,17 @@ import codecs
|
|||
|
||||
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')
|
||||
with codecs.open(init_fn, encoding='utf8') as meta_file:
|
||||
content = meta_file.read()
|
||||
meta = dict(re.findall(r"""__([a-z]+)__ = "([^"]+)""", content))
|
||||
meta = dict(re.findall(r"""__([a-z]+)__ = "([^"]+)""", read_file(init_fn)))
|
||||
|
||||
install_requires = [
|
||||
'argparse',
|
||||
|
|
|
|||
Loading…
Reference in a new issue