Mercurial > evolve
view tests/test-version-install.t @ 4877:77e5c733200a stable
py3: remove smartquotes from README
They break running setup.py with py3 but only in tests, because in the test
environment `locale.getpreferredencoding()` is ANSI_X3.4-1968, so the file is
`open()`ed with that as the encoding. An alternative for fixing this would be
to make the `open()` call with `encoding='utf-8'` under py3, which would be
safe against any future non-ascii in README.
author | Ian Moody <moz-ian@perix.co.uk> |
---|---|
date | Thu, 03 Oct 2019 23:39:37 +0100 |
parents | 1a47cc2728ff |
children | 095bab0d0cd7 |
line wrap: on
line source
$ cat >> $HGRCPATH <<EOF > [extensions] > EOF $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH Test outputting version number $ hg version -v Mercurial Distributed SCM (version *) (glob) (see https://mercurial-scm.org for more information) Copyright (C) 2005-* Matt Mackall and others (glob) This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Enabled extensions: evolve external * (glob) Test install TODO: fix warning #if py3 BROKEN: unicode errors on version number on install $ "$PYTHON" "$TESTDIR/../setup.py" install --root "$TESTTMP/installtest" > /dev/null */distutils/dist.py:*: UserWarning: Unknown distribution option: 'python_requires' (glob) warnings.warn(msg) Traceback (most recent call last): File "*/../setup.py", line *, in <module> (glob) python_requires=py_versions File "*/distutils/core.py", line *, in setup (glob) dist.run_commands() File "*/distutils/dist.py", line *, in run_commands (glob) self.run_command(cmd) File "*/distutils/dist.py", line *, in run_command (glob) cmd_obj.run() File "*/distutils/command/install.py", line *, in run (glob) self.run_command(cmd_name) File "*/distutils/cmd.py", line *, in run_command (glob) self.distribution.run_command(command) File "*/distutils/dist.py", line *, in run_command (glob) cmd_obj.ensure_finalized() File "*/distutils/cmd.py", line *, in ensure_finalized (glob) self.finalize_options() File "*/distutils/command/install_egg_info.py", line *, in finalize_options (glob) to_filename(safe_version(self.distribution.get_version())) File "*/distutils/command/install_egg_info.py", line *, in safe_version (glob) version = version.replace(' ','.') TypeError: a bytes-like object is required, not 'str' [1] #else $ "$PYTHON" "$TESTDIR/../setup.py" install --root "$TESTTMP/installtest" > /dev/null */distutils/dist.py:*: UserWarning: Unknown distribution option: 'python_requires' (glob) warnings.warn(msg) #endif