========================
Building a conda package
========================

You can build a conda package to bundle software files and information about the software---such as its name, specific version and description---into a single file that can be easily installed and managed.

Building a conda package requires `installing conda build <https://docs.conda.io/projects/conda-build/en/stable/install-conda-build.html>`_ and creating a `conda build recipe <https://docs.conda.io/projects/conda-build/en/stable/concepts/recipe.html>`_. 

You then use the ``conda build`` command to build the conda package from the conda recipe.

.. tip::
   If you are new to building packages with conda, here are some video tutorials that you may find helpful:

* `Production-grade Packaging with Anaconda <https://www.youtube.com/watch?v=tfI2hdK6vVY>`_ | AnacondaCon 2018 
   This 41-minute presentation by Mahmoud Hashemi covers using conda and conda environments to build an OS package (RPM) and Docker images.

* `The Sheer Joy of Packaging <https://www.youtube.com/watch?v=xiI1i525ljE>`_ | SciPy 2018 Tutorial 
   This 210-minute presentation by Michael Sarahan, Filipe Fernandes, Chris Barker, Matt Craig, Matt McCormick, Jean-Christophe Fillion-Robin, Jonathan Helmus, and Ray Donnelly provides end-to-end examples of packaging with PyPI and conda. You can find materials from the tutorial `here <https://github.com/python-packaging-tutorial/python-packaging-tutorial>`_.

* `Making packages and packaging "just work" <https://www.youtube.com/watch?v=Kamld5Z-xx0>`_ | PyData 2017 Tutorial 
   This 40-minute presentation by Michael Sarahan walks you through critical topics such as the anatomy of a Python package, tools available to make packaging easier, plus how to automate builds and why you might want to do so. 

You can build conda packages from a variety of source code projects, most notably Python. For help packaging a Python project, see the `Setuptools documentation <https://setuptools.readthedocs.io/en/latest/>`_.

.. note::
   Setuptools is a package development process library designed to facilitate packaging Python projects, and is not part of Anaconda, Inc. Conda-build uses the build system that's native to the language, so in the case of Python that's ``setuptools``.

After you build the package, you can :ref:`upload it to a channel <user-upload-package>` for others to access.
