msg201000 - (view) |
Author: Larry Hastings (larry) * |
Date: 2013-10-23 06:12 |
Somebody needs to figure out how to best integrate Argument Clinic into the build. Antoine, I think you said it sounded like... "fun"? Maybe? Anyway, I'm hoping you're willing to take a stab at it. If not please assign the issue back to nobody, and sorry the intrusion.
|
msg201001 - (view) |
Author: Larry Hastings (larry) * |
Date: 2013-10-23 06:40 |
Drat!
|
msg201004 - (view) |
Author: Antoine Pitrou (pitrou) * |
Date: 2013-10-23 08:31 |
Well, I don't really know how to do it. You'd have to have a step that somehow scans for .c files in the source tree, looks for clinic headers and compute whether they're outdated?
(but this must only be done if the .c files are younger than the .o files, i.e. the step should probably be integrated to the C compilation step)
|
msg201091 - (view) |
Author: Larry Hastings (larry) * |
Date: 2013-10-24 05:06 |
I thought it'd be more like, write a special C program that probes to see if you have a built python in the current directory, and if not looks on the path for a python3 (>=3.3), and if it finds a python it can use it runs Clinic on its arguments. Then make sure it gets built before any of the C files. Then change the .c -> .o target so it runs that program before running $(CC).
|
msg201097 - (view) |
Author: Antoine Pitrou (pitrou) * |
Date: 2013-10-24 08:15 |
Well, why is clinic 3.3 only? It would be slightly easier if it accepted any "python3" executable.
|
msg201099 - (view) |
Author: STINNER Victor (vstinner) * |
Date: 2013-10-24 08:37 |
> Well, I don't really know how to do it. You'd have to have a step that somehow scans for .c files in the source tree, looks for clinic headers and compute whether they're outdated?
Does it really need to be automated? We may only regenerate clinic things after a fresh configure (uncompress tarball, rnu configure, make). Or explicitly using a special command, ex: "make clinic" (which would only regenerate clinic things).
(I didn't check how clinic works, so I'm maybe saying something stupid.)
|
msg201100 - (view) |
Author: Antoine Pitrou (pitrou) * |
Date: 2013-10-24 08:41 |
> > Well, I don't really know how to do it. You'd have to have a step
> > that somehow scans for .c files in the source tree, looks for
> > clinic headers and compute whether they're outdated?
>
> Does it really need to be automated? We may only regenerate clinic
> things after a fresh configure (uncompress tarball, rnu configure,
> make). Or explicitly using a special command, ex: "make clinic"
> (which would only regenerate clinic things).
"make clinic" may be a good compromise indeed.
|
msg201202 - (view) |
Author: Larry Hastings (larry) * |
Date: 2013-10-25 02:42 |
> Well, why is clinic 3.3 only? It would be slightly easier
> if it accepted any "python3" executable.
Patches welcome! I have bigger fish to fry.
|
msg201215 - (view) |
Author: Antoine Pitrou (pitrou) * |
Date: 2013-10-25 07:15 |
> Patches welcome! I have bigger fish to fry.
That doesn't solve the "why" question. You wrote the code and it probably takes you two minutes to make a fix.
|
msg201243 - (view) |
Author: Larry Hastings (larry) * |
Date: 2013-10-25 15:31 |
For a long time it was actually 3.4+ only. I was depending on a particular AST node that wasn't exposed to Python until 3.4 trunk. But that went away, and I tried it with 3.3 and it worked fine, so I labeled it 3.3+. For all I know it works fine under 3.1, never tried it.
|
msg203912 - (view) |
Author: Larry Hastings (larry) * |
Date: 2013-11-22 23:10 |
Attached is a patch to at least add a "make clinic" target for the UNIX-like platforms. This doesn't add anything for the Windows build.
|
msg203915 - (view) |
Author: STINNER Victor (vstinner) * |
Date: 2013-11-22 23:24 |
+ $(RUNSHARED) $(PYTHON_FOR_BUILD) ./Tools/clinic/clinic.py */*.c
There are deeper directories containing .c files: Mac/Tools, Modules/cjkcodecs, Modules/_ctypes, Modules/_decimal, Modules/expat, ./PC/bdist_wininst, etc.
|
msg203924 - (view) |
Author: Larry Hastings (larry) * |
Date: 2013-11-22 23:45 |
Okay, there's more than one way to skin this cat. This version uses os.walk().
|
msg203925 - (view) |
Author: Larry Hastings (larry) * |
Date: 2013-11-22 23:46 |
(Whoops, forgot to attach the new diff.)
|
msg204126 - (view) |
Author: Roundup Robot (python-dev) |
Date: 2013-11-23 22:59 |
New changeset 29370c25e0f1 by Larry Hastings in branch 'default':
Issue #19358: "make clinic" now runs the Argument Clinic preprocessor
http://hg.python.org/cpython/rev/29370c25e0f1
|
msg204127 - (view) |
Author: Larry Hastings (larry) * |
Date: 2013-11-23 23:26 |
Fixed. By the way, this checkin also added a tiny new feature to Argument Clinic: if the file hasn't changed, it doesn't bother to rewrite it (or touch it in any way).
|
|
Date |
User |
Action |
Args |
2022-04-11 14:57:52 | admin | set | github: 63557 |
2013-11-23 23:26:52 | larry | set | status: open -> closed messages:
+ msg204127
assignee: larry resolution: fixed stage: patch review -> commit review |
2013-11-23 22:59:17 | python-dev | set | nosy:
+ python-dev messages:
+ msg204126
|
2013-11-22 23:46:14 | larry | set | files:
+ larry.make.clinic.patch.2.diff
messages:
+ msg203925 |
2013-11-22 23:45:52 | larry | set | messages:
+ msg203924 |
2013-11-22 23:24:19 | vstinner | set | messages:
+ msg203915 |
2013-11-22 23:10:05 | larry | set | files:
+ larry.make.clinic.patch.1.diff keywords:
+ patch messages:
+ msg203912
stage: patch review |
2013-10-25 15:31:33 | larry | set | messages:
+ msg201243 |
2013-10-25 07:15:12 | pitrou | set | messages:
+ msg201215 |
2013-10-25 02:42:30 | larry | set | messages:
+ msg201202 |
2013-10-24 08:41:24 | pitrou | set | messages:
+ msg201100 |
2013-10-24 08:37:20 | vstinner | set | nosy:
+ vstinner messages:
+ msg201099
|
2013-10-24 08:15:29 | pitrou | set | messages:
+ msg201097 |
2013-10-24 05:06:21 | larry | set | messages:
+ msg201091 |
2013-10-23 08:31:32 | pitrou | set | nosy:
+ loewis messages:
+ msg201004
|
2013-10-23 06:40:29 | larry | set | messages:
+ msg201001 |
2013-10-23 06:39:36 | pitrou | set | assignee: pitrou -> (no value) |
2013-10-23 06:12:31 | larry | create | |