Message140841
Great to hear these news! I will pull from your clone and test on linux2 as soon as possible.
In your Mercurial configuration file, you should set the git option so that diffs can display editions to binary files. See http://hgtip.com/tips/beginner/2009-10-22-always-use-git-diffs/
> Usage: Just add a 'wrapper-scripts-entries' variable in setup.cfg,
The new scripts feature should reuse the already existing scripts field, in the files section.
> which takes a list type as its value. For instance,
> wrapper-scripts-entries = ['hello=demo.foo.bar:main']
Config files don’t have lists, but they have multi-line values. See the packaging/setupcfg doc for more info; here’s an example:
scripts =
hello = demo.foo.bar.main
(we use dotted paths throughout packaging, not paths with dots and colons, BTW)
> Current patch can generte executable script with no extension on
> POSIX, and .exe file on Windows but have not yet added gui support.
Looks like a great start! As I said in private email, have a look at the distribute fork of setuptools to see if they have tests for these features.
> In the 'test_command_build_scripts.py', how to test the generated
> .exe wrapper to see if it can run and generate correct output or not?
> The only way I can remember is to use os.system(), but if we use
> os.system() to execute the .exe file, then it will not get the what
> we want, because it will run in another thread, thus can not get the
> right sys.path which I have set in my test function.
os.system runs a process, not a thread. You should use the subprocess module, it’s better than os.system. To pass a custom sys.path, set up a PYTHONPATH environment variable in the env argument of subprocess.Popen. test_sys and test_site have examples of how to use subprocess.
(Before someone suggests using the helpers in test.support, know that I prefer to use only subprocess, to ease the future backport.) |
|
Date |
User |
Action |
Args |
2011-07-22 00:01:43 | eric.araujo | set | recipients:
+ eric.araujo, mhammond, fdrake, vinay.sajip, ceder, tim.golden, tarek, alexis, higery |
2011-07-22 00:01:43 | eric.araujo | set | messageid: <1311292903.32.0.304005020956.issue12394@psf.upfronthosting.co.za> |
2011-07-22 00:01:42 | eric.araujo | link | issue12394 messages |
2011-07-22 00:01:42 | eric.araujo | create | |
|