@@ -118,28 +118,57 @@ use a general web search to explore — while these topics are beyond the
118
118
scope of this documentation, there are ample discussions on them on the broader
119
119
Internet.
120
120
121
+ To bootstrap a conda environment and install ``conda-build ``, consider
122
+ `miniforge <https://github.com/conda-forge/miniforge >`__.
123
+
124
+
125
+ Executing a build
126
+ ^^^^^^^^^^^^^^^^^
127
+
128
+ The ``build-locally.py `` script does not support Windows (yet, PRs welcome!).
129
+ You can use ``conda build recipe/ -m .ci_support/choose_your_config.yaml `` as
130
+ a workaround for now.
131
+
132
+
133
+ Testing a local build
134
+ ^^^^^^^^^^^^^^^^^^^^^
135
+
136
+ Because we're using ``conda-build `` directly instead of ``build-locally.py ``,
137
+ we can use the ``local `` channel:
138
+
139
+ .. code-block ::
140
+
141
+ conda create -n my-new-env -c local my-package
142
+
143
+
144
+ Notes on native code
145
+ --------------------
146
+
121
147
In order to compile native code (C, C++, etc.) on Windows, you will need to
122
148
install Microsoft’s Visual C++ build tools on your VM. You must install
123
149
particular versions of these tools — this is to maintain compatibility between
124
150
compiled libraries used in Python, `as described on this Python wiki page
125
151
<https://wiki.python.org/moin/WindowsCompilers> `__. The current relevant
126
152
versions are:
127
153
128
- * For Python 3.5–3.7 : Visual C++ 14.0
154
+ * For Python 3.5–3.12+ : Visual C++ 14.x
129
155
130
156
While you can obtain these tools by installing the right version of the full
131
157
`Visual Studio <https://visualstudio.microsoft.com/ >`__ development
132
158
environment, you can save a lot of time and bandwidth by installing standalone
133
- “build tools” packages. The links are as follows:
134
-
135
- * For Python 3.5–3.7: `Microsoft Build Tools for Visual Studio 2017
136
- <https://visualstudio.microsoft.com/vs/older-downloads/#visual-studio-2017-and-other-products> `__.
159
+ “build tools” packages. You can get them from `Visual Studio
160
+ Subscriptions <https://visualstudio.microsoft.com/vs/older-downloads/#visual-studio-2019-and-other-products> `__.
161
+ To download build tools, you'll need a Microsoft account. Once on the
162
+ Visual Studio Subscriptions page, you may also need to join the Dev Essentials
163
+ program. Once that's done, you can click the "Download" tab and search for
164
+ "Build Tools for Visual Studio 2022".
137
165
138
166
If you need more information. Please refer `the Python wiki page on Windows compilers
139
167
<https://wiki.python.org/moin/WindowsCompilers> `__.
140
168
141
169
Simple CMake-Based ``bld.bat ``
142
- ------------------------------
170
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
171
+
143
172
Some projects provide hooks for CMake to build the project. The following
144
173
example ``bld.bat `` file demonstrates how to build a traditional, out-of-core
145
174
build for such projects.
@@ -177,7 +206,7 @@ The following feedstocks are examples of this build structure deployed:
177
206
178
207
179
208
Building for different VC versions
180
- ----------------------------------
209
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
181
210
182
211
On Windows, different Visual C versions have different ABI and therefore a package needs to be built for different
183
212
Visual C versions. Packages are tied to the VC version that they were built with and some packages have specific
@@ -202,27 +231,22 @@ To skip building with a particular ``vc`` version, add a skip statement.
202
231
build :
203
232
- {{ compiler('cxx') }}
204
233
205
- Using vs2019
206
- -------------
207
-
208
- To use ``vs2019 `` make the following changes:
234
+ Using vs2022
235
+ ^^^^^^^^^^^^
209
236
210
- In ``conda_build_config.yaml `` file:
237
+ In ``recipe/ conda_build_config.yaml `` file:
211
238
212
239
.. code-block :: yaml
213
240
214
241
c_compiler : # [win]
215
- - vs2019 # [win]
242
+ - vs2022 # [win]
216
243
cxx_compiler : # [win]
217
- - vs2019 # [win]
244
+ - vs2022 # [win]
218
245
219
-
220
- For example see the changes made in the ``conda_build_config.yaml `` files in `this
221
- <https://github.com/conda-forge/libignition-msgs1-feedstock/pull/73/commits/81b5ee0e1d23f7f20427dd80d04cf1f7321b441d> `__ commit.
246
+ You can look at the changes in `this PR <https://github.com/conda-forge/vcpkg-tool-feedstock/pull/41/files >`__.
222
247
223
248
After making these changes don't forget to rerender with ``conda-smithy `` (to rerender manually use ``conda smithy rerender `` from the command line).
224
249
225
-
226
250
.. _cmd_batch_syntax :
227
251
228
252
Tips & tricks for CMD/Batch syntax
0 commit comments