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

Update documentation to add more details about the resolution #7107

Conversation

blorente
Copy link
Contributor

Problem

There has been some issues regarding platforms and how they resolve dependencies. #7087 #7105

Solution

I tried to expand a bit on the existing documentation to make it more clear that there is currently no way of resolving a binary for only a specific platform.

Result

Hopefully this should avoid other users being confused, and cases like #7087

Copy link
Contributor

@ity ity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, looking good!

dependencies that rely on platform-specific code.

Currently, Pants tries to resolve dependencies for every platform specified in the options
(either in the `[pyhton_setup]` field of a `pants.ini` file or via command line args such as
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/pyhton_setup/python_setup

platforms=['current','linux-x86_64']
)

Will include wheels of every 3rdparty requirement for both 64-bit Intel Linux and whatever platform
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Will/will

(see [#7105](https://github.com/pantsbuild/pants/issues/7105)).
Therefore, in addition to specifying the platforms with which your binary is intended to be
compatible in the `platforms` field of your <a pantsref="bdict_python_binary">`python_binary`</a>
target, you will need to make files for each package and platform available at build time.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add current behavior in terms of specifying how it works when platforms is added to the target itself and when thats updated in #7105, docs can be updated at the same time.

`--python-setup-platforms='["linux-x86_64"]'`). These
<a href="https://pip.pypa.io/en/stable/reference/pip_wheel/">wheels</a> will be available to
<a pantsref="bdict_python_binary">`python_binary`</a> targets, which can include them with the
`platforms` field. For instance, the following target:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found the subject here a little hard to follow. In particular, the sentence These wheels will be available to python_binary targets, which can include them with the platforms field. feels like it's saying the wheels can be included in the platforms field.

Copy link
Contributor

@ity ity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!


Tensorflow-gpu depends on some CUDA code, and therefore there _cannot_ be a wheel available for OSX.
In this case, pants will try to resolve `tensorflow-gpu` both for Linux and OSX, and will fail at resolve time,
even though the target only claims to support Linux. Discussion around this topic is being [#7105](https://github.com/pantsbuild/pants/issues/7105).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/being/being discussed in/

@blorente
Copy link
Contributor Author

blorente commented Feb 6, 2019

Probably going to close this as #7105 changes the behavior

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

Successfully merging this pull request may close these issues.

3 participants