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

Unified setup.py #1129

Merged
merged 2 commits into from Jan 5, 2012
Merged

Unified setup.py #1129

merged 2 commits into from Jan 5, 2012

Conversation

takluyver
Copy link
Member

This unifies the setup.py file for Python 2 and Python 3. A bit of reworking was needed so the setup code can run in Python 2 or 3. This may well need some cleanup - I just messed around with it until it worked.

Note that GH is doing a poor job of showing the changes, because the file that was setup2.py has replaced setup.py. Here is a clearer picture of the code changes, generated with git diff HEAD~2 HEAD~1: https://gist.github.com/1449027 (that excludes moving the files in the subsequent commit).

This should close #1119.

One downside: trying to install in older versions of Python will now fail with a SyntaxError, rather than a descriptive message, because we're using from __future__ import print_function. I can't see any neat way round that, although there's probably a hackish way if we think the message is important enough.

@fperez
Copy link
Member

fperez commented Dec 13, 2011

Heads-up @takluyver, a conflict popped up on this one at some point, so it's in need of a rebase. I'll review the code next, but wanted to let you know.

@fperez
Copy link
Member

fperez commented Dec 13, 2011

Regarding the problem with older pythons: don't worry. If people can't read instructions on the website about our minimally supported python version, it's their problem. We need to lower the cost to us of maintenance as we move more towards python3, so I'm OK with this approach. I doubt in practice it will be a problem for anyone.

from setup3 import main
# This check is also made in IPython/__init__, don't forget to update both when
# changing Python version requirements.
#~ if sys.version[0:3] < '2.6':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the point in leaving this code with #~ comment markers. If it's gone, it's gone.

@fperez
Copy link
Member

fperez commented Dec 13, 2011

OK, other than the need for a rebase and some minor inline comments, this is good to go. We'll test it out well in the RC-release phase, when we'll do installs on multiple boxes.

@takluyver
Copy link
Member Author

@fperez: The conflict is because I made a separate PR to address the immediate issue (start menu shortcuts for Python 3), and that's been merged. @minrk suggested that we leave this one until after 0.12, and I'm inclined to agree, now that it's primarily just condensing code.

@fperez
Copy link
Member

fperez commented Dec 13, 2011

Sounds good, let's leave it for 0.13...

@fperez
Copy link
Member

fperez commented Dec 20, 2011

Hey @takluyver, this one is in need of a quick rebase before we can merge it...

@takluyver
Copy link
Member Author

Rebased.

@fperez
Copy link
Member

fperez commented Jan 5, 2012

OK, otherwise it seems like we'd already gone over the ideas here and done the review. So I'm merging, thanks!

fperez added a commit that referenced this pull request Jan 5, 2012
Unify the setup.py file for Python 2 and Python 3.
@fperez fperez merged commit b2ac7c8 into ipython:master Jan 5, 2012
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
Unify the setup.py file for Python 2 and Python 3.
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.

Start menu shortcuts not created in Python 3
2 participants