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

Adapt setup instructions for externally managed Python versions #271

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ivan-Velickovic
Copy link
Contributor

@Ivan-Velickovic Ivan-Velickovic commented Jan 21, 2025

Homebrew and newer versions of Debian and Ubuntu do not allow you to simply pip install anymore. Since these Python dependencies are available via apt or brew we have to setup a virtual environment.

I chose to leave the pip install instructions since there are still distros and current versions of Ubuntu that are fine with it. Also the default macOS Python via xcode command line utils is fine with pip install. Not sure if it'll just lead to more confusion though.

I'm having issues with building the docs site so whoever reviews should also check that the rendered pages seems sane.

@Ivan-Velickovic Ivan-Velickovic requested a review from lsf37 January 21, 2025 08:26
Copy link
Contributor

@Indanz Indanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't build the webpage yet, I'll do that later, have to go soon.

```sh
python3 -m venv venv
./venv/bin/pip install camkes-deps
source ./venv/bin/activate
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that a one time operation, or do you need to do this every time after logging in?

If you need to do that every time to activate a Python environment I'd separate it and say that explicitly. And assuming venv is the name of the environment, wouldn't it be clearer to have "seL4" as part of its name?

@lsf37
Copy link
Member

lsf37 commented Jan 21, 2025

I'm not sure I'm a fan of this whole venv thing, but I guess there is not really a better way.

I still do have many questions, most of these because I don't really understand how to use these environments more globally.

Do we really need the instructions 3 times? Can we have one venv that works for all of these or are we really installing the dependencies 3 times?

Which directory do we assume people are in when they are running these commands? Do you have to activate the environment each time you want to do any development? Is it local to each repo?

How bad would it be to recommend --break-system-packages?

@Ivan-Velickovic
Copy link
Contributor Author

Do we really need the instructions 3 times? Can we have one venv that works for all of these or are we really installing the dependencies 3 times?

Yes sure, I guess I did it like this because what you do depends on the context (e.g some people only using seL4 would follow the one for sel4-deps, those using CAmkES follow the one doing camkes-deps.

I also don't really like the venv thing.

I didn't go with --break-system-packages because sel4-deps uses things like PyYAML and lxml which people might already have installed versions of.

I guess we could let the user decide? Doing pip3 install --break-system-packages would be the same behaviour as current Python environments that just let you pip3 install to my knowledge so adding that might not be so bad.

None of the solutions seem ideal.

@Ivan-Velickovic
Copy link
Contributor Author

(whoops, didn't meant to close).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants