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