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

Please suggest that noarch: python packages be built as wheels #519

Closed
microe opened this issue Feb 1, 2018 · 1 comment
Closed

Please suggest that noarch: python packages be built as wheels #519

microe opened this issue Feb 1, 2018 · 1 comment

Comments

@microe
Copy link

microe commented Feb 1, 2018

The noarch: python directive in the build section is handy, but since the build step does not differentiate between what kind of distribution package is built, conda packages built with egg using this directive can have issues. For example, egg does leave behind python version information in the package:

$tar tf dask-core-0.16.1-py_0.tar.bz2 | grep 3\.6
site-packages/dask-0.16.1-py3.6.egg-info/not-zip-safe
site-packages/dask-0.16.1-py3.6.egg-info/dependency_links.txt
site-packages/dask-0.16.1-py3.6.egg-info/top_level.txt
site-packages/dask-0.16.1-py3.6.egg-info/requires.txt
site-packages/dask-0.16.1-py3.6.egg-info/PKG-INFO
site-packages/dask-0.16.1-py3.6.egg-info/SOURCES.txt

If another package adds this package as a dependency and conda-build is not being called in python 3.6 then when 'python setup.py install' is called, easy_install will try to bring in the dependency from pypi and cause conda-build to fail. If a wheel is used instead, the resulting conda package is without any python version information:

$tar tf dask-core-0.16.1-py_1.tar.bz2 | grep 3\.6
$

Note that the egg-info issue is alluded to just a few paragraphs down in the documentation:
https://conda-forge.org/docs/meta.html#single-version-externally-managed

The goal is to prevent setuptools from creating an egg-info directory because it does not interact well with conda.

I propose that the docs suggest that when noarch: python is used to either use pip or setuptools with wheel

A pip example:

build:
  number: 1
  script: pip install --no-deps --ignore-installed .
  noarch: python

A wheel/setuptools example:

build:
  number: 1
  script: python setup.py bdist_wheel --universal;python -m wheel install --force dist/*.whl
  noarch: python
@ocefpaf
Copy link
Member

ocefpaf commented Feb 1, 2018

@microe we have a few issues opened for this and two PRs. See conda-forge/staged-recipes#5032, conda-forge/staged-recipes#528, and #518

Closing this to reduce the noise but please do comment on what you think it is relevant on the other issues/PRs I listed above.

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

No branches or pull requests

2 participants