-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Make install.py work on Arch Linux #1651
Comments
What we could do is remove the following check in the
and make the |
Maybe use |
The issue is that not all distributions ship with a python2 executable or symlink. |
Are there any drawback using this approach? Isn't possible to have a system like:
?? Would that cause some problem? |
I don't think so because, regardless of the python version used to run those scripts, cmake will pick the right one (python2) to build ycmd. Even the tests will run fine because we call the |
Then we should be careful in the windows branch because if I'm not mistaken here we would compile a different architecture from the one needed. |
In this case, the build will fail because cmake will not find the python2-32bit library. If python2-32bit is also installed then it will work with Vim 32bit and fail with Vim 64bit. We could add an option to specify the architecture with the default being the current behavior. |
If just removing the python2 check in |
We can do this by using a tool like futurize. Each time we update the scripts, we run |
@micbou That sounds nice; I'm concerned about us forgetting to do that though. People sending random PRs for |
We could think to make that a test in travis: If in a PR the |
@vheon That sounds like a solid idea! I have a slight concern that it assumes that futurize is infallible, but it's much better than not having a test. |
I installed the python2 package and ran: python2 ./install.py --clang-completer It did work here. It may not be the perfect solution, but did the job. |
@rafaelnp Yeah that's obviously going to work, but the point is to make that not necessary. :) |
[Windows support] Add Windows options to scripts Add the following options to `build.py` and `run_tests.py` scripts: - `--msvc`: pick the MSVC version between 11, 12 (default), and 14 (respectively 2012, 2013, or 2015); - `--arch`: force 32 or 64 bits architecture. Default is the python interpreter architecture used to start the script. Can be useful if both python 32 and 64 bits are installed. See discussion in issue ycm-core/YouCompleteMe#1651.
I found a fix for this here: http://stackoverflow.com/a/26056481/2606953 See PR #1702 |
I fell into this trap too on ArchLinux |
@artemjackson we are in the process of porting YCM/ycmd to be python3 compatible, then I believe that this issue will be closed. |
Fixed by PR #2016. |
It currently doesn't (see comment) because it uses
!#/usr/bin/env python
as the shebang, which on Arch uses python3. The oldinstall.sh
script worked around it like this:It might be possible to use this logic inside the
install.py
script (so thatbuild.py
is correctly invoked with a Python 2 process) while making theinstall.py
script itself run on both python2 and python3.@micbou Thoughts?
The text was updated successfully, but these errors were encountered: