Open
Description
We should document the best practices on how to add third party libraries to plugin's code. If someone wants to use, for instance, pyyaml module, they can use pip to install the module in their src directory as such:
(delphix) ➜ my_plugin ls
artifact.json plugin_config.yml schema.json src
(delphix) ➜ my_plugin pip install pyyaml -t src/
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting pyyaml
Downloading https://files.pythonhosted.org/packages/e3/e8/b3212641ee2718d556df0f23f78de8303f068fe29cdaa7a91018849582fe/PyYAML-5.1.2.tar.gz (265kB)
|████████████████████████████████| 266kB 6.2MB/s
Building wheels for collected packages: pyyaml
Building wheel for pyyaml (setup.py) ... done
Stored in directory: /../Library/Caches/pip/wheels/d9/45/dd/65f0b38450c47cf7e5312883deb97d065e030c5cca0a365030
Successfully built pyyaml
Installing collected packages: pyyaml
Successfully installed pyyaml-5.1.2
Now, in the src
directory, we have:
src/
plugin_runner.py
PyYAML-5.1.2.dist-info
generated/
yaml/
┆Issue is synchronized with this Jira Story by Unito