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

[READY] Use LIBPL variable to find Python library #519

Merged

Conversation

micbou
Copy link
Collaborator

@micbou micbou commented Jun 8, 2016

Currently, the build.py script may found a debug version of the Python library instead of the release version because it searches through all the subdirectories of the standard library path. See issue #518 for details. The solution suggested by @jmenashe (using LIBPL variable) works fine for system Python but not for pyenv because there is no dynamic library in the directory returned by the LIBPL variable.

Taking this into account, we now search the Python library in a list of directories. On Windows, this list only contains one directory; the same one as before. On other platforms, it contains two directories:

  • the one returned by the LIBPL variable (for system Python);
  • the parent directory of the standard Python library modules (for pyenv).

Closes #518.


This change is Reviewable

Search Python library in two directories on Unix:
 - the one returned by the LIBPL variable (for Python system);
 - the parent directory of the standard Python library modules (for
   pyenv).
Do not search Python library through subdirectories as it can lead
to find the wrong Python library (the debug version for instance).
@coveralls
Copy link

Coverage Status

Coverage remained the same at 85.027% when pulling 1254400 on micbou:find-python-libraries-multiple-folders into bdab3d6 on Valloric:master.

@Valloric
Copy link
Member

Valloric commented Jun 8, 2016

Will our python deployment issues never end...

:lgtm:

Previously, coveralls wrote…

Coverage Status

Coverage remained the same at 85.027% when pulling 1254400 on micbou:find-python-libraries-multiple-folders into bdab3d6 on Valloric:master.


Review status: 0 of 1 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@vheon
Copy link
Contributor

vheon commented Jun 8, 2016

Will our python deployment issues never end...

😭

:lgtm: @homu r=Valloric


Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@homu
Copy link
Contributor

homu commented Jun 8, 2016

📌 Commit 1254400 has been approved by Valloric

@homu
Copy link
Contributor

homu commented Jun 8, 2016

⚡ Test exempted - status

@homu homu merged commit 1254400 into ycm-core:master Jun 8, 2016
homu added a commit that referenced this pull request Jun 8, 2016
…=Valloric

[READY] Use LIBPL variable to find Python library

Currently, the `build.py` script may found a debug version of the Python library instead of the release version because it searches through all the subdirectories of the standard library path. See issue #518 for details. The solution suggested by @jmenashe (using `LIBPL` variable) works fine for system Python but not for `pyenv` because there is no dynamic library in the directory returned by the `LIBPL` variable.

Taking this into account, we now search the Python library in a list of directories. On Windows, this list only contains one directory; the same one as before. On other platforms, it contains two directories:
 - the one returned by the `LIBPL` variable (for system Python);
 - the parent directory of the standard Python library modules (for pyenv).

Closes #518.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/519)
<!-- Reviewable:end -->
@micbou micbou deleted the find-python-libraries-multiple-folders branch June 28, 2016 12:57
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.

5 participants