Comments (3)
There are a few things happening here. The first is that the bazel label should be specified without the extras. In your case it would be:
deps = [requirement("apache_beam")] ## equivalent to deps = ["pypi__apache_beam"]
There is, however, an underlying bug. We pass the requirements.txt file directly into pip wheel
and then create BUILD files for all the output *.whl
. This approach is convenient as wheels have an easy to parse metadata format.
Unfortunately, we cannot determine the extras a user has requested without parsing the requirements.txt
file directly. There are a lot of edge cases when parsing this file which makes it quite difficult and I was unable to find a good library.
The end result is we install the right dependencies, but we don't specify them transitively.
A solution to this is that we do naive parsing of the file and try a best-effort approach. A more comprehensive idea is to do a custom metadata format that makes the information easy to fetch. This is what is suggested by #15.
A workaround that will get it up and running right now is to use all_requirements
:
load("@pip//:requirements.bzl", "all_requirements")
py_binary(
name = "main",
srcs = ["main.py"],
deps = all_requirements + [
# Other deps here
],
)
This lists everything specified in the requirements.txt as a dependency.
from rules_python_external.
@dillon-giacoppo has this been fixed by #28?
from rules_python_external.
Yep, just cut the release for it. Fixed in v0.1.4
from rules_python_external.
Related Issues (17)
- Add option to disable transitive dependency resolution HOT 1
- infinite module recursion when trying to add black wrapper script HOT 6
- Add py_binary rule for console_scripts
- Issue with docker package HOT 1
- Specify Python compatibility requirements HOT 3
- |pip_install| should respect toolchain HOT 2
- pip_repository fails if python3-distutils is not installed on build system HOT 1
- Problem loading twisted into autobahn HOT 6
- Including PyPl libraries with executable binaries HOT 2
- Use packages installed by `rules_python_external` HOT 3
- Depending on wheels installed from URL (i.e. pip --find-links) HOT 1
- Issue installing ruamel.yaml HOT 4
- Problem with importing azure.eventhub.extensions.checkpointstoreblob HOT 4
- setuptools 50 bug shows up inside the sandbox HOT 5
- Archive this repo? HOT 1
- 🐛 Can't support the purelib setup of Tensorflow 2.0.0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rules_python_external.