INNER CODE UNIT · Python
_read
open2c/pairtools · setup.py:19
def _read(*parts, **kwargs):
filepath = os.path.join(os.path.dirname(__file__), *parts)
encoding = kwargs.pop("encoding", "utf-8")
with io.open(filepath, encoding=encoding) as fh:
text = fh.read()
return text
def get_version():
version = re.search(
r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
_read("pairtools", "__init__.py"),
re.MULTILINE,
).group(1)
return version
def get_ext_modules():