What is `sha256` and what should I put as it's value in a `meta.yaml` file of an anaconda package

840 views Asked by At

In the meta.yaml file of an anaconda package, one of the requirements is the source category, which has sha256 as a parameter. What is sha256 and what should I put as it's value. I was originally going to use git, but conda forge uses tarball or zip.

2

There are 2 answers

4
Blake G On BEST ANSWER

sha256 is a checksum. Checksums are used to verify the integrity of a file — to ensure it has not been altered and that it is actually the file you intend to run.

Checksums are software security mechanisms.

This is a broader topic than Conda, but as discussed below, the command to run in your terminal should look something like:

curl -sL https://github.com/username/reponame/archive/vX.X.X.tar.gz | openssl sha256

1
Quantalabs On

As the conda-forge documentation states, which Blake mentioned earlier, you'd use the command curl -sL https://github.com/username/reponame/archive/vX.X.X.tar.gz | openssl sha256 or get it from PyPI by going to the package description.