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

pip_install should accept global install options #177

Closed
mopuru-murali opened this issue Apr 16, 2019 · 2 comments
Closed

pip_install should accept global install options #177

mopuru-murali opened this issue Apr 16, 2019 · 2 comments
Labels
Can Close? Will close in 30 days if there is no new activity

Comments

@mopuru-murali
Copy link

When bazel builds a py3_image with pyyaml as one of its requirements it always fails with

File "/app/microservices/machineforge/manage.binary.runfiles/pypi__PyYAML_3_12/yaml/init.py", line 2, in
from error import *
ImportError: No module named 'error'

even though you specify python_version as attribute to it.

The reason is - bazel builds _yaml.so file (with pip install) which does not work with python3 based container py3_image (io_bazel_rules_docker). There are few other python packages like pyyaml which installs C-version of it (with .so files) by default if its dependent C-libs/devels are available in the host OS.

FYR, https://github.com/yaml/pyyaml

On the other side - building py3_image from python3 based host is also not possible because many python packages are NOT python3 compliant. It will fail with similar errors like

File "", line 544, in spec_from_file_location
File "/root/.cache/bazel/_bazel_root/2db3a13de410fd07a0f02c32e96a85ac/external/puller/file/downloaded/httplib2/init.py", line 988
raise socket.error, msg
^
SyntaxError: invalid syntax

so pip_install or pip_import should accept flags or options to skip building and installing C-bindings so that its possible to

pip install pyyaml --global-option=--without-libyaml

More details about the bug:
pypa/pip#2677

@mopuru-murali mopuru-murali changed the title pip_install should accept gloabl install options pip_install should accept global install options Apr 16, 2019
@github-actions
Copy link

This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days.
Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_python!

@github-actions github-actions bot added the Can Close? Will close in 30 days if there is no new activity label Apr 14, 2021
@github-actions
Copy link

This issue was automatically closed because it went 30 days without a reply since it was labeled "Can Close?"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Can Close? Will close in 30 days if there is no new activity
Projects
None yet
Development

No branches or pull requests

1 participant