Created
December 10, 2013 21:26
-
-
Save nilp0inter/7900502 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
BAD_VERSIONS = [ | |
(2, 4), | |
(2, 5), | |
(2, 6) ] | |
TRANSLATE_TEXT = sys.version_info[:2] in BAD_VERSIONS | |
# Encoding used for the PKG-INFO files | |
PKG_INFO_ENCODING = 'utf-8' | |
def _(text): | |
if TRANSLATE_TEXT: | |
return text.encode(PKG_INFO_ENCODING) | |
else: | |
return text | |
AUTHORS = _(u'Alejandro Galindo García, Roberto Abdelkader Martínez Pérez') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a snippet to show a possible fix for a distutils bug with file encodings.
nilp0inter/cpe#1