jacobjma / PyQSTEM

A Python interface to the electron microscopy simulation program QSTEM
GNU General Public License v3.0
60 stars 30 forks source link

Add metadata for pip / PyPI.org #12

Closed schiotz closed 5 years ago

schiotz commented 5 years ago

Add metadata for uploading to pypi.org so it becomes pip-installable.

~Work-in-progress: setup.py needs to be modified to work with Windows as well.~

schiotz commented 5 years ago

Hi @jacobjma

I think this is ready for merging now. There was no way I could get PyQSTEM to install on Windows just using setup.py. It looks like some kind of binary incompatibility between something (compilers, Anaconda, the pre-build FFTW, I could not work it out).

Using @msarahan's conda recipe, I finally got it to work on Windoze.

I think it should be ready to merge. To make PyQSTEM really easy to install, it should be uploaded to PyPI and conda forge. I suggest the following steps after merging this:

I think it is best that you do the first one, but I am willing to do the next two (admittedly, I have never uploaded anything to Anaconda, but how hard can it be ... well after the awful build experience I am slightly worried...)

msarahan commented 5 years ago

Take your recipe from here over to https://github.com/conda-forge/staged-recipes - you'll need to tweak it a bit, but not too much.

schiotz commented 5 years ago

Thanks, @msarahan

I would never have got it to work without your recipe file!

Even with it, it is a nightmare of compiler versions and variables. The Anaconda prompt cannot see the compiler, and the Visual Studio prompt cannot see Anaconda, unless it is setting the path when being installed, which they warn strongly against. Probably, I am doing something else wrong, but I am certainly not a Windows developer :-) At least starting with a sensible conda recipe made it doable.

schiotz commented 5 years ago

Hi Jacob @jacobjma

I can confirm that this also works on Anaconda for Mac, and I think it is ready to be merge.

/Jakob

jacobjma commented 5 years ago

Hi Jakob @schiotz

Thanks for doing this. I will look at uploading it to PyPI tomorrow.