Skip to Content.

mget-help - RE: [mget-help] Distributing MGET for ArcGIS 10.3.1 for other users

Please Wait...

Subject: Marine Geospatial Ecology Tools (MGET) help

Text archives


RE: [mget-help] Distributing MGET for ArcGIS 10.3.1 for other users


Chronological Thread 
  • From: Jason Roberts <>
  • To: Scott Gunn <>
  • Cc: "" <>
  • Subject: RE: [mget-help] Distributing MGET for ArcGIS 10.3.1 for other users
  • Date: Wed, 25 Jan 2017 21:11:43 +0000
  • Accept-language: en-US
  • Authentication-results: spf=none (sender IP is ) ;
  • Spamdiagnosticmetadata: NSPM
  • Spamdiagnosticoutput: 1:99

Hi Scott,

 

Thanks for the interest. Scriptable / unattended install is on our to do list, but it is a relatively low priority. You should be able to hack something together, though.

 

For pywin32, your best bet is probably to try the Python wheel that someone built for it recently. You’ll need to have a sufficiently new enough pip or setuptools, and I’m not sure what that implies if you are working with 10.3.1. The default stuff that comes with ESRI’s Python 2.7 installation might not be enough, so you might have to ask those modules to upgrade themselves first. But once they’re new enough, you should be able to programmatically trigger an installation of the pywin32 wheel from PyPi, or you could even package the .whl file with your own files and then install it from that local copy.

 

For MGET, unfortunately we don’t have a wheel or other packaging suitable for scriptable install. But for MGET to work from ArcGIS, you can probably:

 

1.    Install MGET on your own machine. Ideally this should be close in spec to what your users will use, e.g. have the same version of Arc, Python, and Python packages that they will use. But it is probably not critical that it be exactly correct.

 

2.    After MGET is installed, copy out the following to be used in your own installation process.

 

a.    C:\Program Files\GeoEco (entire tree, except *.pyc and *.pyo files)

b.    C:\Python27\ArcGIS10.3\Lib\site-packages\GeoEco (entire tree, except *.pyc and *.pyo files)

c.    C:\Python27\ArcGIS10.3\Lib\site-packages\_GeoEcoArcGISHelper.pyd (just one file)

 

3.    Have your installer restore those to the same locations on the new machine.

 

The .pyc and .pyo files are compiled versions of the .py files. The MGET installer (built with distutils) creates them when MGET is installed. Under the right circumstances—I’m not exactly sure what they are—you could probably copy those over to the new machine as well. But that’s risky unless you know what you’re doing. If you don’t copy them, then Python will create them the first time the files are imported, providing the user doing it has permissions to write to the directory that contains them. If not, I’m not sure what happens—probably nothing, and Python just loads the .py file without compiling it first. You could optimize this by looking up how to compile .py files (you just call a function to do it) and then compile them yourself from your installer.

 

Hope that helps. Feel free to send further questions.

 

Best,

 

Jason

 

From: [mailto:] On Behalf Of Scott Gunn
Sent: Tuesday, January 24, 2017 11:16 PM
To:
Subject: [mget-help] Distributing MGET for ArcGIS 10.3.1 for other users

 

Hi Jason and all,

 

I'm developing a geoprocessing tool for other users and would like to see if there's a way to distribute all MGET and PyWin32 tools to them without them going through the individual installations.  

 

I've successfully been able to reference a localized version of the MGET toolbox in my geoprocessing script directory, but the MGET tools still look for the GeoEco directory in the site-packages folder in the Python directory.  

 

I have thought about batch copying the GeoEco and PyWin folders to the site-packages folder, but I'm not sure if doing so would copy everything that MGET needs.  Any thoughts or examples on how to distribute MGET programmatically?

 

Thanks for the help!

Scott




Archive powered by MHonArc 2.6.19.

Top of Page