You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SG-41413 - CI - Dependencies to build python packages from source (#1014)
###
### Linked issues
n/a
### Summarize your change.
Install and set-up dependencies for Python/Pip to build its dependencies
from source.
### Describe the reason for the change.
Follow up on
#1013 to install
the needed dependencies to build Numpy and Cryptography from source.
### Describe what you have tested and on which operating system.
CI
### Add a list of changes, and note any that might need special
attention during the review.
### If possible, provide screenshots.
---------
Signed-off-by: Roger Nelson <[email protected]>
Signed-off-by: Cédrik Fuoco <[email protected]>
Co-authored-by: Roger Nelson <[email protected]>
# This version is used for generating src/build/requirements.txt from requirements.txt.in template All platforms install OpenTimelineIO from git to ensure
33
-
# consistent source builds.
32
+
# This version is used for generating src/build/requirements.txt from requirements.txt.in template
34
33
SET(_opentimelineio_version
35
34
"${RV_DEPS_OTIO_VERSION}"
36
35
)
37
36
38
37
SET(_pyside_version
39
38
"${RV_DEPS_PYSIDE_VERSION}"
40
39
)
41
-
# Construct the full git URL for pip to use in requirements.txt Using this avoids @ symbol conflicts in CONFIGURE_FILE
# Note: OpenTimelineIO is now installed via requirements.txt from git URL for all platforms. This ensures consistent source builds across Windows, Mac, and
81
-
# Linux.
82
-
83
75
FETCHCONTENT_DECLARE(
84
76
${_pyside_target}
85
77
URL ${_pyside_archive_url}
@@ -276,12 +268,21 @@ ELSE()
276
268
SET(_otio_debug_env "")
277
269
ENDIF()
278
270
279
-
# Single unified command for all platforms and build types
271
+
# Using --no-binary :all: to ensure all packages with native extensions are built from source
272
+
# against our custom Python build, preventing ABI compatibility issues.
280
273
SET(_requirements_install_command
281
274
${CMAKE_COMMAND} -E env
282
275
${_otio_debug_env}
276
+
)
277
+
278
+
# Only set OPENSSL_DIR if we built OpenSSL ourselves (not for Rocky Linux 8 CY2023 which uses system OpenSSL)
Download the latest open-source [Qt installer](https://www.qt.io/download-open-source). We do not recommend that you install Qt from other installable sources as it may introduce build issues.
171
194
@@ -193,19 +216,19 @@ Note 1: If you install Qt at a different installation path, you will need to man
193
216
Note 2: Qt modules for Logs, Android, iOS and WebAssembly are not required to build Open RV.
194
217
195
218
(rocky_build_openrv)=
196
-
### 5. Build Open RV
219
+
### 6. Build Open RV
197
220
198
221
Once the platform-specific installation process is complete, building Open RV follows the same process for all platforms. Please refer to the [Common Build Instructions](config_common_build.md) for the complete build process.
199
222
200
223
(rocky_building_with_docker)=
201
-
### 6. Building with Docker (Optional)
224
+
### 7. Building with Docker (Optional)
202
225
203
226
To build Open RV using Docker, use the provided Dockerfile found in this repository, which should already contain all required dependencies.
204
227
205
228
Please go through the cloning procedure found in the [common build process](config_common_build.md). Once cloned, get back here to build the docker image, run the container, and build Open RV within the docker container.
docker container exec -it <id> /bin/bash # replace 'id' with your value
238
261
```
239
262
240
-
#### 5.3. Build Open RV in the container
263
+
#### 7.3. Build Open RV in the container
241
264
242
265
Once you are into the container, you can follow the [common build process](config_common_build.md) to build Open RV.
243
266
244
-
#### 5.4. Copy the stage folder outside of the container
267
+
#### 7.4. Copy the stage folder outside of the container
245
268
246
269
If you are on a host that is the same as, or compatible with, your version of Rocky Linux, you can copy the stage folder outside of the container and execute Open RV.
Rust version **1.92 or later** is required to build certain Python dependencies (such as cryptography) that contain Rust components.
138
+
Homebrew will install the latest stable version of Rust.
139
+
````
140
+
136
141
Make sure `xcode-select -p` still returns `/Applications/Xcode.app/Contents/Developer`. If that is not the case, run `sudo xcode-select -s /Applications/Xcode.app`
1.[Install required MSYS2 pacman packages (from an MSYS2-MinGW64 shell)](install_msys2_packages)
79
-
8.[Setup environment variables](setup_env)
80
-
9.[Build Open RV](build_windows_openrv)
80
+
9.[Setup environment variables](setup_env)
81
+
10.[Build Open RV](build_windows_openrv)
81
82
82
83
83
84
````{warning}
@@ -373,8 +374,33 @@ Take note of the installation path for Strawberry Perl, as it will be required i
373
374
The default path is `C:\Strawberry`.
374
375
````
375
376
377
+
(install_rust)=
378
+
## 7. Install Rust
379
+
380
+
````{warning}
381
+
Rust version **1.92 or later** is required to build certain Python dependencies (such as cryptography).
382
+
````
383
+
384
+
Install Rust using rustup-init:
385
+
386
+
1. Download rustup-init from [https://win.rustup.rs/x86_64](https://win.rustup.rs/x86_64)
387
+
2. Run `rustup-init.exe`
388
+
3. Follow the prompts to complete the installation (the default options are recommended)
389
+
4. After installation, close and reopen your terminal to apply the PATH changes
390
+
391
+
Verify that Rust is installed correctly and check the version:
392
+
393
+
```bash
394
+
rustc --version
395
+
cargo --version
396
+
```
397
+
398
+
````{note}
399
+
The Rust installation will be located at `%USERPROFILE%\.cargo\bin` (typically `C:\Users\<username>\.cargo\bin`). Do not forget to add the location to the PATH environment variable in [Setup environment variables](#setup_env).
400
+
````
401
+
376
402
(install_msys2)=
377
-
## 7. Install MSYS2
403
+
## 8. Install MSYS2
378
404
379
405
````{warning}
380
406
@@ -389,7 +415,7 @@ Download and install the latest [MSYS2](https://www.msys2.org/). Open RV is **NO
389
415
MSYS2 is only used for convenience as it comes with a package manager with utility packages required for the Open RV build such as cmake, git, flex, bison, nasm, unzip, zip, etc.
390
416
391
417
(install_msys2_packages)=
392
-
### 7.1 Install required MSYS2 pacman packages
418
+
### 8.1 Install required MSYS2 pacman packages
393
419
394
420
````{note}
395
421
The MSYS2 MingGW64 (mingw64.exe) terminal MUST be used.\
@@ -432,7 +458,7 @@ While installing the MSYS packages, review the list for any missing package. Som
432
458
Note: To confirm which version/location of any tool used inside the MSYS shell, `where` can be used e.g. `where python`. If there's more than one path return, the top one will be used.
433
459
434
460
(setup_env)=
435
-
### 8. Setup environment variables
461
+
### 9. Setup environment variables
436
462
437
463
````{note}
438
464
This is the step where the path of Strawberry Perl, Python, CMake and Qt will be needed.
@@ -447,28 +473,37 @@ These modifications will be added to the `.bash_profile` file located in the Use
447
473
#### PATH environment variable
448
474
449
475
````{note}
450
-
Update the CMake, Strawberry Perland Python location to reflect your installation path, using **forward slashes (/)** for a Unix-style path
476
+
Update the CMake, Strawberry Perl, Python, and Rust locations to reflect your installation paths, using **forward slashes (/)** for a Unix-style path
451
477
to prevent issues later on.
452
478
(e.g., C:\Python310 becomes /c/Python310).
479
+
480
+
**For Rust:** Replace `<username>` with your actual Windows username. You can find your username by running `echo %USERNAME%` in a Windows command prompt.
481
+
The Rust installation is located at `%USERPROFILE%\.cargo\bin` (typically `C:\Users\<username>\.cargo\bin`),
482
+
which becomes `/c/Users/<username>/.cargo/bin` in MSYS2 format.
453
483
````
454
484
455
485
The following paths **must** be added to the PATH environment variable within MSYS2:
456
486
- CMake binary directory
457
487
- Python binary directory
488
+
- Rust cargo binary directory
458
489
- MSYS2's `mingw64/bin`
459
490
- Strawberry perl directory
460
491
461
492
**The order is important**. Do not put Strawberry perl location before MSYS2's `mingw64/bin` directory.
Remember to replace `<username>` with your actual Windows username in the commands above.
505
+
````
506
+
472
507
#### ACLOCAL_PATH
473
508
474
509
```shell
@@ -501,7 +536,7 @@ source ~/.bash_profile
501
536
```
502
537
503
538
(build_windows_openrv)=
504
-
## 9. Build Open RV
539
+
## 10. Build Open RV
505
540
506
541
Once the platform-specific installation process is complete, building Open RV follows the same process for all platforms. Please refer to the [Common Build Instructions](config_common_build.md) for the complete build process.
0 commit comments