@@ -14,22 +14,9 @@ Install from PyPI by entering this command:
1414pip install -U c2pa-python
1515```
1616
17- To build from source on Linux, install curl and rustup and set up python
18-
19- ```
20- apt update
21- apt install curl
22- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
23- source "$HOME/.cargo/env"
24-
25- apt install python3
26- apt install pip
27- apt install python3.11-venv
17+ This is a platform wheel built with Rust. If your platform is not already supported,
18+ see the development section for info on how to build from source.
2819
29- python3 -m venv .venv
30- source .venv/bin/activate
31- pip install uniffi-bindgen
32- pip install -U c2pa-python
3320```
3421## Usage
3522
@@ -120,18 +107,36 @@ manifest_json = json.dumps({
120107
121108It is best to [ set up a virtual environment] ( https://virtualenv.pypa.io/en/latest/installation.html ) for development and testing.
122109
123- We use ` maturin ` for packaging Rust in Python. Install it as follows:
110+ To build from source on Linux, install curl and rustup and set up python
124111
112+ First update apt
125113```
126- pip install maturin
114+ apt update
127115```
128116
129- You also must install ` uniffi ` , ` bindgen ` , and ` pytest ` for testing
117+ Install Rust
118+ ``` apt install curl
119+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
120+ source "$HOME/.cargo/env"
121+ ```
130122
123+ Install Python, pip and venv
131124```
132- pip install uniffi_bindgen
125+ apt install python3
126+ apt install pip
127+ apt install python3.11-venv
128+ python3 -m venv .venv
129+ ```
130+
131+ Build the wheel for your platform
132+ ```
133+ source .venv/bin/activate
134+ pip install maturin
135+ pip install uniffi-bindgen
136+ python3 -m pip install build
133137pip install -U pytest
134- pip install <path-to-whl> --force-reinstall
138+
139+ python3 -m build --wheel
135140```
136141
137142### Testing
0 commit comments