@@ -7,7 +7,6 @@ The information in this page is primarily for those who wish to contribute to th
7
7
It is best to [ set up a virtual environment] ( https://virtualenv.pypa.io/en/latest/installation.html ) for development and testing:
8
8
9
9
``` bash
10
- # Create virtual environment
11
10
python -m venv .venv
12
11
```
13
12
@@ -46,32 +45,7 @@ This command:
46
45
- Copies the appropriate libraries for your platform from ` artifacts/` to ` src/c2pa/libs/`
47
46
- Installs the package in development mode, so you can make changes to the Python code without reinstalling.
48
47
49
- # # Build from source
50
-
51
- To build from source on Linux, install ` curl` and ` rustup` then set up Python.
52
-
53
- First update ` apt` then (if needed) install ` curl` :
54
-
55
- ` ` ` bash
56
- apt update
57
- apt install curl
58
- ` ` `
59
-
60
- Install Rust:
61
-
62
- ` ` ` bash
63
- curl --proto ' =https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
64
- source " $HOME /.cargo/env"
65
- ` ` `
66
-
67
- Install Python, ` pip` , and ` venv` :
68
-
69
- ` ` ` bash
70
- apt install python3
71
- apt install pip
72
- apt install python3.11-venv
73
- python3 -m venv .venv
74
- ` ` `
48
+ # # Building wheels
75
49
76
50
Build the wheel for your platform (from the root of the repository):
77
51
@@ -84,22 +58,18 @@ pip install -U pytest
84
58
python3 -m build --wheel
85
59
` ` `
86
60
87
- # # Building wheels
88
-
89
- To build wheels for all platforms that have libraries in the ` artifacts/` directory:
61
+ To test local wheels locally, enter this command:
90
62
91
63
` ` ` bash
92
- python setup.py bdist_wheel
64
+ make test-local-wheel-build
93
65
` ` `
94
66
95
- You can use ` twine ` to verify the wheels have correct metadata :
67
+ To verify the builds, enter this command :
96
68
97
69
` ` ` bash
98
- twine check dist/ *
70
+ make verify-wheel-build
99
71
` ` `
100
72
101
- This will create platform-specific wheels in the ` dist/` directory.
102
-
103
73
# # Project structure
104
74
105
75
` ` ` bash
@@ -134,11 +104,12 @@ Run tests by following these steps:
134
104
` ` ` bash
135
105
make test
136
106
` ` `
137
- 5. Alternatively, install pytest (if not already installed) and run it:
107
+ 5. Alternatively, install ` pytest` (if not already installed) and run it:
138
108
` ` ` bash
139
109
pip install pytest
140
110
pytest
141
111
` ` `
112
+ ** Warning** : ` pytest` often has issues when switching between virtual environments.
142
113
143
114
# ## Testing during bindings development
144
115
0 commit comments