##// END OF EJS Templates
pyoxidizer: update README.md with several small fixes...
Kyle Lippincott -
r49087:16c3fe46 default
parent child Browse files
Show More
@@ -1,50 +1,48
1 1 # Oxidized Mercurial
2 2
3 3 This project provides a Rust implementation of the Mercurial (`hg`)
4 4 version control tool.
5 5
6 6 Under the hood, the project uses
7 7 [PyOxidizer](https://github.com/indygreg/PyOxidizer) to embed a Python
8 8 interpreter in a binary built with Rust. At run-time, the Rust `fn main()`
9 9 is called and Rust code handles initial process startup. An in-process
10 10 Python interpreter is started (if needed) to provide additional
11 11 functionality.
12 12
13 13 # Building
14 14
15 This project currently requires an unreleased version of PyOxidizer
16 (0.7.0-pre). For best results, build the exact PyOxidizer commit
17 as defined in the `pyoxidizer.bzl` file:
15 First, acquire and build a copy of PyOxidizer; you probably want to do this in
16 some directory outside of your clone of Mercurial:
18 17
19 18 $ git clone https://github.com/indygreg/PyOxidizer.git
20 19 $ cd PyOxidizer
21 $ git checkout <Git commit from pyoxidizer.bzl>
22 20 $ cargo build --release
23 21
24 Then build this Rust project using the built `pyoxidizer` executable::
22 Then build this Rust project using the built `pyoxidizer` executable:
25 23
26 $ /path/to/pyoxidizer/target/release/pyoxidizer build
24 $ /path/to/pyoxidizer/target/release/pyoxidizer build --release
27 25
28 26 If all goes according to plan, there should be an assembled application
29 under `build/<arch>/debug/app/` with an `hg` executable:
27 under `build/<arch>/release/app/` with an `hg` executable:
30 28
31 $ build/x86_64-unknown-linux-gnu/debug/app/hg version
29 $ build/x86_64-unknown-linux-gnu/release/app/hg version
32 30 Mercurial Distributed SCM (version 5.3.1+433-f99cd77d53dc+20200331)
33 31 (see https://mercurial-scm.org for more information)
34 32
35 33 Copyright (C) 2005-2020 Olivia Mackall and others
36 34 This is free software; see the source for copying conditions. There is NO
37 35 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
38 36
39 37 # Running Tests
40 38
41 39 To run tests with a built `hg` executable, you can use the `--with-hg`
42 40 argument to `run-tests.py`. But there's a wrinkle: many tests run custom
43 41 Python scripts that need to `import` modules provided by Mercurial. Since
44 42 these modules are embedded in the produced `hg` executable, a regular
45 43 Python interpreter can't access them! To work around this, set `PYTHONPATH`
46 44 to the Mercurial source directory. e.g.:
47 45
48 46 $ cd /path/to/hg/src/tests
49 $ PYTHONPATH=`pwd`/.. python3.7 run-tests.py \
50 --with-hg `pwd`/../rust/hgcli/build/x86_64-unknown-linux-gnu/debug/app/hg
47 $ PYTHONPATH=`pwd`/.. python3.9 run-tests.py \
48 --with-hg `pwd`/../rust/hgcli/build/x86_64-unknown-linux-gnu/release/app/hg
General Comments 0
You need to be logged in to leave comments. Login now