Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The tutorial "Building conda packages with conda skeleton" is broken - conda skeleton pypi click fails #5547

Open
2 tasks done
noamraph opened this issue Nov 19, 2024 · 0 comments
Labels
type::documentation request for improved documentation

Comments

@noamraph
Copy link

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

Following the tutorial results in an error. I repeated this in a docker container, and the error is reproduced.

This is related to #5258 (comment).

Indeed, the tutorial says "We recommend Grayskull, a newer alternative to conda-skeleton", but the github page is not a tutorial, so a newbie like myself continues with the tutorial. Perhaps if it's hard to fix, just change the note to say something like "Note: this tutorial currently doesn't work. We recommend using Grayskull. If you with to fix this issue, please see this MR."

To reproduce, run:

PREFIX=~/conda
mkdir -p $PREFIX
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O $PREFIX/miniconda.sh
bash $PREFIX/miniconda.sh -b -u -p $PREFIX
rm $PREFIX/miniconda.sh

source ~/conda/etc/profile.d/conda.sh

conda create -y --name testenv conda-build git
conda activate testenv
conda skeleton pypi click

Result:

Traceback (most recent call last):
  File "/tmp/tmphld75h_6conda_skeleton_click-8.1.7.tar.gz/click-8.1.7/setup.py", line 3, in <module>
    setup(
  File "/home/docker/conda/envs/testenv/conda-bld/skeleton_1732034413977/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.12/site-packages/setuptools/__init__.py", line 117, in setup
    return distutils.core.setup(**attrs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docker/conda/envs/testenv/conda-bld/skeleton_1732034413977/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 218, in setup
    fn.write(yaml.safe_dump(data, encoding=None))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/docker/conda/envs/testenv/conda-bld/skeleton_1732034413977/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.12/site-packages/ruamel/yaml/main.py", line 1260, in safe_dump
    error_deprecation('safe_dump', 'dump', arg="typ='safe', pure=True")
  File "/home/docker/conda/envs/testenv/conda-bld/skeleton_1732034413977/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.12/site-packages/ruamel/yaml/main.py", line 1039, in error_deprecation
    raise AttributeError(s, name=None)
AttributeError: 
"safe_dump()" has been removed, use

  yaml = YAML(typ='safe', pure=True)
  yaml.dump(...)

instead of file "/home/docker/conda/envs/testenv/conda-bld/skeleton_1732034413977/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_pla/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 218

        fn.write(yaml.safe_dump(data, encoding=None))

Additional Context

No response

@noamraph noamraph added the type::documentation request for improved documentation label Nov 19, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in 🧭 Planning Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type::documentation request for improved documentation
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant