[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: Just checking to see if anything else is needed from me on this. -- ___ Python tracker <http://bugs.python.org/issue17732> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: Éric, Fixed the mention of packages, and made a frozenset of ignore_options. Think this thing is ready to go. I have tested it, and it does the trick. Thanks for helping me get this patch merged in. -- Added file: http://bugs.python.org/file29976/distutilsvenv.patch ___ Python tracker <http://bugs.python.org/issue17732> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: Here is another update. It has come to my attention that I missed some options: prefix, exec-prefix, home, user and root These have been added, and the docs and test have been updated to reflect the change. -- Added file: http://bugs.python.org/file29940/distutilsvenv.patch ___ Python tracker <http://bugs.python.org/issue17732> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: Responded to comments with an updated patch. Thanks for all the feedback, and sorry for the silly mistakes. Should have read up more thoroughly on the docs style guide and the terminology. Hopefully the latest patch is ready to go (or at least, nearly so). -- Added file: http://bugs.python.org/file29939/distutilsvenv.patch ___ Python tracker <http://bugs.python.org/issue17732> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: Any feedback on this latest patch? -- ___ Python tracker <http://bugs.python.org/issue17732> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: Whoops. One of the options I had in my list doesn't actually exist. Here is yet another update. -- Added file: http://bugs.python.org/file29889/distutilsvenv.patch ___ Python tracker <http://bugs.python.org/issue17732> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: That is, errors that pre-existed my patch. -- ___ Python tracker <http://bugs.python.org/issue17732> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: Here is an updated patch with documentation changes and a new test. 5 tests in distutils have errors. I have left those alone for now. -- Added file: http://bugs.python.org/file29888/distutilsvenv.patch ___ Python tracker <http://bugs.python.org/issue17732> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: My thought was that perhaps there will be other circumstances where we may want to ignore options in the future. The idea was that by providing an ignore_options list that can be extended, multiple conditions with different sets of options can be stacked together easily. I was thinking a set might actually be an even better choice than a list. Would love feedback on this approach. Am I over-designing for an unlikely case? I'm happy to use Vinay's suggestion if we don't think it is worth it to consider possible future conflicts with distutils.cfg options. If there is any reason a set would be worse to use, let me know, otherwise my next patch will use a set rather than a list. Another question: should I be checking which config file these come from, or ignoring all occurrences of these options? Seems like setup.cfg at the very least shouldn't have any restrictions. Possibly ~/.pydistutils.cfg too. I'll review tests to see if this necessitates any changes, add a new test that covers this, and I'll make a note in the docs. -- ___ Python tracker <http://bugs.python.org/issue17732> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: On second thought, there is probably no good reason to ignore the build-* settings. Here is an updated patch. -- Added file: http://bugs.python.org/file29873/distutilsvenv.patch ___ Python tracker <http://bugs.python.org/issue17732> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: Here is a patch that seems to fix the problem. It simply short-circuits distutils options that change directories. This is my first python patch ever, so I'm eager for comments. Is this the right approach? -- keywords: +patch Added file: http://bugs.python.org/file29870/distutilsvenv.patch ___ Python tracker <http://bugs.python.org/issue17732> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: That's along the lines of what I've been thinking as I dig into this. I'd love to take a stab at a patch for this if no one else has done so already. -- ___ Python tracker <http://bugs.python.org/issue17732> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
Nick Sloan added the comment: It looks like virtualenv includes an empty distutils.cfg at myvirtualenv/lib/python3.3/distutils/distutils.cfg. Most of myvirtualenv/lib/python3.3 is just symlinked to the base python version, but myvirtualenv/lib/python3.3/distutils/ is not, and I bet this is exactly why. -- ___ Python tracker <http://bugs.python.org/issue17732> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17732] distutils.cfg Can Break venv
New submission from Nick Sloan: When distutils.cfg defines an install-lib, it will be used within virtual environments created using venv as well, which makes it impossible to install things with setup.py or similar. Steps to reproduce: Create a distutils.cfg file and set a value for install-lib. Create a virtual environment: $pyvenv myvenv Activate that environment: $source myvenv/bin/activate Attempt to install something: $python distribute_setup.py It will attempt to install in the lib-install directory, and should fail with an error that the directory is not on the python path. This issue affects python3 from the mac homebrew project, which bundles a distutil.cfg, thus breaking pyvenv by default. -- assignee: eric.araujo components: Distutils messages: 186942 nosy: eric.araujo, nicksloan, tarek priority: normal severity: normal status: open title: distutils.cfg Can Break venv type: behavior versions: Python 3.3 ___ Python tracker <http://bugs.python.org/issue17732> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com