New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to ignore or substitute ~/.pydistutils.cfg #45521
Comments
It would be useful if setup.py instances had an option to ignore |
I'm working on this (at the pycon sprint). |
The attached patch implements a command-line option to disable loading After talking to Martin Loewis, I decided not to implement the override The hard part was writing tests, since the existing code was untested |
That is up to you of course, and being able to ignore is better than Thanks for your work on this patch. At least being able to use |
We thought that the added value for specifying another configuration Out of curiosity: what kinds of settings do you put into the |
Here's an example of a configuration file I use: ==== [install] [easy_install] I am installing software on a filesystem that is shared between I don't want to be a pain, if the --no-user-cfg can go in sooner, that |
Here's an alternate patch that uses a bit of dependency injection to I also added a line about the new option in Doc/install/index.rst. Since I don't have checkin privileges, I will stop here. Can somebody |
Both versions of the patch have a problem, in that the Distribution |
Phillip, thanks, I missed that script_args is always passed by We can't check for it in Distribution.parse_command_line() because that |
and here's the revised version of the dependency-injection approach. |
I much prefer the simpler of the two patches - better to monkeypatch in By the way, the patch could be simpler if you just made the "if 'HOME' Personally, my vote is to keep the monkeypatching in the tests and make |
Phillip, here's another revision of the monkeypatch-in-setUp() approach, |
It looks like you can drop the change to distutils.core, too, since |
In what way is the comment in core.py inaccurate? I only added the |
Oh, I thought you meant that it overrides *which* config files -- |
Is this going to make the 2.6 release? The lack of this option causes |
Formally, the beta deadline has passed, so no new features can be |
I'm good with it; the issue with the comment in core.py was my only |
Whatever happened with this? I don't see it mentioned in the NEWS file |
Unfortunately, it missed the deadlines (i.e. nobody checked it in in |
Any update? |
I am taking over this issue (I am figuring out you are OK with this |
I've simplified the tests so they just check that [.]pydistutils.cfg is I've also made sure the option is just looked in the global options, Done in r75893 and r75895. Thanks a lot Paul ! |
The --no-user-cfg option works for me in Python 2.7, but it does not seem to be in Python 3.2 or 3.3:
Am I doing something wrong, or was this feature only added to Python 2.7? |
Andrew, comments to closed issues are usually ignored. I suggest you open a new issue about this. A quick glance suggests that the code for this feature is not in Python 3. It may be that it was lost when, during the 2.7 development cycle, it was decided to not allow new features to Distutils and a number of changes were reverted. There have been some other cases of Distutils changes that were lost in Python 3.2+ because of this. |
Confirmed - and to be included in bpo-19544. |
Here's a patch to restore the --no-user-cfg switch to 3.4. If someone will take a quick look at the patch for sanity, I can apply it. |
Patch looks good to me. |
New changeset c35311fcc967 by Andrew Kuchling in branch 'default': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: