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

Working in virtualenv Client64 #5

Closed
1oglop1 opened this issue Oct 13, 2017 · 2 comments
Closed

Working in virtualenv Client64 #5

1oglop1 opened this issue Oct 13, 2017 · 2 comments

Comments

@1oglop1
Copy link

1oglop1 commented Oct 13, 2017

Is there any functional problem in Client64.py if I switch from sys.getsitepackages() to sys.path?
Because virtualenv manages it's own version of site pypa/virtualenv/#737
Client64.py Line 127:

      # _append_sys_path = site.getsitepackages()
        _append_sys_path = sys.path
        if append_sys_path is not None:
            if isinstance(append_sys_path, str):
                _append_sys_path.append(append_sys_path.strip())
            elif isinstance(append_sys_path, (list, tuple)):
                _append_sys_path.extend(append_sys_path)
            else:
                raise TypeError('append_sys_path must be a str, list or tuple')
        cmd.extend(['--append-sys-path', ';'.join(_append_sys_path).strip()])

I just blindly tried to change it and it worked in my case.

@jborbely
Copy link
Contributor

No functional problem at all. The change that you made is perfectly fine.

The primary reason for the --append-sys-path parameter is to make sure that any import statement that is done on the module that is running on the 32-bit server does not raise ImportError.

@jborbely
Copy link
Contributor

I found myself doing the same thing often -- passing sys.path from Client64 to Server32 and so I decided to replace site.getsitepackages() with sys.path in the latest release (v0.3.2) to fix this issue.

I cannot remember the original reason why I chose to use site.getsitepackages() anyways.

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

No branches or pull requests

2 participants