ajdawson / windspharm

A Python library for spherical harmonic computations on vector winds.
http://ajdawson.github.io/windspharm
MIT License
82 stars 38 forks source link

Integration with Anaconda #39

Closed DamienIrving closed 8 years ago

DamienIrving commented 10 years ago

Hi Andrew,

I've installed Anaconda, then used conda/binstar to install iris, cartopy and cdat-lite alongside it (thanks for providing a binstar for cdat-lite). What would be the best way to install windspharm and eofs alongside all this? I noticed that you don't have binstar files for windspharm and eofs specifically, but you do have one for pyspharm, which may help in this situation...

ajdawson commented 10 years ago

Good question. I've provided Pyspharm on binstar so that I can use conda in the Travis CI tests without having to build it every time. I have made conda packages for windspharm before but I didn't post them. I anticipate this is something that will get done in the near future. What platform are you looking for? I only have access 64-bit Linux and ancient OS X 10.6 at the moment.

DamienIrving commented 10 years ago

Primarily I'm after 64-bit Linux (for my desktop and also the departmental server), but it would also be useful to have OS X 10.9 available for my laptop. On binstar there is a default for all pypi packages, which suggests (see here): pip install -i https://pypi.binstar.org/pypi/simple windspharm

I'm assuming that using conda is a better solution than this?

ajdawson commented 10 years ago

I don't know much about that method. I would like to provide releases as native conda packages anyway though. I use conda a lot now and I feel I should do my bit to help out others!

Building windspharm is actually pretty trivial since it is pure python, so if I create a conda recipe it should be easy for you or another person to build an OS X 10.9 package which I host on my binstar (just to keep it all in one place).

ajdawson commented 10 years ago

Do you want to test these binstar packages: https://binstar.org/ajdawson/windspharm? I've made builds of windspharm v1.3.1 for Python 2.7, 3.3 and 3.4 all for 64-bit Linux.

DamienIrving commented 10 years ago

That works on my Linux-64 machine - thanks!

ajdawson commented 10 years ago

Great. I had a go at building packages for OS X but I couldn't get pyspharm to build successfully in the conda build environment. Creating a conda package for windspharm would be simple but without having its core dependency it would be practically useless!

DamienIrving commented 10 years ago

Shame about OS X. There is nothing available on binstar for cdat-lite, so I'm assuming that also doesn't build successfully - this might be a common problem for non-Linux operating systems...

ajdawson commented 10 years ago

The frustrating thing is they both build fine in the normal python setup.py install manner so you can simply install them into your anaconda environment. I don't know much about the OS X build system but it seems conda is stumbling on relocation of the binaries. There is probably a neat way round this but I don't know what it is. You can install the packages yourself without much fuss though, so don't let this hold you back.

darothen commented 9 years ago

Hi @DamienIrving and @ajdawson,

I've built an OS X package for both pyspharm and windspharm, for Python 3.4 - it seems to work on both machines I have access to. Windspharm was easy; I just converted @ajdawson's existing package and it worked fine. There was a gltich in pyspharm in the linking stage of the build at the end of f2py's compilation; running from pip or source was just fine, but conda build passed the wrong architecture and flags to the linker. So I manually overrode them in the build script and it seems to work.

You can find them on my binstar channel. Was a painless process; I have a ton of backlogged work on my parcel model, but building a conda package for it and its dependencies (Sundials CVODE solver) is high on my priority list after seeing how easy this was.

ajdawson commented 9 years ago

That is great @darothen! I'd like to get hold of your pyspharm recipe for OS X so I can try and support packages for this in the future (a future where I own a Mac...), is that is OK? I have a repository of conda recipes that you could make a PR to: https://github.com/ajdawson/conda-recipes, or you can just post it somewhere or even email me, whatever suits you best.

darothen commented 9 years ago

Ah, if I had found your repository of recipes I would've just done that! I should have time later this evening to fork your repo, hack in my changes, and submit a PR.

Also, I'm very tempted to integrate a handler for xray DataArrays/Datasets into windspharm. I've abandoned iris in the short term because I wanted to move on to Python 3. Right now, I do have a working wrapper that allows me to pass xray objects to VectorWind but it could use polishing, test cases, documentation, etc.

ajdawson commented 9 years ago

I've been working on xray interfaces myself actually. It is definitely on the todo list.

ajdawson commented 8 years ago

@DamienIrving, @darothen - I've finally got hold of a working Mac and built some OS X conda packages for windspharm/pyspharm. I'm going to close this issue for now, but please comment here if you use them and find problems. I don't use OS X for work so any feedback on these is welcome.