Skip to content

[updates] specify python version #2933

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

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

Conversation

partizipation
Copy link
Contributor

@partizipation partizipation commented Feb 13, 2025

If a developer is using pyenv, a new .python-version file will force them onto the latest supported version.

If not, they can now see in the README the supported version. Additionally, if they are on a non-supported version, when running make install an warning will be printed to the console.

@m4ra you mentioned make clean doesn't remove the venv directory when using pyenv, but it seems to be. Maybe this is no longer happening. If there are other issues with pyenv we could smooth out, maybe now would be a good time though, so let me know.

edit: also added a note in README that macOS users will need to install libmagic

@hom3mad3
Copy link
Contributor

@arc64 this about the python version, btw

Copy link
Contributor

@hom3mad3 hom3mad3 left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@m4ra m4ra left a comment

Choose a reason for hiding this comment

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

I would argue for writing a project.toml in the adhocracy-4 library and define the python version there, instead of constraining how developers should setup their virtualenv. Having a project.toml is also the standard fashion of publishing packages.

@@ -0,0 +1 @@
3.11.6
Copy link
Contributor

@m4ra m4ra Feb 17, 2025

Choose a reason for hiding this comment

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

Personally I use pyenv for versions, and pyenv for virtualenv, so this file points to the name of my pyenv's virtualenv, e.g named root which is located in .pyenv/versions/(venv) and that's why cannot be deleted with the make clean command. Hence, I don't think the solution here is inclusive enough approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Could you say a little more? The make install command uses python3 -m venv $(VIRTUAL_ENV); so our clean script deletes this venv. What additional behavior would you expect?

@hom3mad3
Copy link
Contributor

I would argue for writing a project.toml in the adhocracy-4 library and define the python version there, instead of constraining how developers should setup their virtualenv. Having a project.toml is also the standard fashion of publishing packages.

you bring some good points and i haven't really tried it myself. .python-version defaults my version in case i forget, so that is already quite helpful.

@hom3mad3
Copy link
Contributor

with a docker build this should also be fixed tbh 🙈

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