Skip to content
This repository has been archived by the owner on Apr 18, 2018. It is now read-only.

Add Python 3.3+ and Windows support #169

Open
wants to merge 28 commits into
base: develop
Choose a base branch
from

Conversation

tcalmant
Copy link

@tcalmant tcalmant commented Dec 8, 2015

Hi,

I've added support for Python 3.3+ for all platforms and support for the Windows platform for Pyleus.
It has been tested with the unit tests and the word count example.

This contribution is supported by Tec21 and ERODS team of the Université Grenoble Alpes.

Cheers,
Thomas

The OS is detected in the buildCommand method.
The previous buildCommand method has been renamed buildCommandUnix.
Support Windows when calling setup.py.
Import the .jar file in the wheel
This will generate a pyleus.exe file on Windows, usable in the console.
Replaced "foo/bar"-style constant paths by calls to os.path.join()
... '/' must be used instead of File.separator
This seems to avoid the "file not found" bug
Replaces virtualenv_proxy for Python 3.3+
... else, fall back on virtualenv.
Tests on the creation of the virtual environment are missing, because it doesn't call a command anymore but uses the venv module directly
Windows paths contains '\' characters, which must be escaped.'
pytestmark is handled after @mock decorators are executed, but the latters fail if venv_proxy fails to load.
Use it when available, else use the command name on Posix or consider it unavailable on Windows
This avoids having dictionary keys in binary instead of string in Python 3
@poros
Copy link
Contributor

poros commented Dec 8, 2015

Hi,

Travis is failing. Could you please check the output out and fix whatever is causing the error?

To be honest, I thought we already were Python 3 ready (at least we had some contributions to make this happen) but at the end we blocked on Storm incompatibility with Python 3 (see comments in #50).

@tcalmant
Copy link
Author

tcalmant commented Dec 8, 2015

The error to come from flakes in a test to check if venv is present; I'm working on it.

The "develop" branch had some Python 3-aware code but I didn't manage to make it work as is.

@tcalmant
Copy link
Author

tcalmant commented Dec 8, 2015

Oh, and the "test_read_msg_dict" test error is due to the behaviour of msgpack, forcing it to give back string in all cases to avoid backward incompatibility in the main.
The test using explicit "bytes" strings, is this to test the conservation of types or just for the Python 3 compatibility ?

@westover
Copy link

Is there anything I can do to help with this endeavor?

@tcalmant
Copy link
Author

I just have some commits to cherry-pick from my other branches to support calls to "pip" on Windows while using system-site packages.
It would be nice to have some feedback from other Python 3/Windows users to look for bugs in some cases.

The version of Pyleus I use is based on a modified version of MsgPack-Java that uses Latin-1 to transfer binary data instead of UTF-8, due to some issues transferring Numpy arrays.

This avoids some errors when using the "system_site_packages" option of Pyleus, where the pip package is not installed (already installed in system site packages)
- Allows to run the Nimbus server on Windows and components on Linux (for example)
- Fixes #2
@westover
Copy link

So Travis is dead now how can we revive this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants