sharppy / SHARPpy

Sounding/Hodograph Analysis and Research Program in Python
https://sharppy.github.io/SHARPpy/index.html
Other
222 stars 110 forks source link

Binary Distributions for OS X/Windows #41

Closed keltonhalbert closed 9 years ago

keltonhalbert commented 9 years ago

Something that needs to be worked on is getting binary distributions of SHARPpy available for OS X and Windows (because let's face it - if you're using Linux, you know how to run a Python script). I've made some progress in this area using Py2App for Mac (Py2Exe is the Windows equivalent), but I've had some issues with it properly including all of the PySide libraries.

wblumberg commented 9 years ago

Tossing this idea out: we can distribute SHARPpy through the Mac App store?

keltonhalbert commented 9 years ago

It is an idea I have tossed around, but I am not sure what sort of hoops/copy right stuff we would have to work out before doing that. Obviously we would not be charging for the program, but I am not entirely sure how the Mac App Store works. Perhaps talking to Zac Flaming would be a good start.

keltonhalbert commented 9 years ago

Since we will be releasing v1.2 without this functionality, removing it from the milestone

wblumberg commented 9 years ago

Website with some info on doing this for OS X.

https://plashless.wordpress.com/2013/05/01/python-pyside-qt-pyinstaller-apps-on-osx/

keltonhalbert commented 9 years ago

Given the inundation of questions regarding installation from non-python savvy users, I've been spending some time working on this problem. I'll report back if I figure anything out.

keltonhalbert commented 9 years ago

So, it looks like it's going to be rather tedious to pull this off. Our database files, such as SARS, PWV, shapefiles, etc, are problems. py2app puts these in a zip folder that cannot be opened, and pyinstaller doesn't find them easily either.

Currently trying to think of the best way of handling this. One option is having a binary branch that has the paths to these things binary relative, but then it may become a pain to manage these files between branches if they receive any updates.

keltonhalbert commented 9 years ago

Scratch that - I have good news! I have the beginnings of a Mac OS X binary that is functional using PyInstaller. I think we can have a working Windows/Mac OS X binary within a week or two.

wblumberg commented 9 years ago

An idea...the other website/cleaner looking one could link directly to the binaries and we could direct people there.

wblumberg commented 9 years ago

Perhaps we have a "research" branch and "operational" branch? Or basic user branch or advanced user branch?

keltonhalbert commented 9 years ago

I don't think that will be necessary. It was a problem with the way py2app handled things.

With PyInstaller, I only have to make a few code changed to make it work - hardly necessary for two different branches. I can send you the example binary in a bit.

wblumberg commented 9 years ago

Exciting!

wblumberg commented 9 years ago

@tsupinie was a little uncertain about how we'd generate applications for other platforms, but he suggested that if we couldn't generate Windows apps from a Mac using PyInstaller, we could enlist other tech savvy colleagues who had other platforms to do this. We've already got OS X Yosemite, Mavericks, and Windows 7 between the three of us. Not sure what Linux you have.

aarande commented 9 years ago

You could use Vagrant to really easily spin up some base Virtual Machines and build Linux Binaries or rpm's from those.  Aaron

Sent via the Samsung Galaxy Note® 4, an AT&T 4G LTE smartphone

-------- Original message -------- From: Greg Blumberg notifications@github.com Date: 04/20/2015 3:32 PM (GMT-06:00) To: sharppy/SHARPpy SHARPpy@noreply.github.com Subject: Re: [SHARPpy] Binary Distributions for OS X/Windows (#41)

@tsupinie was a little uncertain about how we'd generate applications for other platforms, but he suggested that if we couldn't generate Windows apps from a Mac using PyInstaller, we could enlist other tech savvy colleagues who had other platforms to do this. We've already got OS X Yosemite, Mavericks, and Windows 7 between the three of us. Not sure what Linux you have.

— Reply to this email directly or view it on GitHub.

wblumberg commented 9 years ago

That's a good point Aaron. I sometimes forget virtual machines are a possibility. Haven't needed to run one in years.

keltonhalbert commented 9 years ago

I've created a branch that contains the necessary edits in the SHARPpy.py and data_sources.py files, and the necessary runtime files, in order to make an OS X binary. To compile requires having pyinstaller installed, which can be installed via 'pip install pyinstaller'. Then all you have to do is run 'pyinstaller SHARPpy.spec' in the runsharp folder, and it will put the binary in the 'dist' folder.

So far, the OS X binary has worked on Lion and Yosemite. I'll see if I can make it compile an EXE for Windows, and if it works, we can add the binaries to the release and let people know that they can download it this way.

wblumberg commented 9 years ago

Add OS X Mavericks to that too. That's what I have on my laptop.

keltonhalbert commented 9 years ago

I've just compiled a binary on my Windows 8.0 install on my laptop. I've sent @wblumberg and @tsupinie copies before we try a larger test audience.

keltonhalbert commented 9 years ago

Alright. We've been testing these binaries on OS X and Windows 8 for some time, and they appear to be functional. Closing this issue as the binaries will be released around Monday.