Uploading conda packages
This example shows how to build and upload a conda package to Anaconda.org usingconda build.
- Open Anaconda Prompt (Terminal on macOS/Linux).
-
If necessary, install the
anaconda-clientandconda-buildpackages by running the following command: -
Choose the repository for which you would like to build the package. In this example, we use a small public conda test package:
There are two required files in the example package: meta.yaml and build.sh. macOS and Linux systems are Unix-like systems. Packages built for Unix-like systems require a
build.shfile, packages built for Windows require abld.batfile, and packages built for both Windows and Unix-like systems require both abuild.shfile and abld.batfile. All packages require ameta.yamlfile. -
To build the package, turn off automatic client uploading and then run the
conda buildcommand:All packages built using theconda buildcommand are placed in a subdirectory of the Anacondaconda-blddirectory. -
Upload the test package to Anaconda.org by running the
anaconda uploadcommand:Replace </PATH/TO/PACKAGE_NAME> with the correct file path and package name.
Packages can be uploaded with.tar.bz2 or.condacompression formats.
.conda format, see Using the .conda compression format.
For more information on conda’s overall build framework, see Building conda packages in the official conda docs.
Uploading standard Python packages
You can test standard Python package uploading with a small public example package saved in the anaconda-client repository. Use Anaconda Prompt (Terminal on macOS/Linux) to perform the following steps:-
Clone the repository:
-
Create your standard Python package using the
setup.pyscript: -
Upload your newly built package tarball file:
Your package is now available at
http://anaconda.org/<USERNAME>/<PACKAGE>, where<USERNAME>is your username and<PACKAGE>is the package name.
Finding help for uploading packages
You can obtain a complete list of upload options, including:- Package
- Availability to other users
- Metadata