Skip to content

Creating Anaconda Binary Packages for Windows

Connie Gao edited this page Jan 28, 2016 · 1 revision

PyDQED and PyDAS and other binaries for Windows

These are pretty tricky to compile. You must follow these directions exactly

  • Install Anaconda and Git as stated on documentation page for Windows users if you don't have them already. Do not create any RMG environment. Do not alter any additional environment variables

  • Get updated versions of conda-build, anaconda-client and, and conda itself.

  • For here on use Git Bash for everything all the conda-build (with the exception of compiling openbabel, which must be compiled with Command Prompt)

  • Install mingwpy through the pip package, not the conda one.

    pip install -i https://pypi.anaconda.org/carlkl/simple mingwpy

  • Create a libpython27.a library manually

    cd /c/Anaconda
    gendef python27.dll
    dlltool -D python27.dll -d python27.def -l libs/libpython27.a
    
  • Point distutils to MINGW

    cd /c/Anaconda
    echo -e "[build]\ncompiler=mingw32" > Lib/distutils/distutils.cfg
    
  • Clone all the repositories into a folder named /c/Code

  • Build binaries as normal

  • To fully test the package, after you upload it, run a command such as

    conda create --name pydas_env pydas

    to create a fresh environment in conda called pydas_env and install the pydas package into it.

Note: A lot of the build scripts for windows require copying both the libpython27.a and distutils.cfg into the proper %PREFIX% build folder. This should be already in the bld.bat scripts.