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

Implement site-wide configuration settings #1978

Merged
merged 1 commit into from Aug 22, 2014

Conversation

Projects
None yet
5 participants
@r1chardj0n3s
Member

r1chardj0n3s commented Aug 15, 2014

  • add site_config_dirs() to appdirs to determine locations across OSes
  • add system_config_files to locations.py
  • add system_config_files to get_config_files() and re-order files entries to correct precedence
  • document changes to configuration files in user guide

Closes #309

Show outdated Hide outdated pip/appdirs.py Outdated
Show outdated Hide outdated pip/locations.py Outdated
@dstufft

This comment has been minimized.

Show comment
Hide comment
@dstufft

dstufft Aug 15, 2014

Member

Couple comments but this otherwise looks really good to me.

Member

dstufft commented Aug 15, 2014

Couple comments but this otherwise looks really good to me.

@pfmoore pfmoore referenced this pull request Aug 21, 2014

Closed

Standardize our Paths #1733

Implement site-wide configuration settings
* add site_config_dirs() to appdirs to determine locations across OSes
* add system_config_files to locations.py
* add system_config_files to get_config_files() and re-order files entries to correct precedence
* document changes to configuration files in user guide

Closes #309
@r1chardj0n3s

This comment has been minimized.

Show comment
Hide comment
@r1chardj0n3s

r1chardj0n3s Aug 22, 2014

Member

Resubmitted with the Windows change in place.

Member

r1chardj0n3s commented Aug 22, 2014

Resubmitted with the Windows change in place.

@pfmoore

This comment has been minimized.

Show comment
Hide comment
@pfmoore

pfmoore Aug 22, 2014

Member

👍 Looks good!

Member

pfmoore commented Aug 22, 2014

👍 Looks good!

@Ivoz

This comment has been minimized.

Show comment
Hide comment
@Ivoz

Ivoz Aug 22, 2014

Member

I (still) think we should do away with having different file extensions for the different OSes. Somewhat arbitrary, but I think Windows systems should also default to reading pip.conf. Of course if pip.ini already exists on a Windows system, read that instead. This way, especially in virtualenvs, you don't need to know what OS you're on in order to store the correct filename.

A use case would be someone storing a pip.conf in a repository designed to be checked out with a virtualenv active and telling pip to fetch from a custom index. With the current design, they'd need to do something finicky like storing a symlink or two identical files only differing by extension, to make sure the repository works from scratch on any OS.

Member

Ivoz commented Aug 22, 2014

I (still) think we should do away with having different file extensions for the different OSes. Somewhat arbitrary, but I think Windows systems should also default to reading pip.conf. Of course if pip.ini already exists on a Windows system, read that instead. This way, especially in virtualenvs, you don't need to know what OS you're on in order to store the correct filename.

A use case would be someone storing a pip.conf in a repository designed to be checked out with a virtualenv active and telling pip to fetch from a custom index. With the current design, they'd need to do something finicky like storing a symlink or two identical files only differing by extension, to make sure the repository works from scratch on any OS.

@pfmoore

This comment has been minimized.

Show comment
Hide comment
@pfmoore

pfmoore Aug 22, 2014

Member

I don't disagree, but for this PR (which only adds a machine-wide file) we should be consistent with what's there already. When we change the user-specific filename, we should change this one to match, but let's be consistent for now.

I know that means we need to consider migration in both places, but I don't think that's a big enough issue to delay this PR.

Member

pfmoore commented Aug 22, 2014

I don't disagree, but for this PR (which only adds a machine-wide file) we should be consistent with what's there already. When we change the user-specific filename, we should change this one to match, but let's be consistent for now.

I know that means we need to consider migration in both places, but I don't think that's a big enough issue to delay this PR.

@dstufft

This comment has been minimized.

Show comment
Hide comment
@dstufft

dstufft Aug 22, 2014

Member

I agree with @pfmoore, let's keep this PR focused.

Member

dstufft commented Aug 22, 2014

I agree with @pfmoore, let's keep this PR focused.

dstufft added a commit that referenced this pull request Aug 22, 2014

Merge pull request #1978 from r1chardj0n3s/system-config-file
Implement site-wide configuration settings

@dstufft dstufft merged commit 8b505a3 into pypa:develop Aug 22, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@jakul

This comment has been minimized.

Show comment
Hide comment
@jakul

jakul Aug 22, 2014

Thank you @r1chardj0n3s ❤️

jakul commented Aug 22, 2014

Thank you @r1chardj0n3s ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment