Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update maintainer kb windows doc #1956

Merged
merged 14 commits into from
Jun 27, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 35 additions & 8 deletions src/maintainer/knowledge_base.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,28 +118,55 @@ use a general web search to explore — while these topics are beyond the
scope of this documentation, there are ample discussions on them on the broader
Internet.

To bootstrap a conda environment and install ``conda-build``, consider
`miniforge<https://github.com/conda-forge/miniforge>`__.
mfisher87 marked this conversation as resolved.
Show resolved Hide resolved


Executing a build
^^^^^^^^^^^^^^^^^

The ``build-locally.py`` script does not support Windows. Use ``conda build
recipe/``.
mfisher87 marked this conversation as resolved.
Show resolved Hide resolved

Using a local channel looks a bit different in Windows, too (note the
triple-forward-slash in the channel name):

.. code-block::

conda create -n my-new-env -c file:///C:\Users\User\miniforge3\conda-build my-package
mfisher87 marked this conversation as resolved.
Show resolved Hide resolved

If you installed from a different distribution than ``miniforge`` or to a
different path, you'll need to alter this path.


Notes on native code
jaimergp marked this conversation as resolved.
Show resolved Hide resolved
--------------------

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

* For Python 3.5–3.7: Visual C++ 14.0
* For Python 3.5–3.10: Visual C++ 14.x
mfisher87 marked this conversation as resolved.
Show resolved Hide resolved

While you can obtain these tools by installing the right version of the full
`Visual Studio <https://visualstudio.microsoft.com/>`__ development
environment, you can save a lot of time and bandwidth by installing standalone
“build tools” packages. The links are as follows:

* For Python 3.5–3.7: `Microsoft Build Tools for Visual Studio 2017
<https://visualstudio.microsoft.com/vs/older-downloads/#visual-studio-2017-and-other-products>`__.
“build tools” packages. You can get them from `Visual Studio
Subscriptions<https://visualstudio.microsoft.com/vs/older-downloads/#visual-studio-2019-and-other-products>`__.
To download build tools, you'll need a Microsoft account. Once on the
Visual Studio Subscriptions page, you may also need to join the Dev Essentials
program. Once that's done, you can click the "Download" tab and search for
"Build Tools for Visual Studio 2019".

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

Simple CMake-Based ``bld.bat``
------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Some projects provide hooks for CMake to build the project. The following
example ``bld.bat`` file demonstrates how to build a traditional, out-of-core
build for such projects.
Expand Down Expand Up @@ -177,7 +204,7 @@ The following feedstocks are examples of this build structure deployed:


Building for different VC versions
----------------------------------
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

On Windows, different Visual C versions have different ABI and therefore a package needs to be built for different
Visual C versions. Packages are tied to the VC version that they were built with and some packages have specific
Expand All @@ -203,7 +230,7 @@ To skip building with a particular ``vc`` version, add a skip statement.
- {{ compiler('cxx') }}

Using vs2019
-------------
^^^^^^^^^^^^^
mfisher87 marked this conversation as resolved.
Show resolved Hide resolved

To use ``vs2019`` make the following changes:

Expand Down