This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: configure: support Git worktree
Type: Stage: resolved
Components: Build Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, ncoghlan, vstinner
Priority: normal Keywords:

Created on 2017-05-02 15:04 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1391 merged vstinner, 2017-05-02 15:05
PR 1396 merged vstinner, 2017-05-02 19:47
PR 1398 merged vstinner, 2017-05-02 20:50
PR 1401 merged vstinner, 2017-05-02 21:52
PR 1402 merged vstinner, 2017-05-02 21:54
Messages (8)
msg292774 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-02 15:04
configure.ac tests if .git/HEAD file exists to decide if it should get the git version / tag / branch.

I use git worktree to get 2.7, 3.5, 3.6 and master in their own directory. When using git worktree, ".git" is a text file with a content like:

haypo@selma$ cat ~/prog/python/2.7/.git
gitdir: /home/haypo/prog/python/master/.git/worktrees/2.7

Git supports such file, but configure.ac doesn't to Git in that case.

Attached PR fixes configure.ac to support Git worktree.
msg292775 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-02 15:06
See the bpo-29798 which added support for Git worktree in `make patchcheck`.
msg292800 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-02 19:42
New changeset 5facdbb29169c2799c42f887cef4cd9d087b0167 by Victor Stinner in branch 'master':
bpo-30232: Support Git worktree in configure.ac (#1391)
https://github.com/python/cpython/commit/5facdbb29169c2799c42f887cef4cd9d087b0167
msg292802 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-02 20:36
New changeset 9ed34a89532763cf89f5e11fffb91ef7dee29fed by Victor Stinner in branch 'master':
bpo-30232: Regenerate configure (#1396)
https://github.com/python/cpython/commit/9ed34a89532763cf89f5e11fffb91ef7dee29fed
msg292815 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-02 21:46
New changeset 4dae0d111dd7bb34ec730eea2327a3219acff211 by Victor Stinner in branch '3.6':
[3.6] bpo-30232: Support Git worktree in configure.ac (#1398)
https://github.com/python/cpython/commit/4dae0d111dd7bb34ec730eea2327a3219acff211
msg292816 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-02 22:05
New changeset df5692549a68741d3d02eeee28f9fef74f349712 by Victor Stinner in branch '2.7':
bpo-30232: Support Git worktree in configure.ac (#1402)
https://github.com/python/cpython/commit/df5692549a68741d3d02eeee28f9fef74f349712
msg292817 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-02 22:06
New changeset 360fb81367bb409bb7a1d261d88fcf82cee528f0 by Victor Stinner in branch '3.5':
[3.5] bpo-30232: Support Git worktree in configure.ac (#1398) (#1401)
https://github.com/python/cpython/commit/360fb81367bb409bb7a1d261d88fcf82cee528f0
msg292877 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-05-03 10:07
I applied the enhanced (called bugfix by Brett ;-)) to 2.7, 3.5, 3.6 and master (3.7). I close the issue.

Example:

haypo@selma$ cat .git
gitdir: /home/haypo/prog/python/master/.git/worktrees/2.7

haypo@selma$ ./python 
Python 2.7.13+ (heads/test_ssl_27:dda4d78, May  3 2017, 03:25:45) 
[GCC 6.3.1 20161221 (Red Hat 6.3.1-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys._git
('CPython', 'heads/test_ssl_27', 'dda4d78')
History
Date User Action Args
2022-04-11 14:58:45adminsetgithub: 74418
2017-05-03 10:07:42vstinnersetstatus: open -> closed
resolution: fixed
stage: resolved
2017-05-03 10:07:33vstinnersetmessages: + msg292877
2017-05-02 22:06:19vstinnersetmessages: + msg292817
2017-05-02 22:05:47vstinnersetmessages: + msg292816
2017-05-02 21:54:23vstinnersetpull_requests: + pull_request1510
2017-05-02 21:52:58vstinnersetpull_requests: + pull_request1509
2017-05-02 21:46:08vstinnersetmessages: + msg292815
2017-05-02 20:50:53vstinnersetpull_requests: + pull_request1507
2017-05-02 20:36:00vstinnersetmessages: + msg292802
2017-05-02 19:47:39vstinnersetpull_requests: + pull_request1504
2017-05-02 19:42:51vstinnersetmessages: + msg292800
2017-05-02 15:06:30vstinnersetmessages: + msg292775
2017-05-02 15:05:50vstinnersetpull_requests: + pull_request1498
2017-05-02 15:04:23vstinnercreate