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

Improve install docs #1760

Merged
merged 5 commits into from
Nov 7, 2024
Merged

Improve install docs #1760

merged 5 commits into from
Nov 7, 2024

Conversation

MrTango
Copy link
Contributor

@MrTango MrTango commented Nov 6, 2024

This corrects the creation of Python venv. We shoud never mix the venv with other configuration like the buildout configuration or others. This can lead to losing data or configuration when updating the venv later.

so instead of

python3 -m venv .

we should use

python3 -m venv venv

or similar to create a venv.
Then either activate the venv or use it like this

./venv/bin/pip install Plone

The buildout bootstrap command is useful to avoid the need to always prefix the buildout run with the venv path later.
It will create the bin/buildout script and only need to run once.

docs/admin-guide/index.md Outdated Show resolved Hide resolved
docs/admin-guide/install-buildout.md Show resolved Hide resolved
docs/admin-guide/install-buildout.md Outdated Show resolved Hide resolved
docs/admin-guide/install-buildout.md Outdated Show resolved Hide resolved
@MrTango MrTango requested a review from 1letter November 6, 2024 16:56
davisagli
davisagli previously approved these changes Nov 6, 2024
Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

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

Basically LGTM now.

@stevepiercy
Copy link
Contributor

This corrects the creation of Python venv. We shoud never mix the venv with other configuration like the buildout configuration or others. This can lead to losing data or configuration when updating the venv later.

so instead of

python3 -m venv .

we should use

python3 -m venv venv

or similar to create a venv. Then either activate the venv or use it like this

./venv/bin/pip install Plone

The buildout bootstrap command is useful to avoid the need to always prefix the buildout run with the venv path later. It will create the bin/buildout script and only need to run once.

I just want to say that I really appreciate this explanation. I have long felt that creating Python virtual environments at the project root was "not right", both in Plone documentation and our tools. Coming from Pyramid, I always used env/bin/thingie but never activated it. In their docs, they used an additional step as demonstrated in Set an environment variable and explained in Why use $VENV/bin/pip instead of source bin/activate, then pip?. In practice, I felt that last bit was too much, because anything that requires me to hold down the SHIFT key slows down my typing.

Copy link
Contributor

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

Minor tweaks to grammar, sprinkle some MyST syntax and reference links, and reword a few things.

docs/admin-guide/index.md Outdated Show resolved Hide resolved
docs/admin-guide/install-buildout.md Outdated Show resolved Hide resolved
docs/admin-guide/install-buildout.md Outdated Show resolved Hide resolved
docs/admin-guide/install-pip.md Outdated Show resolved Hide resolved
docs/admin-guide/run-plone.md Outdated Show resolved Hide resolved
Copy link
Contributor

@stevepiercy stevepiercy left a comment

Choose a reason for hiding this comment

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

Thanks @MrTango and @davisagli! I'll merge this as soon as it's green.

@stevepiercy stevepiercy merged commit cdd32ba into 6.0 Nov 7, 2024
3 checks passed
@stevepiercy stevepiercy deleted the improve-install-docs branch November 7, 2024 03:54
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