-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Use python3's venv instead of virtualenv #2152
Conversation
Because `pytoml` is deprecated See also: https://pypi.org/project/pytoml/
Because when running local tests for `test_pythonpackages` and we have some virtual envs created with tox the function also copies the hidden tox folder causing error on our tests
So this way we will get hostpython's _ssl module build, and we will be able to use hostpython's pip without security errors.
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.
Well done, thanks!
We probably also want to ditch |
I'm not so sure yet why the macOS build is failing on Travis only with this error.
|
because it seems that hostpython's build scripts gets confused on about locating the `pyconfig.h` file **Note:** This only happens to macOS platform
This is already done at commit fdd66d3 😉
Ok, I've been looking into a solution to this problem with macOs and it's clearly related with virtualenv/venv. When trying to run p4a inside a virtualenv/venv the hostpython's build scripts gets confused on about to locating the Note: |
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.
Nice well done, I'm good for a merge
subprocess.check_output([ | ||
os.path.join(test_dir, "venv", "bin", "pip"), | ||
"install", "-U", "toml" | ||
]) |
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.
This is a bit out of scope of this PR, but I'm thinking why don't we pip install -e
then?
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.
Well I suppose that you are speaking of pip install -e .
right?
In this case...why should we? we don't need all p4a dependencies for this test, and the venv will be destroyed after is passed. Also, considering that we are speaking of one of the slowest tests of p4a, IMHO, better to try to save some time 😉
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.
makes sense 👍
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.
Awesome clean up, thanks!
This PR removes the `virtualenv` dependency from `setup.py`, as it looks redundant. To be fair, I am not fully certain why setup.py was declaring `virtualenv` as needed, I think it's a historical remnant of python 2 days. The min required python version is atm 3.6: https://github.com/kivy/buildozer/blob/9503f5fd153f3f08e9160799fc04b23faf6aabeb/setup.py#L16 `venv` is part of the stdlib since python 3.3, and "is now recommended for creating virtual environments" since 3.5: https://docs.python.org/3/library/venv.html Note that `venv` is a subset of `virtualenv`, but buildozer AFAICT is only using that subset. Similar change in p4a: kivy/python-for-android#2152
Here:
virtualenv
pytoml
totoml
, becausepytoml
is deprecatedNotes: