[issue8668] Packaging: add a 'develop' command
higery shoulderhig...@gmail.com added the comment: What’s more practical for you, a review or a patch? I think a review is better(thanks for your time:) ), because some changes maybe needed after I have finished all the issues against the develop command. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8668] Packaging: add a 'develop' command
Changes by higery shoulderhig...@gmail.com: Added file: http://bugs.python.org/file23387/adb2cb19ca9b.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8668] Packaging: add a 'develop' command
higery shoulderhig...@gmail.com added the comment: higery, can you give us a status update? Do you have the time to ... Sorry to reply to you so late, I will read carefully these reviews asap and try to make an updated patch before 12th. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
higery shoulderhig...@gmail.com added the comment: I’ve just found another problem with MANIFEST files created in Windows: they use CRLF. One cann't let Python generate MANIFEST files taking Unix-style LF as newline endings On Windows, I think. So, does it mean even though we have already made much effort for this bug, it still cann't make MANIFEST file on different platforms cross-platform? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7219] Unhelpful error message when a distutils package install fails due to a permissions error
higery shoulderhig...@gmail.com added the comment: I have run the 'test_install_lib' on cpython3.3(windows version), the 'test_install_error' failed. The detail is: *FAIL: test_install_error (__main__.InstallLibTestCase) -- Traceback (most recent call last): File D:\add-develop-command\Lib\distutils\tests\test_install_lib.py, line 112, in test_install_error cmd.run() AssertionError: DistutilsFileError not raised* The corresponding lines are: * with self.assertRaises(DistutilsFileError) as cm: cmd.run()* -- Added file: http://bugs.python.org/file23101/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7219 ___I have run the #39;test_install_lib#39; on cpython3.3(windows version), the #39;test_install_error#39; failed.brbrThe detail is: brbrbFAIL: test_install_error (__main__.InstallLibTestCase)br--br Traceback (most recent call last):br File quot;D:\add-develop-command\Lib\distutils\tests\test_install_lib.pyquot;, line 112, in test_install_errorbr   cmd.run()brAssertionError: DistutilsFileError not raised/bbr brThe corresponding lines are:brbbrwith self.assertRaises(DistutilsFileError) as cm:br       cmd.run()/bbr ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12678] test_packaging and test_distutils failures under Windows
higery shoulderhig...@gmail.com added the comment: higery: Would you have a bit of free time to help use here? Certainly yes. I have run the test_packaging.py, the main error message is about ValueError: path is on mount 'c:', start on mount 'D:'. One sample is: ERROR: test_uses (packaging.tests.test_database.TestDistribution) -- Traceback (most recent call last): File D:\add-develop-command\lib\packaging\tests\test_database.py, line 148, in setUp os.path.join(distinfo_dir, file))) File D:\add-develop-command\lib\packaging\tests\test_database.py, line 36, in record_pieces path = relpath(file, sys.prefix) File D:\add-develop-command\lib\ntpath.py, line 622, in relpath raise ValueError(error) ValueError: path is on mount 'c:', start on mount 'D:' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12678 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12678] test_packaging and test_distutils failures under Windows
higery shoulderhig...@gmail.com added the comment: For test_distutils.py, there is not an 'os.link()' function on Windows platform, so all the tests using this function will report error. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12678 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12678] test_packaging and test_distutils failures under Windows
higery shoulderhig...@gmail.com added the comment: Here we try to see the distutils test_sdist problem on 2.7. So sorry that there is not a developed cpython 2.7 on my pc, and my currently installed Python2.7 has not installed the _msi module, so the running of the tests does not work well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12678 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12394] packaging: generate scripts from callable (dotted paths)
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 way of scripts has nothing to do with the setup.cfg or setup.py, these two files are just different ways to offer configuration values. So just don't worry about that. What the I try to express here is : 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 /Doc directory), you will get to know that Packaging has a more further and important consideration - setup.cfg and setup.py place different roles in a project, setup.py offers developers to set while setup.cfg offers users to edit in a cheap and easy way... Certainly you can set anyone of these two files to reach the same goal. Just visit /Doc/build/html/packaging/configfile.html to know more about the different roles of these two configuration files. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12394] packaging: generate scripts from callable (dotted paths)
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 new-style scripts and old-style scripts will be built by distutils/setuptools. To support the old-style scripts generated by d*/s* in p*, we can use the resource system. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8668] Packaging: add a 'develop' command
Changes by higery shoulderhig...@gmail.com: Added file: http://bugs.python.org/file22932/af7d14ff129b.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8668] Packaging: add a 'develop' command
higery shoulderhig...@gmail.com added the comment: Through discussing inside or outside the mailing list on this bug tracker, current 'develop' has been made a kind of command other than an action. But there still isn't a consensus of the concrete implemention way, so I keep this command name as 'develop' and the simple usage of this command is : pysetup run develop BTW, most developers in this list have agreed that 'develop' is a kind of install command, so I also add an entry funtion 'install_editable' for it, like 'install_local_project' for the 'install_dist' command. In addition, current patch also supports several ways to run the 'develop' which is learned from the source code of install.py. When installing, there are three ways, '_run_packaging_install', '_run_setuptools_install', and '_run_distutils_install', so here for develop command, there are two ways, '_run_packaging_develop' and '_run_setuptools_develop'. You can know more through the source code and docs in this patch. BTW, should way convert the .egg-info directory to .dist-info directory? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8668] Packaging: add a 'develop' command
higery shoulderhig...@gmail.com added the comment: Alexis Metaireau ale...@notmyidea.org added the comment: I'm not sure why you're talking about it in the context of develop, can you clarify this? My consideration is : if in Packaging we always convert .egg-info directory to .dist-info directory, then my two different kinds of ways(setuptools' develop or packaging's develop) for the 'develop' command are unnecessary, we can just retain the new-style packaging's develop, which mean '_run_packaging_develop' function here. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8668] Packaging: add a 'develop' command
higery shoulderhig...@gmail.com added the comment: IOW, in my opinion, support for setuptools develop command is not needed in packaging core Then do you also mean support that for setuptools install is also not necessary in packaging core? and still be taken care directly be the users wanting to run python setup.py develop: I don't see any reason to make it avaible on the stdlib. I think the current implemention way of Packaging 'install' command just offers an executing router to run a proper 'install', which users doesn't need to know. It also the same to 'develop'. BTW, I think it's ok if setuptools is already installed when a user try to run 'python setup.py develop', if not, python will report error. In addition, Packaging use a different way to issue commands - cd to the source directory, and use 'pysetup run develop' to do the job. Old setup.py will be supported only by issuing commands under the source directory containing the setup.py, and if setuptools exists, Packaging will dispatch the job to it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12394] packaging: generate scripts from callable (dotted paths)
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12394] packaging: generate scripts from callable (dotted paths)
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' or 'win' option to support kind of 'gui_scripts' of setuptools. Here is a simple example to show these usecases, in setup.cfg: scripts = foo = a.b.c.main foowin = a.b.c.winmain -window Then a executable 'foo' file will be generated for Posix platform, console programm 'foo.exe' and window programm 'foowin.exe' files are generated for Windows platform. The 'window' option is just used to show that this entry is a kind of 'gui_scripts' entry to support gui programm wrappers generation. Now, there is an issue to consider when we make this change: 'scripts' belongs to the 'files' section in setup.cfg, it's still ok now to place it in 'files'? Still take the above example to say, 'foo=a.b.c.main' and 'foowin=a.b.c.winmain -window' are just dotted path strings to show main executable entry function, they are not existed files and are only just used to generate files. In addition, there are two kinds of configuration files supported in packaing - setup.py and setup.cfg, and both of them can exist in a project at the same time , and have different purposes for usage. setup.cfg just offers users a way to change the default configuration, so I think we should write the dotted strings in setup.py, do anyone agree with me? Then the above writting way of 'scripts' maybe changed... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12394] packaging: generate scripts from callable (dotted paths)
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 http://bugs.python.org/issue12394 ___div class=gmail_quoteblockquote class=gmail_quote style=margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;div class=im /divYou havenât set the git option for the diff commands in your config file.brbr/blockquotedivI have already set the option as you said earlier, but how to #39;push#39; it to remote repository? It#39;s just a configuration file under the .hg directory...br brbr br/div/div ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12394] packaging: generate scripts from callable (dotted paths)
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+ . -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12394] packaging: generate scripts from callable (dotted paths)
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12394] packaging: generate scripts from callable (dotted paths)
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 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12394] packaging: generate scripts from callable (dotted paths)
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12394] packaging: generate scripts from callable (dotted paths)
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 rep...@bugs.python.org http://bugs.python.org/issue12394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12394] packaging: generate scripts from callable (dotted paths)
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 already existing scripts field, in the files section. But they have different string syntax, old scripts field just uses a path string as a valid value, eg. 'demo/script.py', while our wrapper-scripts field uses a kind of '=' separated value, eg. 'hello=demo.script.main'. 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. OK. 2011/7/22, higery shoulderhig...@gmail.com: 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 rep...@bugs.python.org http://bugs.python.org/issue12394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12394] packaging: generate scripts from callable (dotted paths)
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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12394] packaging: generate scripts from callable (dotted paths)
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 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12394] packaging: generate scripts from callable (dotted paths)
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 instance, wrapper-scripts-entries = ['hello=demo.foo.bar:main'] There is only one entry named 'hello' in current setup.cfg, the 'demo.foo.bar' is the dotted module path, and the 'main' is the main function name which will be called to execute. Current patch can generte executable script with no extension on POSIX, and .exe file on Windows but have not yet added gui support. I also have another problem here looking for help: 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. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8668] Packaging: add a 'develop' command
higery shoulderhig...@gmail.com added the comment: ** After the package has been installed in-place (using the develop command), how does one identify it as an in development project (or in development mode)? -- Case 3 and 6 touch on this topic (case 3 is a little vague at this time), but doesn't explain what type of action is intended. So if we install in-place (aka, develop), how does the python interpreter find the package? Are we using PYTHONPATH at this point (which would be contradict a requirement in case 6)? There is an .egg-link file that will be used by pkg_resources to find the develop-installed packages, so my current implementation of develop command in packaging module also adds a .distinfo-link file in the site-packages which will be used to identify a project is installed in development mode or not. -- Added file: http://bugs.python.org/file22628/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___div class=gmail_quoteblockquote class=gmail_quote style=margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; ** After the package has been installed in-place (using the develop command), how does one identify it as an in development project (or in development mode)? -- Case 3 and 6 touch on this topic (case 3 is a little vague at this time), but doesn#39;t explain what type of action is intended. So if we install in-place (aka, develop), how does the python interpreter find the package? Are we using PYTHONPATH at this point (which would be contradict a requirement in  case 6)?br /blockquotedivbrThere is an .egg-link file that will be used by pkg_resources to find the develop-installed packages, so my current implementation of develop command in packaging module also adds a .distinfo-link file in the site-packages which will be used to identify a project is installed in development mode or not.br /div/divbr ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8668] Packaging: add a 'develop' command
higery shoulderhig...@gmail.com added the comment: 2011/7/12 Michael Mulich rep...@bugs.python.org Michael Mulich michael.mul...@gmail.com added the comment: The wiki page has been edited to note what the develop command will write to the file system. I'll restate it here as well... The develop command writes three pieces of information to the filesystem: 1. It calls upon the build action(s) to build the package relative to the package's root directory. 2. It calls the [build|install]_distinfo action to write the .dist-info metadata inside the build directory. (see also Issue 12279) 3. It adds the build directory's path to a .pth file. You are right, what you listed above are also the things done by the 'develop' command of my current implementation. In addition, as I replied earlier, we can also add a .distinfo-link file more than the .pth file. -- Added file: http://bugs.python.org/file22630/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___brdiv class=gmail_quote2011/7/12 Michael Mulich span dir=ltrlt;a href=mailto:rep...@bugs.python.org;rep...@bugs.python.org/agt;/spanbrblockquote class=gmail_quote style=margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; br Michael Mulich lt;a href=mailto:michael.mul...@gmail.com;michael.mul...@gmail.com/agt; added the comment:brbr The wiki page has been edited to note what the develop command willbr write to the file system. I#39;ll restate it here as well...br br The develop command writes three pieces of information to the filesystem:br  1. It calls upon the build action(s) to build the package relative tobr the package#39;s root directory.br  2. It calls the [build|install]_distinfo action to write thebr .dist-info metadata inside the build directory. (see also Issue 12279)br  3. It adds the build directory#39;s path to a .pth file.br/blockquotedivbrYou are right, what you listed above are also the things done by the #39;develop#39; command of my current implementation. In addition, as I replied earlier, we can also add a .distinfo-link file more than the .pth file.br /div/div ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8668] Packaging: add a 'develop' command
Changes by higery shoulderhig...@gmail.com: Removed file: http://bugs.python.org/file22630/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8668] Packaging: add a 'develop' command
Changes by higery shoulderhig...@gmail.com: Added file: http://bugs.python.org/file22632/2750cd9e2111.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8668 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12344] A kind of 'reinitialize_command' function which can initialize a command with key-value pair should be added for Command class
Changes by higery shoulderhig...@gmail.com: -- hgrepos: +28 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12344] A kind of 'reinitialize_command' function which can initialize a command with key-value pair should be added for Command class
higery shoulderhig...@gmail.com added the comment: But can the get_reinitialized_command function reinitialize a command with a key-value pair? e.g. reinitialize_command('build_ext', inplace=1) BTW,how to set the repository URI? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12344] Add **kwargs to get_reinitialized_command
higery shoulderhig...@gmail.com added the comment: No, that’s why I did not close this report but asked you if you could make a patch to update this method. OK, I think I can try to fix it later. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12344] Add **kwargs to get_reinitialized_command
Changes by higery shoulderhig...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file22390/6b68c2835d6e.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12344] Add **kwargs to get_reinitialized_command
higery shoulderhig...@gmail.com added the comment: Not yet tested. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12344] A kind of 'reinitialize_command' function which can initialize a command with key-value pair should be added for Command class
New submission from higery shoulderhig...@gmail.com: There is a 'reinitialize_command' function in setuptools' command class which can initialize a command with a key-value pair, but it seems that distutils2/packaging does not yet have this function. I think it's useful in the condition that we want to run some commands with some options initialized. For instance, if we want to run 'build_ext' command with its 'inplace' option initialized, we can use : self.reinitialize_command('build_ext', inplace=1), and then self.run_command('build_ext') . -- assignee: tarek components: Distutils2 messages: 138409 nosy: alexis, eric.araujo, higery, tarek priority: normal severity: normal status: open title: A kind of 'reinitialize_command' function which can initialize a command with key-value pair should be added for Command class type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12344 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
higery shoulderhig...@gmail.com added the comment: OK. I recreated a full version patch. I'll remove old patches. -- Added file: http://bugs.python.org/file22333/change_path_separator_fullversion.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
Changes by higery shoulderhig...@gmail.com: Removed file: http://bugs.python.org/file21713/change_path_separator_in_MANIFEST.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
Changes by higery shoulderhig...@gmail.com: Removed file: http://bugs.python.org/file22328/test_manifest_reading_sdist.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12279] Add build_distinfo command to packaging
higery shoulderhig...@gmail.com added the comment: Higery: Michael is willing to work with you on this bug. OK. :) -- Added file: http://bugs.python.org/file22334/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12279 ___brdiv class=gmail_quoteblockquote class=gmail_quote style=margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex; Higery: Michael is willing to work with you on this bug.br/blockquotedivbrOK. :)br/div/div ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12279] Add build_distinfo command to packaging
Changes by higery shoulderhig...@gmail.com: Removed file: http://bugs.python.org/file22334/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12279 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
Changes by higery shoulderhig...@gmail.com: Removed file: http://bugs.python.org/file21725/test_manifest_reading_sdist.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
Changes by higery shoulderhig...@gmail.com: Removed file: http://bugs.python.org/file21764/test_manifest_reading_sdist_v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
higery shoulderhig...@gmail.com added the comment: I just recreated this patch against version 2.7, so I'm not sure it can be applied to all the listed versions. Note: there still are two pathes, one for sdist.py and another for test_sdist.py -- Added file: http://bugs.python.org/file22328/test_manifest_reading_sdist.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12279] Add build_distinfo command to packaging
higery shoulderhig...@gmail.com added the comment: Now, the workaround of my code is just setting the 'distinfo-dir' option with os.curdir value through calling a 'reinitialize_command(self, command, reinit_subcommands=False, **kw)' function , which is added in packaging's Command class for my own purpose, but I think it should be taken as a standard function in Command - it's useful and setuptools' Command class does have this function. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12279 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
Changes by higery shoulderhig...@gmail.com: Added file: http://bugs.python.org/file21764/test_manifest_reading_sdist_v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
higery shoulderhig...@gmail.com added the comment: I'm not sure it is necessary to use TempdirManager here to write tests for MANIFEST reading. Well, the sdist command has to run on some directory where some files exist, right? So it’s better to do it in a temp dir that will automatically get cleaned up. Because the MANIFEST file finally will be filled with file-paths which takes '/' as path separator and that's what we can make sure if we already hacked the write_manifest function in sdist.py, so we can just write the imitated paths strings into the MANIFEST file , not needing to really create these files at first. As a test, it makes sense. So, I think we maynot need to use TempdirManager here. Bad effect is MANIFEST file will be re-written: You should read the docs for MANIFEST and sdist: a MANIFEST without the magic comment will not get overwritten (unless there’s a bug :) Oh, you are right. Thus this bad effect would not exist for this test. But future discussing is still needed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
Changes by higery shoulderhig...@gmail.com: Removed file: http://bugs.python.org/file21697/change_path_separator_in_MANIFEST.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
Changes by higery shoulderhig...@gmail.com: Added file: http://bugs.python.org/file21713/change_path_separator_in_MANIFEST.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
higery shoulderhig...@gmail.com added the comment: I'm not sure it is necessary to use TempdirManager here to write tests for MANIFEST reading. The attachment is the test diff file against my last patch with the latest version. Detail: Step 1: Write sample MANIFEST strings to the MANIFEST file with '/' as separator and get the filelist of this file(actually just created from the sample strings) Step 2: Change the os.sep to '\' and then run the sdist command, and a FileList will be generated. Bad effect is MANIFEST file will be re-written: write_manifest function called(method calling route: run-get_file_list-write_manifest). Because the content in MANIFEST has already been changed, we can just use the FileList object to get the filelist, instead of construct it from reading MANIFEST file again as other tests do. Step 3: Compare filelist_1 generated in Step1 with filelist_2 in Step2, making sure that we have replace '\' with '/' for filelist_2. Yes, we just compare the content to make sure that we has done right thing and reading MANIFEST file with '/' as separator on the platform which os.sep is '\' is ok. That's all. -- Added file: http://bugs.python.org/file21725/test_manifest_reading_sdist.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
Changes by higery shoulderhig...@gmail.com: Removed file: http://bugs.python.org/file21691/change_path_separator_in_MANIFEST.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
Changes by higery shoulderhig...@gmail.com: Added file: http://bugs.python.org/file21697/change_path_separator_in_MANIFEST.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
Changes by higery shoulderhig...@gmail.com: Removed file: http://bugs.python.org/file21667/test_sdist.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
higery shoulderhig...@gmail.com added the comment: It may be just necessary to hack the write_manifest funtion in sdist.py- replace all '\' in MANIFEST with '/', thus it will not have other bad side effects, for instance, it would not change the content of self.filelist and people can also use '/' in MANIFEST template file on windows as usual. -- Added file: http://bugs.python.org/file21691/change_path_separator_in_MANIFEST.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
higery shoulderhig...@gmail.com added the comment: Yes, the test fails and the output msg is: AssertionError: '\\' unexpectedly found in '# file GENERATED by distutils, do NOT edit\nREADME\nsetup.py\nsomecode\\__init__.py\n' It means that distutils generates MANIFEST with '\' as file path separator. OK, I'll try to make the diff and patch against the dev environment to fix this bug ASAP. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
higery shoulderhig...@gmail.com added the comment: OK. I used this method just because I thought '\' is a special character and if it's in a file path line, then it must be the separator. As you say, it may be not that clear for others to know what does this test do. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
higery shoulderhig...@gmail.com added the comment: I will join GSOC2011 and I find this bug is a good test for me to submit my patch as a scoring judgment. I have created a diff file to confirm this bug, but setuptools may have already fix it, because when using 'python setup.py sdist' to create the source distribution, file paths in SOURCES.txt are correctly with '/' as separator. However, when running the test_sdist.py tests, the problem Jeremy raised exists. So, it means that distutils still has this problem, but setuptools fix it. -- keywords: +patch nosy: +higery Added file: http://bugs.python.org/file21667/test_sdist.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com