Skip to content

jrhawley/python-conda-package-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-conda-package-template

Template for building Python packages that can be easily bundled as Anaconda packages, too

Usage

To use this package, when creating the new repository for your project, select this project as the template. Then, replace all occurrences of "PACKAGENAME", "URL", "GIT_URL", and other filler values in setup.py and meta.yaml. Set version numbers as needed in PACKAGENAME/__init__.py and meta.yaml, and add your code where applicable.

Building your package

PyPI

python setup.py install

Anaconda

conda build --python {PYTHON_VERSION} meta.yaml

Uploading your package

PyPI

# ensure `twine` is install
pip install twine
# package source code
python setup.py sdist
twine upload dist/*

Anaconda

# ensure conda-build and anaconda-client are installed
conda install conda-build anaconda-client
# build package for a specific python version
conda build --python {PYTHON_VERSION} meta.yaml
# upload to Anaconda Cloud
cd $HOME/miniconda3/conda-bld/
anaconda upload */PACKAGENAME-VERSION_*.tar.bz2

Installing your package

After uploading to your repository of interest, you should be able to download and install your package according to the tools for that repository.

PyPI

pip install PACKAGENAME

Anaconda

conda install PACKAGENAME

About

Template for building Python packages that can be easily bundled as Anaconda packages, too

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages