<p dir="auto">At the moment we have a single major blocker to compiling scipy on Windows:</p>
<ul dir="auto">
<li>Python.org Windows binaries are compiled against an MS Visual C++ runtime, which differs with different Python versions: see <a href="https://matthew-brett.github.io/pydagogue/python_msvc.html" rel="nofollow">https://matthew-brett.github.io/pydagogue/python_msvc.html</a></li>
<li>It is dangerous and error-prone to pass objects (such as file-handles) that are created using one run-time, into code linked against another run-time;</li>
<li>There is currently Fortran compiler with a BSD-compatible run-time license that can link against all the MSVC runtimes we need to support.  In particular mingw-w64 cannot currently link against MSVC 2015 runtimes, used by Pythons 3.5 and 3.6.</li>
</ul>
<p dir="auto">Here we are exploring another option, which is to compile the Fortran code to link against the generic MSVCRT runtime, on the basis that the Fortran code does not use any of the objects (such as file-handles) that get created by the Python (and Numpy) linked MSVC run-times. The plan is therefore:</p>
<ul dir="auto">
<li>Compile scipy C code with the MSVC compiler matching the version of Python;</li>
<li>Compile scipy Fortran code with gfortran linking against the generic MSVCRT runtime;</li>
<li>Hope for the best.</li>
</ul>
<p dir="auto">There's some discussion of this over at <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="239959507" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/7551" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/7551/hovercard" href="https://github.com/scipy/scipy/issues/7551">#7551</a> - starting at <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="239959507" data-permission-text="Title is private" data-url="https://github.com/scipy/scipy/issues/7551" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/7551/hovercard?comment_id=312460365&amp;comment_type=issue_comment" href="https://github.com/scipy/scipy/issues/7551#issuecomment-312460365">#7551 (comment)</a>.</p>
<p dir="auto">Appveyor scripting at <a href="https://github.com/matthew-brett/build-scipy">https://github.com/matthew-brett/build-scipy</a> . Builds at <a href="https://ci.appveyor.com/project/matthew-brett/build-scipy" rel="nofollow">https://ci.appveyor.com/project/matthew-brett/build-scipy</a></p>
<p dir="auto">The procedure so far is the following (see: <a href="https://github.com/matthew-brett/build-scipy/blob/master/appveyor.yml">https://github.com/matthew-brett/build-scipy/blob/master/appveyor.yml</a>):</p>
<ul dir="auto">
<li>Download and install mingwpy into Python 2.7 matching the bitness (32 or 64) of the Python we're building in;</li>
<li>Patch <a href="https://mingwpy.github.io/" rel="nofollow">mingwpy</a> to link to the the default msvcrt.dll rather than the specific MSVC 9 runtime;</li>
<li>Unpack built OpenBLAS, and point scipy install to that build;</li>
<li>Patch numpy distutils to avoid linking to some mingw-specific libraries;</li>
<li>Build scipy.</li>
</ul>
<p dir="auto">Current errors are for missing math symbols such as <code class="notranslate">_sinf</code> - see <a href="https://github.com/scipy/scipy/issues/7551#issuecomment-314930962" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/7551/hovercard">this report</a> and <a href="https://github.com/scipy/scipy/issues/7551#issuecomment-314999140" data-hovercard-type="issue" data-hovercard-url="/scipy/scipy/issues/7551/hovercard">Pauli's suggestion</a>.</p>
<p dir="auto">Current participants <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/matthew-brett/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/matthew-brett">@matthew-brett</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/rgommers/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/rgommers">@rgommers</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/pv/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/pv">@pv</a> <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/carlkl/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/carlkl">@carlkl</a> .</p>
<p dir="auto"><em>Original ticket <a href="http://projects.scipy.org/scipy/ticket/1665" rel="nofollow">http://projects.scipy.org/scipy/ticket/1665</a> on 2012-05-30 by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/endolith/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/endolith">@endolith</a>, assigned to <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/cournape/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/cournape">@cournape</a>.</em></p>
<p dir="auto">The window functions in scipy.signal have a <code class="notranslate">sym</code> option for producing symmetric windows or periodic windows, but if you create a periodic window of an odd size, it gives identical output to a symmetric window.  This is in the code, but is it right?  It doesn't match Matlab's behavior, as described [https://ccrma.stanford.edu/~jos/sasp/Matlab_Hamming_Window.html here].</p>
<p dir="auto">If it's right, it should be documented why it works this way</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt;&gt; hamming(3) % same in Matlab and Octave
ans =
    0.0800
    1.0000
    0.0800
&gt;&gt; hamming(3,'symmetric') % Matlab only
ans =
    0.0800
    1.0000
    0.0800
&gt;&gt; hamming(3,'periodic') % Matlab only
ans =
    0.0800
    0.7700
    0.7700
&gt;&gt; hamming(4) % same in Matlab and Octave
ans =
    0.0800
    0.7700
    0.7700
    0.0800"><pre class="notranslate"><code class="notranslate">&gt;&gt; hamming(3) % same in Matlab and Octave
ans =
    0.0800
    1.0000
    0.0800
&gt;&gt; hamming(3,'symmetric') % Matlab only
ans =
    0.0800
    1.0000
    0.0800
&gt;&gt; hamming(3,'periodic') % Matlab only
ans =
    0.0800
    0.7700
    0.7700
&gt;&gt; hamming(4) % same in Matlab and Octave
ans =
    0.0800
    0.7700
    0.7700
    0.0800
</code></pre></div>
<p dir="auto">SciPy:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="In [2]: hamming(3)
Out[2]: array([ 0.08,  1.  ,  0.08])

In [3]: hamming(3,sym=True)
Out[3]: array([ 0.08,  1.  ,  0.08])

In [4]: hamming(3,sym=False)
Out[4]: array([ 0.08,  1.  ,  0.08])

In [5]: hamming(4)
Out[5]: array([ 0.08,  0.77,  0.77,  0.08])

In [6]: hamming(4, sym=True)
Out[6]: array([ 0.08,  0.77,  0.77,  0.08])

In [7]: hamming(4, sym=False)
Out[7]: array([ 0.08,  0.54,  1.  ,  0.54])"><pre class="notranslate"><code class="notranslate">In [2]: hamming(3)
Out[2]: array([ 0.08,  1.  ,  0.08])

In [3]: hamming(3,sym=True)
Out[3]: array([ 0.08,  1.  ,  0.08])

In [4]: hamming(3,sym=False)
Out[4]: array([ 0.08,  1.  ,  0.08])

In [5]: hamming(4)
Out[5]: array([ 0.08,  0.77,  0.77,  0.08])

In [6]: hamming(4, sym=True)
Out[6]: array([ 0.08,  0.77,  0.77,  0.08])

In [7]: hamming(4, sym=False)
Out[7]: array([ 0.08,  0.54,  1.  ,  0.54])
</code></pre></div>