classification
Title: current tip doesn't build without mercurial installed
Type: Stage: resolved
Components: Build Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder: Parser/asdl_c.py relies on mercurial repository revision
View: 12152
Assigned To: Nosy List: benjamin.peterson, ned.deily, python-dev, r.david.murray, rpetrov, santoso.wijaya, schmir
Priority: normal Keywords: patch

Created on 2011-05-31 15:16 by schmir, last changed 2011-07-03 07:22 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
0001-disable-ASDLGEN-if-hg-won-t-work-or-if-python-is-not.patch schmir, 2011-05-31 21:13 disable ASDLGEN if hg won't work, or if python is not installed.
0908fbf86e43.diff schmir, 2011-05-31 21:34 review
Repositories containing patches
http://bitbucket.org/schmir/cpython
Messages (13)
msg137363 - (view) Author: Ralf Schmitt (schmir) Date: 2011-05-31 15:16
configure works, but make immediately fails:

% make      
./Parser/asdl_c.py -h ./Include ./Parser/Python.asdl
Traceback (most recent call last):
  File "./Parser/asdl_c.py", line 1214, in <module>
    main(args[0])
  File "./Parser/asdl_c.py", line 1158, in main
    mod.version = get_file_revision(srcfile)
  File "./Parser/asdl_c.py", line 1142, in get_file_revision
    p = subprocess.Popen(args, stdout=subprocess.PIPE)
  File "/usr/lib/python2.7/subprocess.py", line 672, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1202, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
make: *** [Include/Python-ast.h] Error 1
msg137374 - (view) Author: Santoso Wijaya (santoso.wijaya) * Date: 2011-05-31 17:42
FYI, the dependency is introduced in changeset http://hg.python.org/cpython/rev/0daa6ba25d9b
msg137375 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2011-05-31 17:53
I'm closing this as invalid/duplicate, but I'm sure this isn't the last time we'll get this report.  It would be nice if we could think of a way to improve the situation.
msg137378 - (view) Author: Ralf Schmitt (schmir) Date: 2011-05-31 18:21
duplicate of http://bugs.python.org/issue12152
msg137380 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2011-05-31 18:26
I should have mentioned the bug number in the body, thanks for adding that.  FYI, the bug number also appears in the 'superseder' field, and (more interesting to you in this context) if you just say, for example, 
issue 12152 or #12152 roundup will automatically turn it into a link.
msg137388 - (view) Author: Ralf Schmitt (schmir) Date: 2011-05-31 21:13
here's a patch that fixes the issue.
You can use hg import to apply it to your hg repo, autoconf has to be run afterwards.

The log message is:

    disable ASDLGEN if hg won't work, or if python is not installed.
    
    This change makes configure check for
    - the existence of a hg repository
    - the hg executable itself
    - the python executable
    
    Running $(srcdir)/Parser/asdl_c.py (i.e. ASDLGEN) will fail if any of
    the above prerequisites is missing, so we now disable it instead.
    
    Also see http://bugs.python.org/issue12225 and
    http://bugs.python.org/issue12152
msg137392 - (view) Author: Ralf Schmitt (schmir) Date: 2011-05-31 21:32
I've setup a hg repo on bitbucket with that patch.
msg137395 - (view) Author: Roundup Robot (python-dev) Date: 2011-05-31 22:11
New changeset 435eec7b41f0 by Ralf Schmitt in branch 'default':
disable ASDLGEN if hg won't work, or if python is not installed.
http://hg.python.org/cpython/rev/435eec7b41f0
msg137397 - (view) Author: Roumen Petrov (rpetrov) * Date: 2011-05-31 22:53
Check for python executable is not complete . What about if system has only version 3+ installed ?
msg137398 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2011-05-31 22:57
2011/5/31 Roumen Petrov <report@bugs.python.org>:
>
> Roumen Petrov <bugtrack@roumenpetrov.info> added the comment:
>
> Check for python executable is not complete . What about if system has only version 3+ installed ?

Then hg can't possibly be installed either.
msg137400 - (view) Author: Ned Deily (ned.deily) * (Python committer) Date: 2011-05-31 23:17
As the OP notes, autoconf needs to be run to update `configure` and those changes needs to be pushed as well so that 'configure.in' and 'configure' are in sync again.
msg137426 - (view) Author: Ralf Schmitt (schmir) Date: 2011-06-01 08:13
Roumen Petrov <report@bugs.python.org> writes:

> Roumen Petrov <bugtrack@roumenpetrov.info> added the comment:
>
> Check for python executable is not complete . What about if system has
> only version 3+ installed ?

The shebang in Parser/asdl_c.py reads '#! /usr/bin/env python'.
That is what the makefile is calling. So unless you want to change the
Makefile too and start calling '@PYTHON@ Parser/asdl_c.py', I think the
check is rather complete.
msg139673 - (view) Author: Roundup Robot (python-dev) Date: 2011-07-03 07:22
New changeset 4e0c1128cda2 by Ralf Schmitt in branch '3.2':
disable ASDLGEN if hg won't work, or if python is not installed.
http://hg.python.org/cpython/rev/4e0c1128cda2
History
Date User Action Args
2011-07-03 07:22:49python-devsetmessages: + msg139673
2011-06-01 08:13:16schmirsetmessages: + msg137426
2011-05-31 23:17:29ned.deilysetnosy: + ned.deily
messages: + msg137400
2011-05-31 22:57:11benjamin.petersonsetmessages: + msg137398
2011-05-31 22:53:17rpetrovsetnosy: + rpetrov
messages: + msg137397
2011-05-31 22:11:25python-devsetnosy: + python-dev
messages: + msg137395
resolution: duplicate -> fixed
2011-05-31 21:34:36schmirsetfiles: + 0908fbf86e43.diff
2011-05-31 21:32:46schmirsethgrepos: + hgrepo24
messages: + msg137392
2011-05-31 21:13:53schmirsetfiles: + 0001-disable-ASDLGEN-if-hg-won-t-work-or-if-python-is-not.patch
keywords: + patch
messages: + msg137388
2011-05-31 18:26:37r.david.murraysetmessages: + msg137380
2011-05-31 18:21:07schmirsetmessages: + msg137378
2011-05-31 17:53:31r.david.murraysetstatus: open -> closed

superseder: Parser/asdl_c.py relies on mercurial repository revision

nosy: + r.david.murray, benjamin.peterson
messages: + msg137375
resolution: duplicate
stage: resolved
2011-05-31 17:42:50santoso.wijayasetnosy: + santoso.wijaya
messages: + msg137374
components: + Build
2011-05-31 15:16:16schmircreate