Skip to content
Myr

matching the version only at the begining of lines

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by deronnax · committed by deronnax · parent ce234d5 · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:setup.py+2 added-2 removed
28 unmodified lines
29requires = []3031version = ''32with open('requests/__init__.py', 'r') as fd:33 version = re.search(r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]',34 fd.read()).group(1)33 version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',34 fd.read(), re.MULTILINE).group(1)3536if not version:37 raise RuntimeError('Cannot find version information')38
36 unmodified lines