Skip to content
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

also catch OSError when detecting conda_exe for cross-platform builds #916

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

bollwyvl
Copy link

Description

This PR handles some observations when --platform and --conda-exe are specified.

  • before the utils.py patch:
OSError: [Errno 8] Exec format error: '~/build/standalone/linux-aarch64/standalone_conda/conda.exe'
  • without the main.py tpach:
  File "~/build/lib/python3.12/site-packages/constructor/shar.py", line 74, in get_header
    variables['enable_shortcuts'] = str(info['_enable_shortcuts']).lower()
                                        ~~~~^^^^^^^^^^^^^^^^^^^^^
  File "~/build/lib/python3.12/site-packages/ruamel/yaml/comments.py", line 853, in __getitem__
    return ordereddict.__getitem__(self, key)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: '_enable_shortcuts'

Presently, building with constructor 3.11 on python 3.12.1 on linux-64:

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
    • are there tests of cross-platform building?

  • Add / update outdated documentation?
    • is there documentation about cross-platform building?

@conda-bot
Copy link
Contributor

conda-bot commented Dec 20, 2024

We require contributors to sign our Contributor License Agreement and we don't have one on file for @bollwyvl.

In order for us to review and merge your code, please e-sign the Contributor License Agreement PDF. We then need to manually verify your signature, merge the PR (conda/infrastructure#1084), and ping the bot to refresh the PR.

@jaimergp
Copy link
Contributor

are there tests of cross-platform building?

I don't think so, but it would be trivial to write some. Take any of the examples and add --platform. In osx-arm64 we can even run the installer with Rosetta to have a proper integration test.

@jaimergp
Copy link
Contributor

We'll need the news file but this looks very good to me, thanks.

@bollwyvl
Copy link
Author

bollwyvl commented Dec 20, 2024 via email

@bollwyvl
Copy link
Author

On account of me not going to sign anything that puts me in any kind of legal relationship with Anaconda, Inc, let's consider this a "complex bug report" rather than "a material contribution", whereby I release this code to the public domain. I do hope someone take this contribution and generates a derived work without any obligation to credit me or this work.

constructor/main.py Outdated Show resolved Hide resolved
@marcoesters
Copy link
Contributor

On account of me not going to sign anything that puts me in any kind of legal relationship with Anaconda, Inc, let's consider this a "complex bug report" rather than "a material contribution", whereby I release this code to the public domain. I do hope someone take this contribution and generates a derived work without any obligation to credit me or this work.

I was about to say that the CLA is with Conda, not Anaconda, but the CLA surprisingly mentions Anaconda a lot.

@jaimergp, I think this needs to be looked at. Would conda/infastructure be the right place?

@marcoesters
Copy link
Contributor

Looks like this is a work in progress already: conda/cla#1

Co-authored-by: Marco Esters <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging this pull request may close these issues.

4 participants