conda-build
conda-build copied to clipboard
"Building conda packages from scratch" tutorial is confusing as written
I wasn't sure if this is where I should put comments on the documentation—let me know if I should move it elsewhere.
Anyway the "[Editing the meta.yaml file]" section appears to contradict itself somewhat twice in the two following sentences:
Save the file in the same
click
directory asmeta.yaml
. It should match this meta.yaml file.
If I understand correctly, the file in question (emphasis in quote mine) should be meta.yaml
. In which case the following would make more sense:
Save the newly created
meta.yaml
in theclick
directory from step 1.
The second sentence refers to a file that doesn't actually match what the tutorial instructs. The linked file contains
{% set name = "click" %}
{% set version = "7.0" %}
package:
name: "{{ name|lower }}"
version: "{{ version }}"
source:
url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.tar.gz
sha256: 5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7
build:
number: 0
script: "{{ PYTHON }} -m pip install . --no-deps --ignore-installed -vv "
requirements:
host:
- pip
- python
run:
- python
test:
imports:
- click
about:
home: https://palletsprojects.com/p/click/
license: BSD
license_family: BSD
summary: Composable command line interface toolkit
vs the instructructed
package:
name: click
version: 7.1.2
source:
git_rev: 7.1.2
git_url: https://github.com/pallets/click.git
requirements:
build:
- python
- setuptools
run:
- python
test:
imports:
- click
about:
home: https://github.com/pallets/click
Actually on a final note, step 2 of the same section provides a license to input into the sample meta.yaml
, though the sample doesn't actually indicate that it should go under the about
section.
I am having the exact same problem. For those viewing this thread: the second meta.yaml
in rohanaras' comment (what they say) is much more likely to work than the first one (what they do). For the source URL, I used https://github.com/pallets/click/archive/refs/tags/8.1.3.tar.gz .
Hi @rohanaras , thank you for taking the time to file this issue (also @ekernf01 thanks for your input/comment)!
I've tagged this as an issue to get worked on; there's currently an active effort underway to improve the conda-build documentation, so this is very helpful info!
That's great! I think that will be super helpful to newcomers like me. In case more specifics will be helpful, here are three current inconsistencies between the package specification and either itself or the conda-build docs.
- Package specification requires an
info
directory;click
example mentioned above has noinfo
directory - Package specification requires python files go in a
lib
directory;click
example has nolib
directory - Package specification mentions "Only files, including symbolic links, are part of a conda package. Directories are not included." But it mentions specific directories that have to be included, and the conda-build tutorial allows users to specify source code containing sub-directories.
Another detail that would be useful to clarify: where do the results go? It would be useful to add (existing tutorial text Italic, new text bold) "When conda-build is finished, it displays the package filename and location; look for a line in the output beginning with TEST START." Otherwise it's hard to know where to look among the many paths mentioned in the output. For context, here is the complete output I get running the tutorial.
This is really great feedback, thank you so much @ekernf01 ! We'll make sure to address these details and concerns when the tutorial changes are made.
Hi there, thank you for your contribution!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.
If you would like this issue to remain open please:
- Verify that you can still reproduce the issue at hand
- Comment that the issue is still reproducible and include: - What OS and version you reproduced the issue on - What steps you followed to reproduce the issue
NOTE: If this issue was closed prematurely, please leave a comment.
Thanks!