[PATCH] setup: use setuptools on Windows (issue5400)

Augie Fackler raf at durin42.com
Fri Mar 10 13:04:18 EST 2017


On Thu, Mar 09, 2017 at 08:06:34PM -0800, Gregory Szorc wrote:
> # HG changeset patch
> # User Gregory Szorc <gregory.szorc at gmail.com>
> # Date 1489118392 28800
> #      Thu Mar 09 19:59:52 2017 -0800
> # Node ID b51f9adb41e68d9f3d88582f044d2742ae29ce09
> # Parent  cd29673cebdbe2d998009322e4c3657389d6aed0
> setup: use setuptools on Windows (issue5400)

queued this thanks

>
> We've had a long, complicated history with setuptools. We want to
> make it the universal default. But when we do, it breaks things.
>
> `python setup.py build` is broken on Windows today. Forcing
> the use of setuptools via FORCE_SETUPTOOLS=1 unbreaks things.
>
> Since the previous bustage with making setuptools the default
> was on !Windows, it seems safe to move ahead with the setuptools
> transition on Windows. So this patch does that.
>
> diff --git a/setup.py b/setup.py
> --- a/setup.py
> +++ b/setup.py
> @@ -63,7 +63,10 @@ import re
>  import shutil
>  import tempfile
>  from distutils import log
> -if 'FORCE_SETUPTOOLS' in os.environ:
> +# We have issues with setuptools on some platforms and builders. Until
> +# those are resolved, setuptools is opt-in except for platforms where
> +# we don't have issues.
> +if os.name == 'nt' or 'FORCE_SETUPTOOLS' in os.environ:
>      from setuptools import setup
>  else:
>      from distutils.core import setup
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list