[issue12394] packaging: generate scripts from callable (dotted paths)

2014-03-12 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- resolution: - out of date stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___

[issue12394] packaging: generate scripts from callable (dotted paths)

2012-02-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I merged default yesterday and produced this patch. I’ll use the review site to make comments. -- Added file: http://bugs.python.org/file24658/9a7dba6e6f1a.diff ___ Python tracker

[issue12394] packaging: generate scripts from callable (dotted paths)

2012-02-27 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Or I won’t, as even a dumb no-git-style diff does not create a review link, maybe because of the binary file change. *Sigh* Trying again. -- Added file: http://bugs.python.org/file24659/9a7dba6e6f1a.diff

[issue12394] packaging: generate scripts from callable (dotted paths)

2012-02-27 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file24658/9a7dba6e6f1a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___

[issue12394] packaging: generate scripts from callable (dotted paths)

2012-02-27 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file23008/7099110c8f14.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___

[issue12394] packaging: generate scripts from callable (dotted paths)

2012-01-03 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: @Éric: you may also be interested in a standalone launcher which I wrote for the pythonv branch: https://bitbucket.org/vinay.sajip/simple_launcher/ This is built using Visual Studio and is not based on setuptools code, but uses the same

[issue12394] packaging: generate scripts from callable (dotted paths)

2012-01-02 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I’ll get back to this issue later, but now I just wanted to add a link about building the binary exe files: http://mail.python.org/pipermail/python-dev/2006-April/063846.html (it comes from the time where setuptools was supposed to be added to

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-10-25 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: What about Windows support? Just like with distutils: the file extension is used, not the shebang. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-10-25 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: What about Windows support? Just like with distutils: the file extension is used, not the shebang. Please spell out for me how you see this working: I don't see it. Note that scripts have to use the correct Python even if they are

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-10-25 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: To expand on what I said about not seeing how things will work under Windows: are we going to place .exe launchers adjacent to the script, like setuptools does? If the script just has a shebang of #!/usr/bin/env python, how is the

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-10-24 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: FYI: In pythonv, the build_scripts functionality provides identical support for dotted callables to what Éric proposed, while preserving existing functionality for ordinary script files. Thus: scripts = demo1 demo2 = amodule.main

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-10-24 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Re. the launcher changes, those improvements by Guy Rozendorn are welcome. I noticed some differences from the approach taken by Mark Hammond and Curt Hagenlocher in the PEP 397 implementation, which I ported to C: The Ctrl-C is ignored

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-10-24 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: FYI: In pythonv, the build_scripts functionality provides identical support for dotted callables to what Éric proposed, while preserving existing functionality for ordinary script files. My current preference is to use only new-style

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-10-24 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: We’ll have to think about the shebang munging and decide if we keep it.  I think  recommending that people use “/usr/bin/env python” (or python3) and not doing anything to the shebang may be the best thing. What about Windows

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-10-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: FTR, distribute recently committed two fixes for the exe wrappers: https://bitbucket.org/tarek/distribute/issue/238 and https://bitbucket.org/tarek/distribute/issue/207 -- ___ Python tracker

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-08-22 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Added file: http://bugs.python.org/file23008/7099110c8f14.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-08-18 Thread higery
higery shoulderhig...@gmail.com added the comment: IIUC the support for setup.py is transitional, i.e. legacy support, for existing packages transitioning from distutils/setuptools/Distribute to packaging. New features should not rely on the existence of setup.py. I know, the implementation

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-08-18 Thread higery
higery shoulderhig...@gmail.com added the comment: BTW higery, did you use any of the build-scripts functionality I developed in the pythonv branch? NO. I removed the 'copy_scripts' function, so I did not use your developed functionality. After this change, Packaging module now just builds

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-08-18 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: There are two kinds of configuration files supported in Packaging, and you can say it maybe a transition consideration from  distutils/setuptools to Packaging, but if you look into the documents of Packaging(you can generate it from the

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-08-18 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: NO. I removed the 'copy_scripts' function, so I did not use your developed functionality. After this change, Packaging module now just builds new-style scripts and old-style scripts will be built by

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-08-18 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file22933/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-08-18 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file22934/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-08-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: scripts = foo = a.b.c.main foowin = a.b.c.winmain -window This is great. About -window: I don’t think using a fake option style (leading -) is useful, and I’d reuse the setuptools name, “gui”. I also think this good idea of yours

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-08-18 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Heh, I messed up my example: unit2-tk = unittest2.gui.main gui -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-08-18 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Just to clarify: I'm -1 on heuristics too; it's better to have some way of explicitly declaring the intention. I've no problem with e.g. the [scripts] section being used just for generated scripts, as long as there is a clear way of

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-08-17 Thread higery
Changes by higery shoulderhig...@gmail.com: Added file: http://bugs.python.org/file22922/4be1917b2a9e.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-08-17 Thread higery
higery shoulderhig...@gmail.com added the comment: Current patch has removed old-style scripts support and just retain new-style wrapper scripts generation support. Now, it uses only dotted path string to support kind of 'console_scripts' of setuptools, and uses dotted path with a 'window'

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-08-17 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: IIUC the support for setup.py is transitional, i.e. legacy support, for existing packages transitioning from distutils/setuptools/Distribute to packaging. New features should not rely on the existence of setup.py. --

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-08-17 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: BTW higery, did you use any of the build-scripts functionality I developed in the pythonv branch? Ref. https://bitbucket.org/vinay.sajip/pythonv/changeset/d2453f281baf -- ___ Python tracker

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-26 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Your tests contain this: +sys.path.append(source) When using regrtest (see http://docs.python.org/devguide/runtests#running), you’ll get a warning that test_packaging altered sys.path. Your code should make sure sys.path is restored

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-24 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: You haven’t set the git option for the diff commands in your config file. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-24 Thread higery
higery shoulderhig...@gmail.com added the comment: remote repository? It's just a configuration file under the .hg directory... -- Added file: http://bugs.python.org/file22744/unnamed ___ Python tracker rep...@bugs.python.org

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-24 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: Removed file: http://bugs.python.org/file22744/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-24 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: higery’s message was this: I have already set the option as you said earlier, but how to 'push' it to remote repository? It's just a configuration file under the .hg directory... I was mistaken; setting the diff git option is important if you

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-23 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Same bug. I’ve added debug prints to find out the rights (UNIX permission system) of the files, and they’re very strange: --wxrw--wt (the read bit is missing, and the t is strange). It should be -rwxr-xr-x, like other programs. The bug is

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-23 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I confirm fixing 0o755 makes the tests pass for me. Your code gives one warning: build_scripts.py:241: BytesWarning: str() on a bytes instance hdr = #!%(executable)s%(options)s\n % locals() The object with the name executable or options is

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-23 Thread higery
higery shoulderhig...@gmail.com added the comment: An octal literal in 3.x is 0o755. Decimal 755 means 0o1363, which is not good :) Thank you for your reminding. The reason I made this mistake is that I'm not familiar with the right way to set permission code in Python3+ . --

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-23 Thread higery
higery shoulderhig...@gmail.com added the comment: The object with the name executable or options is bytes, which you should explicitly convert to a string with decode. I also don’t like using locals(), but that’s a personal style thing. Thanks for your test, I'll amend it. --

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-23 Thread higery
higery shoulderhig...@gmail.com added the comment: Your test should catch stdout (see other packaging tests for how to do that), so that people or buildbots running the tests don’t see “Hello world!”, and so that you can run asserts for the output. Thanks. Got it - captured_stdout

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-23 Thread higery
Changes by higery shoulderhig...@gmail.com: Added file: http://bugs.python.org/file22727/c5692393c621.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-22 Thread higery
higery shoulderhig...@gmail.com added the comment: packaging.errors.PackagingOptionError: your specific entry 'script1=foo.bar.main1.main' does not exist! I think you did not get the latest version of my code. -- ___ Python tracker

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-22 Thread higery
higery shoulderhig...@gmail.com added the comment: 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/ Thanks. The new scripts feature should reuse the

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-22 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: I think you did not get the latest version of my code. I pulled and updated again and got a different error :) ERROR: test_install_wrapper_scripts (packaging.tests.test_command_build_scripts.BuildScriptsTestCase)

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-22 Thread higery
higery shoulderhig...@gmail.com added the comment: IOError: [Errno 13] Permission denied: '/tmp/user/1013/tmp2xp9qc/tmpwhzzmg/script1' I have added an 'ensure_directory()' function to build_script.py, but I'm not sure if it can fix this error. --

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-21 Thread higery
Changes by higery shoulderhig...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file22711/6382acfb1685.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-21 Thread higery
higery shoulderhig...@gmail.com added the comment: I hope people can help me test this patch especially on non-Windows platforms. The main implementation resides in build_scripts.py. Usage: Just add a 'wrapper-scripts-entries' variable in setup.cfg, which takes a list type as its value. For

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: 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

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-21 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Failure on POSIX (linux2): ERROR: test_install_wrapper_scripts (packaging.tests.test_command_build_scripts.BuildScriptsTestCase) -- Traceback (most recent call last): File

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-07-15 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- hgrepos: +42 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___ ___ Python-bugs-list mailing

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-06-25 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: In the setup.cfg files, scripts will now be a mapping of names to callables, like the setuptools scripts and gui_scripts entry points: scripts = sphinx-build = sphinx.build.run On UNIX, a Python script named sphinx-build will be

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-06-25 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Version independence always means version independence in the same major line of development (i.e. X number in X.Y.Z), or to put it another way, version independence among the versions listed as supported in the Trove classifiers. That

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-06-25 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Perhaps some mechanism needs to be provided to indicate additional processing options per script line: Sure. Higery will have to examine existing usage and think about setuptools→packaging transition. We’ll start simple and easy (in other

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-06-25 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: If the code is compatible with 2.6+ only, the “2.5” Trove classifier should not be used. (Maybe I’m misunderstanding your point.) I was referring to your comment about the X in X.Y.Z. We also need to bear in mind that you sometimes

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-06-24 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- assignee: tarek - eric.araujo nosy: +higery stage: - needs patch title: Packaging should provide better support for executable scripts on Windows - packaging: generate scripts from callable (dotted paths)

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-06-24 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: Short review of the superseded bugs. #870479 — Scripts need platform-dependent handling A request to remove .py on POSIX and create a .cmd file on Windows. The .cmd part was quickly shot down (see bug thread for problems), and the discussion

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-06-24 Thread Fred L. Drake, Jr.
Fred L. Drake, Jr. fdr...@acm.org added the comment: People working on this should probably also look at how zc.buildout's zc.recipe.egg handles script generation. It's similar to setuptools in that console_script entry points are used, but it binds in the desired Python executable as well.

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-06-24 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Short review of the superseded bugs. #870479 — Scripts need platform-dependent handling A request to remove .py on POSIX and create a .cmd file on Windows. The .cmd part was quickly shot down (see bug thread for problems), and

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-06-24 Thread Vinay Sajip
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Fred L. Drake, Jr. fdr...@acm.org added the comment: People working on this should probably also look at how zc.buildout's zc.recipe.egg handles script generation. It's similar to setuptools in that console_script entry points are

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-06-24 Thread Éric Araujo
Éric Araujo mer...@netwok.org added the comment: [Vinay] I don't see how it makes sense to aim for version independence, especially since 2.x and 3.x can each raise SyntaxErrors when presented with the other's code. Version independence always means version independence in the same major line

[issue12394] packaging: generate scripts from callable (dotted paths)

2011-06-24 Thread Per Cederqvist
Changes by Per Cederqvist ce...@lysator.liu.se: -- nosy: +ceder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___ ___ Python-bugs-list