Skip to content

Commit 4c83afd

Browse files
authored
Merge pull request #1956 from mfisher87/update-maintainer-kb-windows-doc
Update maintainer kb windows doc
2 parents 585bf0a + 3015060 commit 4c83afd

File tree

1 file changed

+42
-18
lines changed

1 file changed

+42
-18
lines changed

src/maintainer/knowledge_base.rst

Lines changed: 42 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -118,28 +118,57 @@ use a general web search to explore — while these topics are beyond the
118118
scope of this documentation, there are ample discussions on them on the broader
119119
Internet.
120120

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+
121147
In order to compile native code (C, C++, etc.) on Windows, you will need to
122148
install Microsoft’s Visual C++ build tools on your VM. You must install
123149
particular versions of these tools — this is to maintain compatibility between
124150
compiled libraries used in Python, `as described on this Python wiki page
125151
<https://wiki.python.org/moin/WindowsCompilers>`__. The current relevant
126152
versions are:
127153

128-
* For Python 3.5–3.7: Visual C++ 14.0
154+
* For Python 3.5–3.12+: Visual C++ 14.x
129155

130156
While you can obtain these tools by installing the right version of the full
131157
`Visual Studio <https://visualstudio.microsoft.com/>`__ development
132158
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".
137165

138166
If you need more information. Please refer `the Python wiki page on Windows compilers
139167
<https://wiki.python.org/moin/WindowsCompilers>`__.
140168

141169
Simple CMake-Based ``bld.bat``
142-
------------------------------
170+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
171+
143172
Some projects provide hooks for CMake to build the project. The following
144173
example ``bld.bat`` file demonstrates how to build a traditional, out-of-core
145174
build for such projects.
@@ -177,7 +206,7 @@ The following feedstocks are examples of this build structure deployed:
177206

178207

179208
Building for different VC versions
180-
----------------------------------
209+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
181210

182211
On Windows, different Visual C versions have different ABI and therefore a package needs to be built for different
183212
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.
202231
build:
203232
- {{ compiler('cxx') }}
204233
205-
Using vs2019
206-
-------------
207-
208-
To use ``vs2019`` make the following changes:
234+
Using vs2022
235+
^^^^^^^^^^^^
209236

210-
In ``conda_build_config.yaml`` file:
237+
In ``recipe/conda_build_config.yaml`` file:
211238

212239
.. code-block:: yaml
213240
214241
c_compiler: # [win]
215-
- vs2019 # [win]
242+
- vs2022 # [win]
216243
cxx_compiler: # [win]
217-
- vs2019 # [win]
244+
- vs2022 # [win]
218245
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>`__.
222247

223248
After making these changes don't forget to rerender with ``conda-smithy`` (to rerender manually use ``conda smithy rerender`` from the command line).
224249

225-
226250
.. _cmd_batch_syntax:
227251

228252
Tips & tricks for CMD/Batch syntax

0 commit comments

Comments
 (0)