Hi Barry, Tony offers some good advice. One problem is that mdtraj is only available to pip install as a binary on Mac -- on Windows and Linux it will have to be compiled from source so the user will have to have a compilation environment installed. The two options I can think of are:
1) Compile the mdtraj module yourself and offer 3 different platform-specific wheels for your bundle.
2) Warn the user that they need to have a compilation environment installed on Windows/Linux to use your bundle.
Neither are ideal.
As for traj2nmr, I don't think there are any install-time hooks for running arbitrary commands, but when your package starts up it could check whether the traj2nmr executable is importable and if it's not then install it using sys.executable, which will be ChimeraX rather than python itself, but you could use the "--nogui --script path/to/setup.py --exit" flags to install using ChimeraX. Note that on Windows sys.executable will end with "ChimeraX.exe" but you will need to change that to "ChimeraX-console.exe" in order to run it as a command-line program. You would include traj2nmr as an additional package, as Tony outlined.
As for the-plugins-Runnable-dir, use the DataFiles tag and its DataDir child element to get that directory and all its contents copied into your installation, e.g.:
<DataFIles>
<DataDir>the-plugins-Runnable-dir</DataDir>
</DataFiles>
--Eric
Eric Pettersen
UCSF Computer Graphics Lab
Barry,
Someone else might be able to give advice for shell scripts and java, but you can include python dependencies in your bundle_info.xml file.
For pip-installable modules, you can just include the names and versions in a Dependencies group in the bundle_info.xml. When someone installs your bundle, ChimeraX will go grab all the dependencies automatically. For things not on PyPI, you could include them as an additional package, provided the module's license is compatible with yours. You'll have to specify the path to the package's source code on your computer, and they'll get packaged alongside your bundle. I use both dependencies and additional packages in SEQCROW. SEQCROW's bundle_info.xml is here:
https://github.com/QChASM/SEQCROW/blob/master/bundle_info.xml#L68. The additional packages are listed towards the bottom. The ChimeraX bundle_info doc has more details:
https://www.cgl.ucsf.edu/chimerax/docs/devel/tutorials/bundle_info.html. I'm guessing the TOML files support similar options if you're using that.
Hope that helps,
Tony
Hello,
I have been developing a plugin in bits and pieces for a while. I am now hoping to build a bundle (or whatever) to make installation pretty seamless. My program is a bit unconventional so I have a few questions on how to proceed.
My plugin templating copies one of the examples (maybe the Tool example).
My plugin uses a couple of python packages/modules:
It also will have some shell scripts I want to include and also a java program.
So far we have been getting by installing things like this:
- in chimerax using the command prompt entering "pip install mdtraj" or similar
- from an OS terminal invoking chimerax's version of python to run traj2nmr's setup.py program so that it goes into chimerax's python's installed packages
- including our shell scripts in a Runnable directory under the plugin installation directory (during development) and copying them in a similar directory under the ~/.local/share/....chimerax-path-stuf.../the-plugins-Runnable-dir.
Maybe the plugin installation process does this for me already but it is often not showing the latest changes even after plenty of "dev installs" in the chimerax command prompt line.
- I am just starting to want to place the java app and the shell script that launches it somewhere. Hopefully in that same Runnable directory.
Right now, I am trying to learn what is the best approach to bundle this all together and have a simple installation process. Can someone advise a bit? Thanks.
_______________________________________________
ChimeraX-users mailing list --
chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to
chimerax-users-leave@cgl.ucsf.edu
Archives:
https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/
_______________________________________________
ChimeraX-users mailing list --
chimerax-users@cgl.ucsf.eduTo unsubscribe send an email to
chimerax-users-leave@cgl.ucsf.eduArchives:
https://mail.cgl.ucsf.edu/mailman/archives/list/chimerax-users@cgl.ucsf.edu/