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

--skip-python when a conda forge Python dependency is not in PyPI #65

Open
eriknw opened this issue May 27, 2020 · 1 comment
Open

--skip-python when a conda forge Python dependency is not in PyPI #65

eriknw opened this issue May 27, 2020 · 1 comment

Comments

@eriknw
Copy link

eriknw commented May 27, 2020

First off: hooray for trying to create an "easy button" for making wheels for those of us using conda forge!

Using conda-press version 0.0.6 on Python 3.7.

So. I have a new Python package on conda forge that has C dependencies, and I want an easy way to make wheels. Enter: conda press. Things almost worked perfectly the first try, but, alas, almost did not create a usable wheel.

Specifics. I want to build wheels for grblas. When I try to make a fat wheel without Python dependencies,

conda press --subdir osx-64 --skip-python --fatten --dont-strip-symbols grblas=1.2.6=py37h9bfed18_0

it includes python_abi as a dependency in METADATA. python_abi (which I think is only metadata) is on conda-forge, but not on PyPI. Hence, when I try to pip install the wheel I created, pip complains that it can't find python_abi.

Next, I created skinny wheels of everything, and then I tried to merge the original fat wheel with the wheel of python_abi

conda press --merge \
../press-fat/grblas-1.2.6-0_py37h9bfed18-cp37-cp37m-macosx_10_9_x86_64.whl \
../press-skinny/python_abi-3.7-1_1_cp37m-cp37-cp37m-macosx_10_9_x86_64.whl \
--output grblas-1.2.6-0_py37h9bfed18-cp37-cp37m-macosx_10_9_x86_64.whl

This failed:

Traceback (most recent call last):
  File "/Users/ewelch/miniconda3/envs/build-grblas/bin/conda-press", line 4, in <module>
    main()
  File "/Users/ewelch/miniconda3/envs/build-grblas/lib/python3.7/site-packages/conda_press/main.xsh", line 74, in main
    merge(wheels, output=output)
  File "/Users/ewelch/miniconda3/envs/build-grblas/lib/python3.7/site-packages/conda_press/wheel.xsh", line 779, in merge
    whl.write()
  File "/Users/ewelch/miniconda3/envs/build-grblas/lib/python3.7/site-packages/conda_press/wheel.xsh", line 373, in write
    skip_python=skip_python,
  File "/Users/ewelch/miniconda3/envs/build-grblas/lib/python3.7/site-packages/conda_press/wheel.xsh", line 393, in write_metadata
    return meth(**kwargs)
  File "/Users/ewelch/miniconda3/envs/build-grblas/lib/python3.7/site-packages/conda_press/wheel.xsh", line 400, in write_metadata_from_wheel
    if w is not None and getattr(w, "_top", False)][0]
IndexError: list index out of range

Next I tried to merge the skinny wheels together, selecting only what I need, so something like this

conda press --merge \
../libcxx-10.0.0-2_h1af66ff-py2.py3-none-macosx_10_9_x86_64.whl \
../llvm_openmp-10.0.0-0_h28b9765-py2.py3-none-macosx_10_9_x86_64.whl \
../graphblas-3.2.2-1_h4a8c4bd-py2.py3-none-macosx_10_9_x86_64.whl \
../grblas-1.2.6-0_py38h64e0658-cp38-cp38m-macosx_10_9_x86_64.whl \
../python_abi-3.8-1_1_cp38-cp38-cp38m-macosx_10_9_x86_64.whl \
--output grblas-1.2.6-0_py38h64e0658-cp38-cp38m-macosx_10_9_x86_64.whl

but this also fails.

Finally, I tried this:

conda press --subdir osx-64 --skip-python --fatten --dont-strip-symbols grblas=1.2.6=py37h9bfed18_0 --exclude-deps python_abi

which appears to work! It didn't build python_abi, but neither was it included as a dependency in METADATA. I suspect it's fine to ignore python_abi here. Am I going about things correctly here? If so, feel free to close!

@scopatz
Copy link
Contributor

scopatz commented May 31, 2020

Thanks for reporting! PRs very welcome for fixing these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants