Mercurial > hg
comparison setup.py @ 48842:649ff7f86f96
rust: enable Python 3 support unconditionally
Note: `cpython/python3-sys` is a default feature.
Differential Revision: https://phab.mercurial-scm.org/D12316
author | Simon Sapin <simon.sapin@octobus.net> |
---|---|
date | Thu, 03 Mar 2022 07:53:11 +0100 |
parents | cd3e25adcf84 |
children | 656196c1d442 |
comparison
equal
deleted
inserted
replaced
48841:2ef3b7d30cc1 | 48842:649ff7f86f96 |
---|---|
1378 | 1378 |
1379 env['HOME'] = pwd.getpwuid(os.getuid()).pw_dir | 1379 env['HOME'] = pwd.getpwuid(os.getuid()).pw_dir |
1380 | 1380 |
1381 cargocmd = ['cargo', 'rustc', '--release'] | 1381 cargocmd = ['cargo', 'rustc', '--release'] |
1382 | 1382 |
1383 feature_flags = ['python3'] | |
1384 | |
1385 cargocmd.append('--no-default-features') | |
1386 | |
1387 rust_features = env.get("HG_RUST_FEATURES") | 1383 rust_features = env.get("HG_RUST_FEATURES") |
1388 if rust_features: | 1384 if rust_features: |
1389 feature_flags.append(rust_features) | 1385 cargocmd.extend(('--features', rust_features)) |
1390 | |
1391 cargocmd.extend(('--features', " ".join(feature_flags))) | |
1392 | 1386 |
1393 cargocmd.append('--') | 1387 cargocmd.append('--') |
1394 if sys.platform == 'darwin': | 1388 if sys.platform == 'darwin': |
1395 cargocmd.extend( | 1389 cargocmd.extend( |
1396 ("-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup") | 1390 ("-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup") |