How to use the polib.PY3 function in polib

To help you get started, we’ve selected a few polib examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla / fjord / vendor / packages / polib / setup.py View on Github external
polib setup script.
"""

__author__ = 'David Jean Louis '

from distutils.core import setup
import codecs

import polib

author_data = __author__.split(' ')
maintainer = ' '.join(author_data[0:-1])
maintainer_email = author_data[-1]
desc = 'A library to manipulate gettext files (po and mo files).'

if polib.PY3:
    mode = 'rb'
else:
    mode = 'r'

long_desc = r'''
.. contents:: Table of Contents

%s

%s

''' % (open('README.rst', mode).read(), open('CHANGELOG', mode).read())

if __name__ == '__main__':
    setup(
        name='polib',