# -*- coding: utf-8 -*-
from setuptools import setup

package_dir = \
{'': 'src'}

packages = \
['manim_plugintemplate', 'manim_plugintemplate.mobjects']

package_data = \
{'': ['*']}

install_requires = \
['manim>=0,<1']

entry_points = \
{'manim.plugins': ['manim_plugintemplate = manim_plugintemplate']}

setup_kwargs = {
    'name': 'manim-plugintemplate',
    'version': '0.1.4',
    'description': 'A template project to both illustrate and serve as an example for plugin creations on top of the manim (community edition) engine.',
    'long_description': 'Plugin Template\n===============\nPlugins are features that extend Manim\'s core functionality. This is a\ntemplate project repository that demonstrates how you can create and upload a\nmanim plugin to PyPI using a PEP 517 compliant build system, `Poetry\n<https://python-poetry.org>`_. Feel free to copy the template repository on\nGitHub so you can generate a project with the same directory structure,\nbranches, and files.\n\nPoetry is **NOT** required to create plugins, but is recommended because it\nprovides build isolation and ensures users can reliably install your plugin\nwithout falling into dependency hell. You may use another build system (e.g.\nFlit, Setuptools, Pipenv, etc...) if you wish. \n\nCreating Plugins\n----------------\nThe only requirement of your preferred build system is that it specifies the\n``manim.plugins`` `entry point\n<https://packaging.python.org/specifications/entry-points/>`_.\n\n.. note:: \n\n    The plugin naming convention is to add the prefix ``manim-``. This allows\n    users to easily search for plugins on organizations like PyPi, but it is\n    not required.\n\nInstalling Poetry\n~~~~~~~~~~~~~~~~~\nPoetry can be installed on Windows, MacOS and Linux. Please visit the\nofficial poetry website for `installation instructions\n<https://python-poetry.org/docs/#installation>`_. You may want to see the\nofficial documentation for a list of all `available commands\n<https://python-poetry.org/docs/cli/>`_.\n\n\nSetting Up Your Plugin Directory Structure\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo create a Python project suitable for poetry, run: \n\n.. code-block:: bash\n\n\tpoetry new --src manim-YourPluginName \n\n.. note:: \n\n    ``--src`` is both optional and recomended in order to create a src\n    directory where all of your plugin code should live.\n\nThis will create the following project structure:\n:: \n\n    manim-YourPluginName\n    ├── pyproject.toml\n    ├── README.rst\n    ├── src\n    │   └── manim_yourpluginname\n    │       └── __init__.py\n    └── tests\n        ├── __init__.py\n        └── test_manim_yourpluginname.py \n\nIf you have already extended manim\'s functionality, you can instead run:\n\n.. code-block:: bash\n\n    cd path/to/plugin\n    poetry init\n\nThis will prompt you for basic information regarding your plugin and help\ncreate and populate a ``pyproject.toml`` similar to the one in this template;\nhowever, you may wish to update your project directory structure similarly.\n\nSee the official documentation for more information on the `init command\n<https://python-poetry.org/docs/cli/#init>`_.\n\nFrom now on, when working on your plugin, ensure you are using the virtual\nenvironment by running the following at the root of your project:\n\n.. code-block:: bash\n\n    poetry shell \n\nUpdating Pyproject.toml\n~~~~~~~~~~~~~~~~~~~~~~~\nThe ``pyproject.toml`` file is used by Poetry and other build systems to\nmanage and configure your project. Manim uses the package\'s entry point\nmetadata to discover available plugins. The entry point group,\n``"manim.plugins"``, is **REQUIRED** and can be `specified as follows\n<https://python-poetry.org/docs/pyproject/#plugins>`_:\n\n.. code-block:: toml\n\n    [tool.poetry.plugins."manim.plugins"]\n    "manim_yourpluginname" = "module:object.attr"\n\n.. note::\n\n    The left hand side represents the entry point name which should be unique\n    among other plugin names. This is the internal name Manim will use to\n    identify and handle plugins.\n\n    The right hand side should reference a python object (i.e. module, class,\n    function, method, etc...) and will be the first code run in your plugin.\n    In the case of this template repository, the package name is used which\n    Python interprets as the package\'s ``__init__.py`` module.\n\n    See the python packaging `documentation\n    <https://packaging.python.org/specifications/entry-points/>`_ for more\n    information on entry points.\n\nTesting Your Plugin Locally\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n.. code-block:: bash\n\n    poetry install\n\nThis command will read the ``pyproject.toml``, install the dependencies of\nyour plugin, and create a ``poetry.lock`` file to ensure everyone using your\nplugin gets the same version of dependencies. It is important that your\ndependencies are properly annotated with a version constraint (e.g.\n``manim:^0.1.1``, ``numpy:*``, etc...). Equally important to the dependencies\nspecified here is that they do not directly conflict with `Manim\'s\n<https://github.com/ManimCommunity/manim/blob/master/pyproject.toml>`_. If\nyou want to update the dependencies specified in ``pyproject.toml``, use:\n\n.. code-block:: bash\n\n    poetry update\n\nSee the official documentation for more information on `versioning\n<https://python-poetry.org/docs/dependency-specification/>`_ or the `install\ncommand <https://python-poetry.org/docs/cli/#install>`_. \n\n\nPoetry allows for dependencies that are strictly for project developers.\nThese are not installed by users. To add them to your project, update the\n``pyproject.toml`` file with the section followed by the dependencies:\n\n.. code::toml\n\n    [tool.poetry.dev-dependencies]\n    pytest = "*"\n    pylint = "*"\n\nThe ``pytest`` package is a functional testing framework which you can use to\nrun the test within the ``manim-YourPluginName/tests`` directory. You should\ncreate files which test the behavior and functionality of your plugin here.\nTest first development is a good practice to ensure your code behaves as\nintended before packaging and shipping your code publicly. Additionally, you\ncan create Manimations that depend on your plugin which is another great way\nto ensure functionality.\n\nUploading Your Project\n----------------------\n\nBy default, poetry is set to register the package/plugin to PyPI. You\'ll need\nto register an account there to upload/update your plugin. As soon as your\nplugin is useful locally, run the following:\n\n.. code-block:: bash\n\n    poetry publish --build\n\nThis will prompt you for your PyPI username and password; however, it is\nrecommended to use a project PyPI API token with the username ``__token__``\ninstead.\n\nYour project should now be available on PyPI for users to install via ``pip\ninstall manim-YourPluginName`` and usable within their respective\nenvironments. If instead you would like to upload to Test PyPI, you can run:\n\n.. code-block:: bash\n\n    poetry config repositories.testpypi https://test.pypi.org/simple/\n    poetry publish -r testpypi --build\n\nSee the official documentation for more information on the `publish command\n<https://python-poetry.org/docs/cli/#publish>`_.\n\nIf you are interested in CI/CD pipelines and using GitHub Actions to\nautomatically publish releases to your PyPI project, you can setup a PyPI API\nToken, or PyPI Test API Token for your project. Then on your GitHub\nrepository you can setup a secret under the repository\'s settings, followed\nby the appropriate GitHub Action.\n\nSee the official Python documentation on `publishing Python package\ndistributions using GitHub Actions\n<https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/>`_.',
    'author': 'The Manim Community Developers',
    'author_email': None,
    'maintainer': None,
    'maintainer_email': None,
    'url': 'https://github.com/ManimCommunity/manim-plugintemplate',
    'package_dir': package_dir,
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'entry_points': entry_points,
    'python_requires': '>=3.6,<4.0',
}


setup(**setup_kwargs)
