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
- yellow brackets: files that contain the value of `$PREFIX` as a string (`[prefix:text]` or `[prefix:bin]`).
452
+
453
+
Files that contain the $PREFIX (that is files that contain the current installation path, e.g. `/user/name/.../output/.../host_env_placehold_placehold...`) are marked with the yellow brackets.
454
+
455
+
When a file contains the $PREFIX as a string, it will be replaced at installation time with the actual installation prefix (that is also the reason for the long placeholder string!). You can read more about prefix replacement in [Debugging Builds](internals.md#making-packages-relocatable-with-rattler-build).
456
+
Ideally, no file contains the installation prefix as string, so that there is no text replacement at installation time.
451
457
452
458
We then see a listing of the largest files in the package which can be a helpful sanity check.
Copy file name to clipboardExpand all lines: docs/windows_quirks.md
+27-21Lines changed: 27 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,14 +22,16 @@ On the top level, there is an additional `Scripts` folder, as well as a `bin/` f
22
22
Additionally, the site-packages folder is _also_ located at the root of the filesystem layout:
23
23
24
24
```text
25
-
- Library\
26
-
- lib\
27
-
- bin\
28
-
- share\
29
-
...
30
-
- site-packages\
31
-
- Scripts\
32
-
- bin\
25
+
%PREFIX%
26
+
├── Library
27
+
│ ├── lib
28
+
│ ├── bin
29
+
│ ├── share
30
+
│ ├── etc
31
+
│ └── ...
32
+
├── site-packages
33
+
├── Scripts
34
+
└── bin
33
35
```
34
36
35
37
The reasons for this layout are historical: Python on Windows traditionally installs packages to `site-packages` at the root, and `Scripts` is where Python console scripts and entry points are placed. The `Library` folder mimics a Unix-style hierarchy for non-Python packages.
@@ -40,15 +42,15 @@ To make this easier, certain shortcut env vars are available on Windows: `%LIBRA
40
42
41
43
### Cmd.exe
42
44
43
-
The _default interpreter_ for build scripts on Windows is `cmd.exe` which has a quite clunky syntax and execution model.
45
+
The _default interpreter_ for build scripts on Windows is `cmd.exe` which has a quite clunky syntax and execution model.
44
46
45
47
It will, for example, skip over errors if you do not manually insert `if %ERRORLEVEL% neq 0 exit 1` after each statement. If the build script is a list of commands, then rattler-build will automatically inject this after each list item. If you pass in a complete build script or file, you will have to do this manually to recognize issues in command execution early on.
46
48
47
49
### Using Powershell
48
50
49
51
You can select PowerShell as an interpreter, which comes pre-installed on Windows these days. To do so, just set
50
52
51
-
```
53
+
```yaml title="recipe.yaml"
52
54
build:
53
55
script:
54
56
interpreter: powershell
@@ -61,7 +63,7 @@ Or save your build script as `build.ps1` (which will automatically use powershel
61
63
62
64
To use bash on Windows, you can install bash in your build requirements (e.g. on conda-forge it would be `m2-bash`) and call the bash script from a cmd.exe script:
Everything that follows on this page is specific to `conda-forge` and choices this distribution made. If you run your own software distribution you might do things differently, or not have certain compilers available.
97
+
93
98
As an alternative to MSVC, conda-forge provides a MinGW-based compiler stack for Windows. This can be useful when porting Unix software that relies on GCC-specific features or when you want to avoid MSVC licensing requirements.
94
99
95
100
### Using MinGW compilers in recipes
@@ -117,12 +122,13 @@ The MinGW C++ and Fortran compilers are **not ABI-compatible** with the default
117
122
118
123
### When to use MinGW vs MSVC
119
124
120
-
| Use MinGW when... | Use MSVC when... |
121
-
|-------------------|------------------|
122
-
| Porting Unix/Linux software with GCC-specific code | Building native Windows applications |
123
-
| The project uses GNU autotools extensively | Integrating with other MSVC-compiled libraries |
124
-
| You need GCC-specific compiler extensions | Maximum compatibility with Windows ecosystem |
125
-
| Building Fortran code (simpler than Flang setup) | Performance-critical Windows applications |
0 commit comments