store git commit hash in utils._sysinfo instead of hidden data file #1538

Merged
merged 2 commits into from Apr 14, 2012

Conversation

Projects
None yet
2 participants
Owner

minrk commented Mar 30, 2012

Behavior is essentially unchanged, but the hash is stored in a generated Python file instead of hidden data file.

Alternative to PR #1524
Closes #1484

setupbase.py
- out_file.close()
+ out_pth = pjoin(self.build_lib, pkg_dir, 'utils', '_sysinfo.py')
+ with io.open(out_pth, 'w') as out_file:
+ for line in [
@fperez

fperez Apr 14, 2012

Owner

Rather than looping manually, I'd just let the writelines method do it for us:

writelines([
   u"# GENERATED BY setup.py\n",
   u"commit = '%s'\n" % repo_commit,])
Owner

fperez commented Apr 14, 2012

This looks good, with just a very minor tweak I suggested. I vastly prefer this to #1524, so I'll close that and we'll go with this solution instead. Thanks!

@fperez fperez referenced this pull request Apr 14, 2012

Closed

unhide git_commit_info.ini #1524

Owner

minrk commented Apr 14, 2012

now uses writelines

fperez added a commit that referenced this pull request Apr 14, 2012

Merge pull request #1538 from minrk/git_info
store git commit hash in utils._sysinfo instead of hidden data file

Behavior is essentially unchanged, but the hash is stored in a generated Python file instead of hidden data file.

Closes #1484.

@fperez fperez merged commit 576f6f9 into ipython:master Apr 14, 2012

fperez added a commit that referenced this pull request Apr 14, 2012

Emergency fix for py3 breakage introduced in 576f6f (merge of #1538)
Unicode literals (u'foo') aren't valid in Python 3.{1,2} (they will be
again in 3.3, and I failed to notice this.  This is a quick fix, will
discuss further on-list.  But I want master to remain working for py3
users.

fperez added a commit that referenced this pull request Apr 17, 2012

Emergency fix for py3 breakage introduced in 576f6f (merge of #1538)
Unicode literals (u'foo') aren't valid in Python 3.{1,2} (they will be
again in 3.3, and I failed to notice this.  This is a quick fix, will
discuss further on-list.  But I want master to remain working for py3
users.

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014

Merge pull request #1538 from minrk/git_info
store git commit hash in utils._sysinfo instead of hidden data file

Behavior is essentially unchanged, but the hash is stored in a generated Python file instead of hidden data file.

Closes #1484.

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014

Emergency fix for py3 breakage introduced in 576f6f (merge of #1538)
Unicode literals (u'foo') aren't valid in Python 3.{1,2} (they will be
again in 3.3, and I failed to notice this.  This is a quick fix, will
discuss further on-list.  But I want master to remain working for py3
users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment