Mercurial > public > mercurial-scm > hg-stable
changeset 52354:fcc059b1eed0
setup_py: function defs after imports
author | paugier <pierre.augier@univ-grenoble-alpes.fr> |
---|---|
date | Sat, 23 Nov 2024 06:01:42 +0100 |
parents | 7606466300c1 |
children | ad23dc96e7d6 |
files | setup.py |
diffstat | 1 files changed, 9 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py Thu Oct 24 15:13:23 2024 +0200 +++ b/setup.py Sat Nov 23 06:01:42 2024 +0100 @@ -1,20 +1,8 @@ # This is the mercurial setup script. import os - import sys import sysconfig - - -def sysstr(s): - return s.decode('latin-1') - - -def eprint(*args, **kwargs): - kwargs['file'] = sys.stderr - print(*args, **kwargs) - - import ssl if not ssl.HAS_TLSv1_2: @@ -103,6 +91,15 @@ from distutils.sysconfig import get_python_inc +def sysstr(s): + return s.decode('latin-1') + + +def eprint(*args, **kwargs): + kwargs['file'] = sys.stderr + print(*args, **kwargs) + + def write_if_changed(path, content): """Write content to a file iff the content hasn't changed.""" if os.path.exists(path):