Projet

Général

Profil

0001-misc-update-setup.py-to-be-compatible-with-python-3-.patch

Frédéric Péters, 10 août 2017 11:38

Télécharger (1,84 ko)

Voir les différences:

Subject: [PATCH] misc: update setup.py to be compatible with python 3 (#17958)

 setup.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
setup.py
43 43
    sub_commands = [('compile_translations', None)] + _build.sub_commands
44 44

  
45 45
    def run(self):
46
        print "creating VERSION file"
46
        print("creating VERSION file")
47 47
        if os.path.exists('VERSION'):
48 48
            os.remove('VERSION')
49 49
        version = get_version()
......
51 51
        version_file.write(version)
52 52
        version_file.close()
53 53
        _sdist.run(self)
54
        print "removing VERSION file"
54
        print("removing VERSION file")
55 55
        if os.path.exists('VERSION'):
56 56
            os.remove('VERSION')
57 57

  
......
74 74
                             stderr=subprocess.PIPE)
75 75
        result = p.communicate()[0]
76 76
        if p.returncode == 0:
77
            return result.split()[0][1:].replace('-', '.')
77
            return result.decode('ascii').split()[0][1:].replace('-', '.')
78 78
        else:
79 79
            return '0.0.0-%s' % len(subprocess.check_output(
80 80
                ['git', 'rev-list', 'HEAD']).splitlines())
......
84 84
      version=get_version(),
85 85
      license="AGPLv3 or later",
86 86
      description="SAML 2.0 authentication for Django",
87
      long_description=file('README').read(),
87
      long_description=open('README').read(),
88 88
      url="http://dev.entrouvert.org/projects/django-mellon/",
89 89
      author="Entr'ouvert",
90 90
      author_email="info@entrouvert.org",
91
-