-
Notifications
You must be signed in to change notification settings - Fork 188
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
python/metapackages/setup.py: improve package conflict detection #2399
base: main
Are you sure you want to change the base?
Conversation
search_pattern = os.path.join(directory, f"{package_name}-*.dist-info") | ||
matches = glob.glob(search_pattern) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we can just search a file in a directory. Or am I misunderstanding something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't find a great file to specifically look for that all installed packages would have. The consistent one was ${package_name}-${version}.dist-info
which contains the metadata for the package.
Command Bot: Processing... |
Command Bot: Processing... |
FYI - I added a short one line commit to fix the cuda-quantum package README. |
Command Bot: Processing... |
Command Bot: Processing... |
Command Bot: Processing... |
1 similar comment
Command Bot: Processing... |
.github/workflows/python_metapackages.yml: enable previous disabled test Signed-off-by: mitchdz <[email protected]>
Because the test runners do not have a GPU, the default bdist choice of cuda-quantum-cu12 is always chosen, which breaks some of the tests. Credit: Bettina Heim Signed-off-by: mitchdz <[email protected]>
The README had an echo with grave symbols which spawned a subshell to execute the command which returned nothing - thus creating an empty string. This resulted in the README saying: "...new versions are published under the name instead..." Now it will say: "...new versions are published under the name `cudaq` instead..." Signed-off-by: mitchdz <[email protected]>
At the end of the test, install_default is compared to test_conflicting, but installed_default is not printed anywhere in the logs. Signed-off-by: mitchdz <[email protected]>
Modify the logic to only take the first occurence of the Identified best package. This is because setup.py prints out the package multiple times like so: [cudaq] Identified cuda-quantum-cu12 as the best package. [cudaq] Identified cuda-quantum-cu12 as the best package. [cudaq] Identified cuda-quantum-cu12 as the best package. Which will make installed_default="cuda-quantum-cu12 cuda-quantum-cu12 cuda-quantum-cu12" which fails the logic test for the CI. This Identified package should be the same for all prints, so the first occurence is taken. Signed-off-by: mitchdz <[email protected]>
Command Bot: Processing... |
Command Bot: Processing... |
Description
pip install
This code specifically checks the following packages:
cuda-quantum
,cuda-quantum-cu11
,cuda-quantum-cu12
during the package installation phase ofpip install
.For example, with
cuda-quantum-cu11
installed andcuda12
libraries installed, attempting topip install cudaq
will give: