Skip to content
This repository has been archived by the owner on Sep 29, 2023. It is now read-only.

Commit

Permalink
Merge pull request #91 from AzureAD/enforcing-utf8-on-version-detection
Browse files Browse the repository at this point in the history
Forcing utf8 decoding
  • Loading branch information
rayluo authored Jun 6, 2017
2 parents b1d7644 + 95648f7 commit 963ce7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@
#------------------------------------------------------------------------------

from setuptools import setup
import re
import re, io

# setup.py shall not import adal
__version__ = re.search(
r'__version__\s*=\s*[\'"]([^\'"]*)[\'"]', # It excludes inline comment too
open('adal/__init__.py').read()).group(1)
io.open('adal/__init__.py', encoding='utf_8_sig').read()
).group(1)

# To build:
# python setup.py sdist
Expand Down

0 comments on commit 963ce7d

Please sign in to comment.