Skip to content

[lldb] Add Python requirements.txt for test suite #94220

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

Merged
merged 4 commits into from
Jun 3, 2024

Conversation

DavidSpickett
Copy link
Collaborator

@DavidSpickett DavidSpickett commented Jun 3, 2024

This means that CI won't have to hardcode these.

This means that CI won't have to hardcode these.

We can't do conditional installs here by platform so pexpect
is listed normally. If it's installed on Windows that's fine,
we just won't use it.
@llvmbot
Copy link
Member

llvmbot commented Jun 3, 2024

@llvm/pr-subscribers-lldb

Author: David Spickett (DavidSpickett)

Changes

This means that CI won't have to hardcode these.

We can't do conditional installs here by platform so pexpect is listed normally. If it's installed on Windows that's fine, we just won't use it.


Full diff: https://github.com/llvm/llvm-project/pull/94220.diff

1 Files Affected:

  • (added) lldb/requirements.txt (+7)
diff --git a/lldb/requirements.txt b/lldb/requirements.txt
new file mode 100644
index 0000000000000..645004bd3f57c
--- /dev/null
+++ b/lldb/requirements.txt
@@ -0,0 +1,7 @@
+# These Python packages are required to be able to run the LLDB test suite.
+
+psutil
+# pexpect is only required on Linux, can be installed on Windows but pexpect
+# tests are automatically skipped there because they are known not to work
+# (llvm.org/pr22274).
+pexpect

@DavidSpickett
Copy link
Collaborator Author

I've not been able to find what versioning scheme these 2 packages use, so I'm not sure what versions to put here if any.

Currently Linaro has:
psutil==5.9.4 on Windows
psutil == 5.9.8 on Linux
pexpect==4.9.0 on Linux

I don't think it needs to be ==, but maybe pinning to a version that won't break API? If the projects have such a thing of course.

This is initially for Github CI, so we could just use the Linux versions.

@DavidSpickett
Copy link
Collaborator Author

Example from MLIR:

numpy>=1.19.5, <=1.26
pybind11>=2.9.0, <=2.10.3
PyYAML>=5.3.1, <=6.0.1

@Endilll
Copy link
Contributor

Endilll commented Jun 3, 2024

I've not been able to find what versioning scheme these 2 packages use, so I'm not sure what versions to put here if any.

Currently Linaro has: psutil==5.9.4 on Windows psutil == 5.9.8 on Linux pexpect==4.9.0 on Linux

I don't think it needs to be ==, but maybe pinning to a version that won't break API? If the projects have such a thing of course.

This is initially for Github CI, so we could just use the Linux versions.

I think you can list them as minimal required versions for now.

@DavidSpickett
Copy link
Collaborator Author

Added minimum versions.

@DavidSpickett
Copy link
Collaborator Author

Anecdotal evidence - last time I updated these I just installed the most recent and nothing broke. So we're probably fine with minimums, especially as this will be checked regularly by the CI job.

@DavidSpickett
Copy link
Collaborator Author

I was wrong, you can do conditionals - https://peps.python.org/pep-0508/. pexpect now not installed on Windows.

@DavidSpickett DavidSpickett merged commit 0232e2b into llvm:main Jun 3, 2024
5 checks passed
@DavidSpickett DavidSpickett deleted the requirements branch June 3, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants