mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 08:05:55 +02: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:
@@ -1,3 +1,2 @@
|
||||
"""Let's Encrypt."""
|
||||
|
||||
__version__ = "0.1"
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user