A template project to both illustrate and serve as an example for plugin creations on top of the manim (community edition) engine.
Project description
This is a template project that demonstrates how one can create and upload a manim plugin to PyPI using a PEP 517 compliant build system (in this case poetry). This build system ensures users of your plugin are able to do so reliably without without falling into dependency hell. You may use another build system other than poetry (e.g. Flit, Enscons, etc…) if you wish to.
Creating Plugins
Installing Poetry
Poetry can be installed on any OS that can has curl. Please visit the official poetry website for installation instructions .
Setting Up Your Plugin Directory Structure
To create a Python project suitable for poetry you may want to see the official documentation for a list of all available commands. In short, if you haven’t extended manim’s functionality yet, run:
poetry new --src manim-YourPluginName
Note: --src is both optional and recomended in order to create a src directory where all of your plugin code should live.
This will create the following project structure:
manim-YourPluginName ├── pyproject.toml ├── README.rst ├── src │ └── manim_yourpluginname │ └── __init__.py └── tests ├── __init__.py └── test_manim_yourpluginname.py
If you have already extended manim’s functionality, or have just created the above directory structure for your plugin, you can then run:
cd path/to/plugin
poetry init
This will prompt you for basic information regarding your plugin and help create and populate a pyproject.toml similar to the one in this template.
See the official documentation for more information on the init command.
Testing Your Plugin Locally
poetry install
This command will read the pyproject.toml, install the dependencies of your plugin, and create a poetry.lock file to ensure everyone using your plugin gets the same version of dependencies. It is important that your dependencies are properly annotated with a version constraint (e.g. manim:^0.1.1, numpy:1.19.2, etc…).
See the official documentation for more information on versioning or the install command.
Uploading Your Project
By default, poetry is set to register the package/plugin to pypi. As soon as your plugin is useful locally, run the following:
poetry publish --build
Your project should now be available on PyPI for users to install via pip install manim-YourPluginName and usable within their respective environments.
See the official documentation for more information on the publish command.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file manim-PluginTemplate-0.1.1.tar.gz
.
File metadata
- Download URL: manim-PluginTemplate-0.1.1.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 637a4aaa6d3741fb35f240896648bc13074a0d7d67135aacf8464d6f569249b9 |
|
MD5 | 6295bbb1528a30164be1a6071ca2ea3f |
|
BLAKE2b-256 | 25f4671c444a3a7f1395892479f81106a96d9e51f1f9db3fb13a2550334fb80f |
File details
Details for the file manim_PluginTemplate-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: manim_PluginTemplate-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.5 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c380d1cef9931f9c3773d1347163ad3769f390d6108b6cc4cce432feb8f80326 |
|
MD5 | cfeb1d9d9e808847f85e99391e29dac7 |
|
BLAKE2b-256 | 4f31fa7ad77556f74c415cbf2ab433261f2faa6ea78774657516d6dabbb51a2e |