How to build a Conda package from a PyPi package
https://conda.io/docs/user-guide/tutorials/build-pkgs-skeleton.html
Step 1: Build the skeleton files from PyPi package
In this directory run conda skeleton pypi gempy
to create a folder called gempy
containing a meta.yml
file inside. If there is already a folder with the same name from a previous build, remove it before executing the command. Copy bld.bat
and build.sh
into the same folder.
Make sure all those files are located inside the folder:
-
meta.yaml
— Contains all the metadata in the recipe. Only the package name and package version sections are required—everything else is optional. -
bld.bat
— Windows commands to build the package. -
build.sh
— macOS and Linux commands to build the package.
Step 2: Building the Conda package
Run conda-build gempy
. After successfully building the package it will also provide you with the filepath to the package, which you will require in the next step.
Step 3: Uploading the package to Anaconda.org
Preparation:
- Create a free Anaconda.org account and record your new Anaconda.org username and password.
- Run
conda install anaconda-client
and enter your Anaconda.org username and password. - Log into your Anaconda.org account from your Terminal or an Anaconda Prompt with the command
anaconda login
.
After logging in:
After this you can upload the local package using anaconda upload absolute\path\to\gempy-X.XX.X-pyXX_X.tar.bz2