mirror of
https://github.com/certbot/certbot.git
synced 2026-08-01 18:56: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."""
|
"""Let's Encrypt."""
|
||||||
|
|
||||||
__version__ = "0.1"
|
__version__ = "0.1"
|
||||||
|
|||||||
@@ -5,13 +5,17 @@ import codecs
|
|||||||
|
|
||||||
from setuptools import setup
|
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__))
|
here = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
# read version number (and other metadata) from package init
|
# read version number (and other metadata) from package init
|
||||||
init_fn = os.path.join(here, 'letsencrypt', '__init__.py')
|
init_fn = os.path.join(here, 'letsencrypt', '__init__.py')
|
||||||
with codecs.open(init_fn, encoding='utf8') as meta_file:
|
meta = dict(re.findall(r"""__([a-z]+)__ = "([^"]+)""", read_file(init_fn)))
|
||||||
content = meta_file.read()
|
|
||||||
meta = dict(re.findall(r"""__([a-z]+)__ = "([^"]+)""", content))
|
|
||||||
|
|
||||||
install_requires = [
|
install_requires = [
|
||||||
'argparse',
|
'argparse',
|
||||||
|
|||||||
Reference in New Issue
Block a user