cmweiss / geomag

Automatically exported from code.google.com/p/geomag
45 stars 43 forks source link

setup.py: data_files vs package_data #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'd like to suggest using `package_data` instead of `data_files` so that 
WMM.COF is automatically included in the installation (e.g. 
http://python-packaging-user-guide.readthedocs.org/en/latest/tutorial.html#packa
ge-data)
Thank you

from distutils.core import setup setup( name = "geomag", packages = ["geomag"],

data_files = [('geomag', ('geomag/WMM.COF',))],

package_data = {'geomag': ['WMM.COF']},
version = "0.9",
description = "Magnetic variation/declination",
author = "Christopher Weiss",
author_email = "cmweiss@gmail.com",
url = "http://geomag.googlecode.com/",
download_url = "http://geomag.googlecode.com/files/geomag-0.9.zip",
keywords = ["magnetic", "variation", "declination"],
classifiers = [
    "Programming Language :: Python",
    "Development Status :: 4 - Beta",
    "Environment :: Other Environment",
    "Intended Audience :: Developers",
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
    "Operating System :: OS Independent",
    "Topic :: Scientific/Engineering :: GIS",
    "Topic :: Utilities",
    ],
long_description = """\

Magnetic variation/declination

Calculates magnetic variation/declination for any latitude/longitude/altitude, for any date. Uses the NOAA National Geophysical Data Center, epoch 2010 data. """ )

Original issue reported on code.google.com by samuel.h...@gmail.com on 1 Oct 2014 at 5:55

GoogleCodeExporter commented 9 years ago
I'll second this. Installing geomag-0.9 into a virtualenv with `pip install 
geomag` results in a package that can't even be imported because `__init__.py` 
tries to instantiate a singleton instance.

Original comment by david.a....@gmail.com on 9 Dec 2014 at 3:41

GoogleCodeExporter commented 9 years ago
Thank you for your feedback. I haven't coded anything in python since this was 
coded back in 2009-2010. It's taking me some time to reacquaint myself with it. 
I hope to have a new minor release asap (tomorrow or Thursday) I'm working on a 
new package that incorporates your change above and will include the new 2015 
WMM as well as the 2010 for computing dates in the past.
I can't seem to upload to the downloads section. Until I can do that I'm  a bit 
stuck. Seeking help.
But I can attach to this comment.

Original comment by cmwe...@gmail.com on 16 Dec 2014 at 4:58

Attachments:

GoogleCodeExporter commented 9 years ago
I just learned that uploads to the Downloads tab was disabled over a year ago.

Original comment by cmwe...@gmail.com on 16 Dec 2014 at 3:23

GoogleCodeExporter commented 9 years ago
As requested.

Original comment by cmwe...@gmail.com on 19 Dec 2014 at 4:41