[PATCH STABLE] setup: silence warning of unknown option python_requires on distutils
Augie Fackler
raf at durin42.com
Thu Jul 27 14:46:37 EDT 2017
> On Jul 27, 2017, at 10:34, Yuya Nishihara <yuya at tcha.org> wrote:
>
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1501164914 -32400
> # Thu Jul 27 23:15:14 2017 +0900
> # Branch stable
> # Node ID 08f557c2b20e2ae98f57b76fcb2ea0d870cfdcba
> # Parent c5607b65fcb8cf5b789c49a8cf4fecfe83931727
> setup: silence warning of unknown option python_requires on distutils
Sigh. Queued for stable, thanks.
>
> /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution
> option: 'python_requires'
>
> diff --git a/setup.py b/setup.py
> --- a/setup.py
> +++ b/setup.py
> @@ -111,7 +111,8 @@ from distutils import log
> # 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:
> +issetuptools = (os.name == 'nt' or 'FORCE_SETUPTOOLS' in os.environ)
> +if issetuptools:
> from setuptools import setup
> else:
> from distutils.core import setup
> @@ -843,6 +844,8 @@ setupversion = version.decode('ascii')
>
> extra = {}
>
> +if issetuptools:
> + extra['python_requires'] = supportedpy
> if py2exeloaded:
> extra['console'] = [
> {'script':'hg',
> @@ -937,5 +940,4 @@ setup(name='mercurial',
> 'welcome': 'contrib/macosx/Welcome.html',
> },
> },
> - python_requires=supportedpy,
> **extra)
> _______________________________________________
> 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