ldc-developers / ldc2.snap

Snap package definition for LDC, the LLVM-based D compiler
11 stars 4 forks source link

Clean up unnecessary packages from ctest-setup #67

Closed WebDrake closed 5 years ago

WebDrake commented 5 years ago

The python components in the setup are only required to run lit-tests. Since these are currently disabled, we can just remove them for now and restore them should we ever want to re-enable those test cases.

Technically we could bundle the remaining build-packages into the ldc part, but keeping the ctest-setup part in place draws a nice clean line between packages required to build LDC itself, and packages only needed by the tests.

WebDrake commented 5 years ago

This fixes a small niggle noticed when creating the Azure Pipelines setup: the pip install command is failing due to python-wheel not being installed. Fortunately that does not bring down the build by itself, but the fact that it also does not impact any of the tests inspired this cleanup.

kinke commented 5 years ago

I've (obviously) had the same issue wrt. lit; IIRC, there was another issue later on even after installing setuptools and lit via pip (lit installation still not found; my guess was that pip (as opposed to python -m pip) used another Python install than the one invoked for the tests - I don't remember whether that was macOS only though). I finally settled for

curl -OL https://bootstrap.pypa.io/get-pip.py
python get-pip.py --user
python -m pip install --user lit

which works fine for Linux and macOS.

I'd be more in favor of making the lit installation more robust than getting rid of it (and enabling the lit-tests again sometime).

WebDrake commented 5 years ago

Well, the lit tests are already disabled in the snap build, and have been for some time now. This patch doesn't change that — it just removed things that are not needed until we restore those already disabled tests.

I would also like to restore them at some point but now is not that time.

WebDrake commented 5 years ago

If it's not clear -- it's not the robustness of the lit installation that makes the lit tests flaky, there are other problems that arise from performing them in a snapcraft build context. They were disabled a long time ago because these issues couldn't be resolved.

So, right now, installing lit (robustly or otherwise) doesn't actually achieve anything inside the snap build process. It's not used. This is why I'm dropping the install for now, otherwise I would just add python-wheel to the list of build-packages.

kinke commented 5 years ago

I got that, but it's just one more hurdle for reenabling the lit-tests. Anyway, do as you see fit.

WebDrake commented 5 years ago

No, it should be trivial to add the required settings back when we want to restore lit-tests. I just don't want to have unused stuff in the package definition.

WebDrake commented 5 years ago

Thanks for looking in though, it's always good to have another point of view :-)