Open smmaurer opened 5 years ago
I think this is a great idea. Do you know if conde forge supports compiling binary packages on Windows?
Yup, it does win-64, osx-64, and linux-64, for whichever versions of Python you request.
Here's their Windows documentation: https://conda-forge.org/docs/maintainer/knowledge_base.html#particularities-on-windows
@sablanchard @federicofernandez @janowicz
This is a proposal for how we can manage Pandana packaging going forward. Goals: easy installation, broad compatibility, simpler release process, limited maintenance.
Background
Pandana includes C++ code, so binary distributions need to be compiled for each combination of operating system and Python version it will run on. This is a lot of work and we've never done a good job covering every combination.
I'm proposing that we focus on (a) installation from source and (b) installation from Conda Forge, and not create any binary distributions ourselves.
Installing from source
We should aim to make this as automatic as possible.
Source installation works using compilation settings from
setup.py
. Runningpip install .
orpython setup.py install
(ordevelop
) will attempt to compile the C++ extension accordingly.This has often been broken, but it's working now (after the latest round of updates for v0.4.2) on all platforms. We'll need to keep
setup.py
up to date, though.Requirements for compilation:
On Mac, compilation with multi-threading support requires some extra steps: https://github.com/UDST/pandana/pull/109#issuecomment-485021324
Installing from Conda
This should be the go-to option for users.
Conda Forge automatically compiles binaries for all platforms, using
setup.py
plus some additional settings in the Conda build recipe. I haven't set it up yet, but it looks pretty straightforward, including multi-threading support for Mac.Previously we've distributed Pandana on the
udst
Conda channel, but we're aiming to migrate toconda-forge
anyway.Installing from Pip
This should be somewhat discouraged.
I don't see any way to create binary distributions for Pip without maintaining half a dozen cross-platform VMs. I'm proposing we skip that and only put the source distribution on Pip.
This will generally install fine on Mac and Linux; it will automatically compile on the user's machine, in about 15 seconds. It will not have multi-threading support on Mac.
It probably won't work for most Windows users, but Sam Blanchard reports that some of the other geospatial dependencies don't install well from Pip anyway, and it's best to use Conda on Windows.