https://pantsbuild.org/ logo
a

ancient-france-42909

09/27/2022, 3:08 PM
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

witty-crayon-22786

09/27/2022, 4:04 PM
thank you!
h

hundreds-father-404

09/27/2022, 5:40 PM
Thank you!
a

ancient-france-42909

09/28/2022, 12:56 PM
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

hundreds-father-404

09/28/2022, 2:43 PM
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

ancient-france-42909

09/28/2022, 2:44 PM
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

hundreds-father-404

09/28/2022, 2:47 PM
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

ancient-france-42909

09/28/2022, 3:11 PM
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

hundreds-father-404

09/28/2022, 3:12 PM
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

ancient-france-42909

09/28/2022, 3:19 PM
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

fresh-cat-90827

09/28/2022, 3:21 PM
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
5 Views