Mercurial > hg
changeset 42459:85041e2b69c7
rust: switched to 'cargo rustc' in setup.py
This is more flexible in the passing of additional flags, also
what setuptools_rust does, giving less uncertainty about non-Linux
platforms.
author | Georges Racinet <georges.racinet@octobus.net> |
---|---|
date | Fri, 17 May 2019 00:17:43 +0200 |
parents | 8ee0fdf3b087 |
children | e4c85e23c9ff |
files | setup.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py Fri Jun 14 11:18:06 2019 +0100 +++ b/setup.py Fri May 17 00:17:43 2019 +0200 @@ -1195,13 +1195,14 @@ import pwd env['HOME'] = pwd.getpwuid(os.getuid()).pw_dir - cargocmd = ['cargo', 'build', '-vv', '--release'] + cargocmd = ['cargo', 'rustc', '-vv', '--release'] if sys.version_info[0] == 3 and self.py3_features is not None: cargocmd.extend(('--features', self.py3_features, '--no-default-features')) + cargocmd.append('--') if sys.platform == 'darwin': - env['RUSTFLAGS'] = ("-C link-arg=-undefined " - "-C link-arg=dynamic_lookup") + cargocmd.extend(("-C", "link-arg=-undefined", + "-C", "link-arg=dynamic_lookup")) try: subprocess.check_call(cargocmd, env=env, cwd=self.rustsrcdir) except OSError as exc: