[PATCH 1 of 6 V2] setup-rust: remove the legacy 'direct-ffi' variant
Yuya Nishihara
yuya at tcha.org
Mon Mar 9 13:37:56 UTC 2020
On Sun, 08 Mar 2020 22:06:52 +0100, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at octobus.net>
> # Date 1583509786 -3600
> # Fri Mar 06 16:49:46 2020 +0100
> # Node ID ac97907dc3f16b039213f54adb37d0a5b04eaf9b
> # Parent c8fd21413458cec4537f3906cdb87f3c9ebe3367
> # EXP-Topic rust-test-option
> # Available At https://dev.heptapod.net/octobus/mercurial-devel/
> # hg pull https://dev.heptapod.net/octobus/mercurial-devel/ -r ac97907dc3f1
> setup-rust: remove the legacy 'direct-ffi' variant
Queued 1-2, thanks.
> diff --git a/setup.py b/setup.py
> --- a/setup.py
> +++ b/setup.py
> @@ -3,6 +3,7 @@
> #
> # 'python setup.py install', or
> # 'python setup.py --help' for more options
> +from __future__ import print_function
Maybe there's a reason to not do future import in setup.py. We have printf().
> -class RustEnhancedExtension(RustExtension):
> - """A C Extension, conditionally enhanced with Rust code.
> -
> - If the HGWITHRUSTEXT environment variable is set to something else
> - than 'cpython', the Rust sources get compiled and linked within
> - the C target shared library object.
> - """
> -
> - def __init__(self, mpath, sources, rustlibname, subcrate, **kw):
> - RustExtension.__init__(
> - self, mpath, sources, rustlibname, subcrate, **kw
> - )
> - if hgrustext != 'direct-ffi':
> - return
> - self.extra_compile_args.append('-DWITH_RUST')
Nice. We can get rid of WITH_RUST block and its callers at all. Can you
send a follow up patch?
More information about the Mercurial-devel
mailing list