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

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

Merged
merged 2 commits into from Apr 14, 2012

Conversation

minrk
Copy link
Member

@minrk 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

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 [
Copy link
Member

Choose a reason for hiding this comment

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

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,])

@fperez
Copy link
Member

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!

@minrk
Copy link
Member Author

minrk commented Apr 14, 2012

now uses writelines

fperez added a commit that referenced this pull request Apr 14, 2012
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
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
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
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 ipython#1484.
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
…#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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unhide .git_commit_info.ini
2 participants