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.
|
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: |
AndreMiras
left a comment
There was a problem hiding this comment.
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.
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.
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 😉
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:
virtualenvpytomltotoml, becausepytomlis deprecatedNotes: