Basemap inclusion of pupynere

Jeff,

Would it be a lot of work for basemap to use the system copy of pupynere if it's installed, instead of installing its own copy? (like what's already done for dap and httplib2)

Ryan

···

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

Ryan May wrote:

Jeff,

Would it be a lot of work for basemap to use the system copy of pupynere if it's installed, instead of installing its own copy? (like what's already done for dap and httplib2)

Ryan

Ryan: The basemap version is modified to automatically unpack scaled short integers into floats using the add_offset and scale_factor variable attributes. It also automatically turns data with missing values into masked arrays.

Is having two versions causing you any problems?

"import pupynere" should give you the system copy. You'd have to "from mpl_toolkits.basemap import pupynere" to get the Basemap version.

-Jeff

···

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...236...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

Jeff Whitaker wrote:

Ryan May wrote:

Jeff,

Would it be a lot of work for basemap to use the system copy of pupynere if it's installed, instead of installing its own copy? (like what's already done for dap and httplib2)

Ryan

Ryan: The basemap version is modified to automatically unpack scaled short integers into floats using the add_offset and scale_factor variable attributes. It also automatically turns data with missing values into masked arrays.
Is having two versions causing you any problems?
"import pupynere" should give you the system copy. You'd have to "from mpl_toolkits.basemap import pupynere" to get the Basemap version.

Good to know. It's not that it's a big deal for me (it's one python file after all), I just noticed that Gentoo's ebuild is blowing it away and just requiring/installing mainline pupynere. From a purist standpoint, I don't like having multiple copies of the same code hanging around, but I'm not about to lose sleep over it. It might make your job easier if you could convince Roberto to take those changes upstream. :slight_smile: It sounds to me, however, that I need to file a Gentoo bug.

I will say that pupynere seems to be spreading, but not in a good way. There's the standalone version. Then there's your tweaked version. And there's a (now out-dated) copy in scipy.

On a related note, is there any reason that Basemap/pyshapelib couldn't use a system copy of shapelib? Right now, Gentoo's patching the setup.py to do this. I was curious if we could move that upstream.

Ryan

···

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma

Ryan May wrote:

Jeff Whitaker wrote:

Ryan May wrote:

Jeff,

Would it be a lot of work for basemap to use the system copy of pupynere if it's installed, instead of installing its own copy? (like what's already done for dap and httplib2)

Ryan

Ryan: The basemap version is modified to automatically unpack scaled short integers into floats using the add_offset and scale_factor variable attributes. It also automatically turns data with missing values into masked arrays.
Is having two versions causing you any problems?
"import pupynere" should give you the system copy. You'd have to "from mpl_toolkits.basemap import pupynere" to get the Basemap version.

Good to know. It's not that it's a big deal for me (it's one python file after all), I just noticed that Gentoo's ebuild is blowing it away and just requiring/installing mainline pupynere. From a purist standpoint, I don't like having multiple copies of the same code hanging around, but I'm not about to lose sleep over it. It might make your job easier if you could convince Roberto to take those changes upstream. :slight_smile:

Ryan: That's a good idea - I will contact Roberto.

It sounds to me, however, that I need to file a Gentoo bug.

I will say that pupynere seems to be spreading, but not in a good way. There's the standalone version. Then there's your tweaked version. And there's a (now out-dated) copy in scipy.

On a related note, is there any reason that Basemap/pyshapelib couldn't use a system copy of shapelib? Right now, Gentoo's patching the setup.py to do this. I was curious if we could move that upstream.

I know it's silly at some level to have multiple copies, but if basemap installs it's own (which doesn't conflict with the system copy) at least I'm sure it's going to work. For me, it means I have to spend less time helping folks figure out why they can't open shapefiles. It's a quite a bit harder to check if a C library works from within python code than it is a python package.

Bottom line - it could be done, but I don't think it's worth it. Shapelib is tiny anyway.

-Jeff

···

Ryan

--
Jeffrey S. Whitaker Phone : (303)497-6313
Meteorologist FAX : (303)497-6449
NOAA/OAR/PSD R/PSD1 Email : Jeffrey.S.Whitaker@...236...
325 Broadway Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web : Jeffrey S. Whitaker: NOAA Physical Sciences Laboratory

Jeff Whitaker wrote:

Ryan May wrote:

On a related note, is there any reason that Basemap/pyshapelib couldn't use a system copy of shapelib? Right now, Gentoo's patching the setup.py to do this. I was curious if we could move that upstream.

I know it's silly at some level to have multiple copies, but if basemap installs it's own (which doesn't conflict with the system copy) at least I'm sure it's going to work. For me, it means I have to spend less time helping folks figure out why they can't open shapefiles. It's a quite a bit harder to check if a C library works from within python code than it is a python package.

Bottom line - it could be done, but I don't think it's worth it. Shapelib is tiny anyway.

Fine by me. I just thought I'd see what could be done. It sounds like it'd be a maintainance pain for you. So long as you don't go messing with setup.py's handling of shapelib too often, Gentoo should be fine as it already has a patch. :slight_smile:

Ryan

···

--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma