forked from pebble/pebble-tool
-
Notifications
You must be signed in to change notification settings - Fork 5
Working Python 2.7 support under Microsoft Windows #2
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
Closed
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
3dc6a7c
Working Python 2.7 support under Microsoft Windows
clach04 72f3a37
Fix two thirds of review comments
clach04 54af7a7
Fix issues with setup.py - possibly Windows specific
clach04 b5cbbd1
Include pyreadline in setup.py to match requirements.txt
clach04 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Pebble Tool | ||
|
|
||
| To install, from a checkout, issue: | ||
|
|
||
| python -m pip install -r requirements.txt | ||
|
|
||
| or: | ||
|
|
||
| python setup.py develop | ||
| python setup.py install | ||
|
|
||
|
|
||
| Definitely works with Python 2.7. | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A quick look suggests that pyreadline has been unmaintained for longer than this tool, and does not work under the latest version of Python. pyreadline3 might be a better choice, though it's very obscure.
Does installing this without importing it do anything?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll need to get back to you on this, been a while since I looked at it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean https://pypi.org/project/pyreadline3 ? That doesn't look appropriate, it does NOT support Python 2.7 :-(, only some 3.x
Are you asking if the install runs some code in the background I'd need to look at the setup.py to know? I'm not 100% sure what you are asking. It's defintely being imported by commands/repl.py
pebble-tool/pebble_tool/commands/repl.py
Line 5 in 92561f5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Supporting Python 2.7 is not really a goal at this point, given that Python 2.7 has been dead for years. That said, it is still necessary given that while this runs (or should run) fine under Python 3, the build chain does not. (For that matter, supporting Windows outside WSL is also a non-goal...)
Is editing requirements.txt even the right thing to be doing? Selectively installing things might be better. What, if anything, happens if this is installed on Linux or macOS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm, maybe that's the way to tackle this. Scratch this PR, and I open a new one that's ONLY a readme change with a note for py2.7 (and Windows) so it's a manual step (or a separate requirements file) so the current known platforms work the way they always have.
Let me try that out real quick.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be possible to selectively install things in setup.py, if one uses that mechanism instead of requirements.txt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm definitely down for that :-)
I just posted a hopefully easier to accept PR #4 to fix things on all platforms, with Windows to follow. I already tested out requirements windows file and it works great, but a conditional in setup.py would be great too. My main goal is to get something merged so it's in a central place, for a clean working version.