python-microscopy / pyme-plugin

Template for making plug-ins for the Python-Microscopy Environment (PYME)
http://www.python-microscopy.org/
BSD 2-Clause "Simplified" License
3 stars 2 forks source link

[Enhancement ?] how to request plugin install with 'dist' arg? #8

Open csoeller opened 3 years ago

csoeller commented 3 years ago

The way to post-install plugins into the PYME.config dirs is great. Now install_plugins.py takes a 'dist' argument which is required for 'all users' installs, however I think this cannot be passed with the develop and install targets?

I believe the current function does not allow any way to get the dist argument used?

def install_pyme_plugin():
    import sys
    import subprocess
    import os
    plugin_install_path = os.path.join(os.path.dirname(__file__), PACKAGE_NAME,
                                       'install_plugin.py')
    subprocess.Popen('%s %s' % (sys.executable, plugin_install_path), 
                        shell=True)

Any good solution that comes to mind?