Re: [A-A-P-develop] aap calling cvs problem on Windows
Brought to you by:
vimboss
From: Bram M. <Br...@mo...> - 2004-03-05 10:47:07
|
Joe Cooper wrote: > >>I'm using AAP to package and build a bunch of stuff for Windows, and I'm > >>running into a problem with packages that have to be fetched via CVS. > >>My aap is installed into C:\Program Files\aap\Exec. The first time I > >>tried to checkout via CVS, aap complained about not having CVS and > >>offered to install it. It installed a working cvs.exe into C:\Program > >>Files\aap\Exec\bin, but on subsequent runs, it gives an error about > >>trying to run "C:\Program". Obviously, it's not handling a space in the > >>path correctly...I'm still too much of an amateur with Python to know > >>where to look to fix this, so I thought I'd see if anyone had any pointers. > > > > This is an omission in Aap: quotes should be put around the command to > > include the space. Please try the patch below. > > Seems like it ought to fix it, but it doesn't. It results in the same > error. I also tried transposing " and ' in the relevant lines with no > change in behavior. Strange, it did work for me. Can you show me the command as it was executed? The lines you show below indicate that the double quotes are around the cvs command, as intented. That _should_ work... Aap uses system() to execute the command. Perhaps there is something with how it executes the command, depending on your environment. The documentation for system() is quite vague. > So, I've temporarily worked around the problem by installing a fresh aap > into C:\Programs\aap\Exec, which can now find cvs.exe. However, I think > I'm running into another weird Windows issue: > > Aap: 6 - Using dependency "build : ../src/Numerical" > Aap: 7 - updating target "..\src\Numerical" > Aap: CVS checkout for node "..\src\Numerical" > Aap: "C:\Programs\aap\Exec\bin\cvs.EXE" > -d:pserver:ano...@cv... > :/cvsroot/numpy checkout "Numerical" > The filename, directory name, or volume label syntax is incorrect. > Aap: 7 - Do not know how to build "..\src\Numerical" > Aap: 7 - updating target "src\Numerical" > Aap: 7 - Do not know how to build "src\Numerical" > Aap: Do not know how to build "..\src\Numerical" > > When I run the exact command AAP claims to be running, the checkout > works fine, including the double quotes on the command and module name. This probably means Aap is in the wrong directory when executing this command. Unfortunately, there is no way to see the current directory. Except for adding a line in the Aap code: *** VersContCvs.py~ Mon Feb 23 20:38:11 2004 --- VersContCvs.py Fri Mar 5 10:56:45 2004 *************** *** 253,258 **** --- 253,260 ---- (_('Could not change to directory "%s"') % dir) + str(e)) return 0 + msg_log(recdict, 'Cvs command in "%s"' % dir) + node_name = node.short_name() tmpname = '' > Is there a way to get AAP to actually tell me what it is running, or is > there something in Python outside of AAP that is escaping/quoting or > otherwise mangling the command that AAP has no control over? Executing system commands on MS-Windows is messy. Best way to solve it is installing Linux :-). If you are using a Unix shell that might complicate things. Especially Cygwin tends to cause trouble, because it mixes up Unix and MS-Windows environments. Perhaps the version of Python you installed matters for how system() is executed. -- BRIDGEKEEPER: What is your favorite colour? GAWAIN: Blue ... No yelloooooww! "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html /// |