ejeschke / ginga

The Ginga astronomical FITS file viewer
BSD 3-Clause "New" or "Revised" License
121 stars 77 forks source link

Make package installable #7

Closed astrofrog closed 11 years ago

astrofrog commented 11 years ago

At the moment, Ginga does not appear to follow the conventional layout for a Python package. It would be nice if you could make it more 'standard' and have a setup.py script for instance that would install the package and any scripts into the standard locations.

One benefit of this is that Ginga could then be included in package repositories (for example I can add it to MacPorts on Mac).

ejeschke commented 11 years ago

That is an excellent suggestion. Thanks for inputting it. After a quick crash course in distutils, I've made a setup.py script and made the package installable as a package + script. I committed this a couple of days ago. I would greatly appreciate it if you could give it a try and let me know your result.

I have to say that I'm not sure what the latest "blessed" package installer is for python packages. It used to be distutils, then setuptools seemed to be the thing, and now from my limited research it looks like "distutils2" is the chosen successor. Wish they would pick one and stick with it.

astrofrog commented 11 years ago

@ejeschke - if you want to be consistent with other Astropy packages, we could copy the setup.py script from the Astropy package template (and a couple of other required files) - this is what we are using for other affiliated packages. But this is not a requirement, so it's just if you are interested. We are using distribute for the setup.py file.

ijiraq commented 11 years ago

distribute is damn close to being the 'blessed' installer. Certainly in astro.

JJ

On 2013-04-13, at 6:59 AM, Thomas Robitaille notifications@github.com wrote:

@ejeschke - if you want to be consistent with other Astropy packages, we could copy the setup.py script from the Astropy package template (and a couple of other required files) - this is what we are using for other affiliated packages. But this is not a requirement, so it's just if you are interested. We are using distribute for the setup.py file.

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

ejeschke commented 11 years ago

I'll take a look at the AstroPy installer. For now, I got it to install as a package "ginga" plus a script "ginga".

astrofrog commented 11 years ago

@ejeschke - by the way, I'd be happy to open a PR if you wanted to go with the 'standard' astropy setup.py, as I've been doing that for a few other packages, and there's a few subtleties.