I’m trying to run pants on arm, and I built the wh...
# general
a
I’m trying to run pants on arm, and I built the wheel myself, but the docs aren’t very helpful in saying how I get the pants script to pick that up. Also, as a side note, the newer docs have the link to “this is how you build pants”, but they don’t have the actual docs anymore 🙂
1
Okay, found the docs, and how to build from source, I’ll make a PR to fix the docs link later/tomorrow.
🙏 2
w
thank you!
h
Thank you!
a
I see that the docs are okay in 2.13, I’m 100% sure that wasn’t the case yesterday. However, I was a bit wrong, I still don’t know how to run a wheel file. I don’t want to build pants every time, or have the code there, and by hacking the pants script, I managed to get it to work, but it’s very ugly. What is actually the recommended way of running it?
h
I’m 100% sure that wasn’t the case yesterday.
Possibly looking at a different version of the docs? We haven't republished the docs in a week or so https://github.com/pantsbuild/pants/issues/12183 is the ticket for ARM. I realize that indeed I don't think we ever document how to consume the wheel produced by
./pants package src/python/pants:pants-packaged
I imagine that you want to use
--find-links
, which lets you point to a directory with the wheel file. Pip/pex will search both PyPI and the folder. For example, this is how PANTS_SHA support works https://github.com/pantsbuild/setup/blob/6a75679670652167c5f50ec1a899b97fea9f6d2b/pants#L354-L359
a
That’s what I did, I just hacked PANTS_SHA 🙂
And, yeah, I can’t find which version didn’t work. Oh, well, even better
h
If you're interested, it would probably be a good patch to the setup repo to make it easier for people to consume manually built ARM wheels. Add an environment variable similar to PANTS_SHA, like PANTS_MANUALLY_BUILT_WHEELS or something, and instructions like https://github.com/pantsbuild/setup/blob/6a75679670652167c5f50ec1a899b97fea9f6d2b/pants#L21-L24 Of course, the much much better solution is to finish adding proper ARM Linux support via https://github.com/pantsbuild/pants/issues/12183. But in the meantime
a
I’m not sure I understand the errors people get there, I was able to build a pex file on arm. Is it just a matter of getting it to build on the CI?
h
Yeah, I believe so. I believe @fresh-cat-90827 has been successfully using a locally built ARM wheel for a month or two now, right?
a
Anyway, I was gonna do a better job at that script, but then I realised there’s no guaranteed way to get the version from a wheel
f
has been successfully using a locally built ARM wheel for a month or two now, right?
that’s right! We’ve been using it in experimental mode for a few months before, and now officially internally for a month or so. Please see https://pantsbuild.slack.com/archives/C0D7TNJHL/p1663095730203999 and https://pantsbuild.slack.com/archives/C0D7TNJHL/p1663092491739899