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

Windows: Python 2.7 library not found when installed in virtualenv #119

Closed
msmolens opened this issue Aug 9, 2016 · 5 comments
Closed
Labels
Category: Tests Testing and related things Type: Bug Something's not working correctly.

Comments

@msmolens
Copy link
Member

msmolens commented Aug 9, 2016

On Windows/Python2.7 with scikit-build installed in a virtualenv, cmaker.get_python_library() doesn't find python27.lib.

@msmolens msmolens added the Type: Bug Something's not working correctly. label Aug 9, 2016
jcfr added a commit that referenced this issue Sep 10, 2016
Since pytest-plugins maintainers have not yet create a new release
including the latest fixes for windows and python 3, the pytest
plugins related to "pytest-virtualenv" are installed from source.

For more details: https://gist.github.com/jcfr/19a360f541b5caae5f31ac31c83e4f65

See #119
jcfr added a commit that referenced this issue Sep 10, 2016
Since pytest-plugins maintainers have not yet create a new release
including the latest fixes for windows and python 3, the pytest
plugins related to "pytest-virtualenv" are installed from source.

For more details: https://gist.github.com/jcfr/19a360f541b5caae5f31ac31c83e4f65

See #119
jcfr added a commit that referenced this issue Sep 10, 2016
Since pytest-plugins maintainers have not yet create a new release
including the latest fixes for windows and python 3, the pytest
plugins related to "pytest-virtualenv" are installed from source.

For more details: https://gist.github.com/jcfr/19a360f541b5caae5f31ac31c83e4f65

See #119
jcfr added a commit that referenced this issue Sep 11, 2016
Since pytest-plugins maintainers have not yet create a new release
including the latest fixes for windows and python 3, the pytest
plugins related to "pytest-virtualenv" are installed from source.

For more details: https://gist.github.com/jcfr/19a360f541b5caae5f31ac31c83e4f65

See #119
@jcfr
Copy link
Contributor

jcfr commented Sep 11, 2016

@msmolens I am not able to reproduce the issue (using pytest-virtualenv), do you have a set of steps allowing to recreate the problem ?

@jcfr jcfr added the backlog label Sep 11, 2016
@msmolens
Copy link
Member Author

I have not tried pytest-virtualenv, but I can reproduce this with a manually-created virtualenv using the following steps:

C:\Python27\python.exe --version
Python 2.7.12

C:\Python27\scripts\pip install virtualenv
cd C:\venvs
C:\Python27\scripts\virtualenv skbuild
skbuild\Scripts\activate.bat
cd C:\path\to\scikit-build
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install -e .
pytest tests\test_cmaker.py::test_get_python_library

================================== FAILURES ===================================
___________________________ test_get_python_library ___________________________

    def test_get_python_library():
        python_library = CMaker.get_python_library(CMaker.get_python_version())
>       assert python_library
E       assert None

tests\test_cmaker.py:28: AssertionError
========================== 1 failed in 0.37 seconds ===========================

@jcfr
Copy link
Contributor

jcfr commented Dec 14, 2016

For reference, a patch to fix virtualenv has been submitted as pypa/virtualenv#992

@jcfr
Copy link
Contributor

jcfr commented Dec 19, 2016

The fix consisted in updating skbuild.cmaker to use distutils.sysconfig instead of the standard sysconfig.

Indeed, the distutils version is patched by virtualenv >= 0.9.2.
See https://virtualenv.pypa.io/en/latest/changes/#id78

Alternatively, integrating pypa/virtualenv#992 into upstream virtualenv would also avoid patching distutils.sysconfig.

@jcfr
Copy link
Contributor

jcfr commented Dec 19, 2016

Fixed by aa51be5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Tests Testing and related things Type: Bug Something's not working correctly.
Projects
None yet
Development

No branches or pull requests

2 participants