Skip to content

Commit

Permalink
Open files with utf-8 (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikerRUS authored and ternaus committed Oct 20, 2018
1 parent 5bae171 commit c7028b8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions setup.py
@@ -1,3 +1,4 @@
import io
import os
import re
import sys
Expand All @@ -7,7 +8,7 @@
def get_version():
current_dir = os.path.abspath(os.path.dirname(__file__))
version_file = os.path.join(current_dir, 'albumentations', '__init__.py')
with open(version_file) as f:
with io.open(version_file, encoding='utf-8') as f:
return re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', f.read(), re.M).group(1)


Expand All @@ -20,14 +21,14 @@ def get_test_requirements():

def get_long_description():
base_dir = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(base_dir, 'README.md')) as f:
with io.open(os.path.join(base_dir, 'README.md'), encoding='utf-8') as f:
return f.read()


setup(
name='albumentations',
version=get_version(),
description='fast image augmentation library and easy to use wrapper around other libraries',
description='Fast image augmentation library and easy to use wrapper around other libraries',
long_description=get_long_description(),
long_description_content_type='text/markdown',
author='Buslaev Alexander, Alexander Parinov, Vladimir Iglovikov',
Expand Down

0 comments on commit c7028b8

Please sign in to comment.