Skip to content

Commit

Permalink
Workaround for distutils bug in python 2.7 (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
xeor authored and dan-blanchard committed Nov 12, 2019
1 parent a4605d5 commit b411a97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
import re

import sys

from setuptools import find_packages, setup
Expand All @@ -11,6 +11,7 @@

# Get version without importing, which avoids dependency issues
def get_version():
import re
with open('chardet/version.py') as version_file:
return re.search(r"""__version__\s+=\s+(['"])(?P<version>.+?)\1""",
version_file.read()).group('version')
Expand Down

0 comments on commit b411a97

Please sign in to comment.