Support for packaging BNG with Anaconda #191
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a set of changes needed to put BNG in an Anaconda package on Windows. The Anaconda build system uses either the Microsoft VS compiler (there's too much posix dependency in BNG, so this seems like a lot of work) or the msys2 environment, which is what I went with.
Itemized changes:
cputime.cpp
, which works natively on Windows and posix using a bunch ofifdef
sconfig.guess
andconfig.sub
, which identify the build platform. They weren't updated since 2005, so they couldn't identify msys2. I updated them as described here and included them in a newcvode-2.6.0.tar.gz
.bng2/Network3/src/util/mathutils/random.c
to use the cross platformrand()
andsrand()
, rather than the posix-specificrandom()
andsrandom()
.bng2\Perl2\BNGModel.pm
to search for batch files when looking for external executables on Windows (in addition to.exe
s). Anaconda uses.bat
files in place of symbolic links on Windows.The result of all this is a simple unified build system. To build, clone my Anaconda recipes repo, change to the
bionetgen
directory, and typeconda-build .
. Works on Windows, Linux, and Mac.To try the BNG build using these changes (together with NFsim and PySB builds), see my anaconda page for the packages and installation instructions.