Commit Graph

104 Commits

Author SHA1 Message Date
Donald Stufft 95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Pradyun S. Gedam 86777f1d48 Move file-paths into pip.locations 2017-05-20 12:52:01 +05:30
Pradyun S. Gedam 1832569530 Sort all imports 2017-05-16 15:47:47 +05:30
Paul Moore 048dacde21 Ensure USER_SITE is set by calling getusersitepackages() 2017-04-12 19:36:11 +01:00
Donald Stufft 16944a6341 Work around a bug in PyPy's sysconfig module 2017-03-18 20:13:28 -04:00
Donald Stufft 310bcfc78f Fix API differences between distutils.sysconfig and sysconfig 2017-03-18 15:08:41 -04:00
Donald Stufft 904fcf1f17 Use sysconfig instead of distutils.sysconfig 2017-03-18 14:52:13 -04:00
Lipis d86d171364 OS X -> macOS (#4074) 2016-11-06 12:24:43 -05:00
Donald Stufft c77d4ab55e Stop trying to locate system trust stores
We started trying to locate the system trust stores, because
downstream was patching out our bundled copies anyways and it would
provide a smoother experience when people upgraded their pip inside
of their system.

However, if we just use OpenSSL's CAFile then we're broken on systems
like Debian which currently ship a broken CAFile configuration. If
we just use OpenSSL's CAPath then we're broken on systems like CentOS
and Fedora that currently are shipping a broken OpenSSL CAPath.

So basically, none of the major distributions seem to be capable of
shipping an OpenSSL that isn't broken, so we're going back to relying
on our own CA bundle exclusively.
2016-01-21 16:19:34 -05:00
Donald Stufft 85fc78b558 Support CAPaths in addition to CAFiles 2016-01-20 07:32:19 -05:00
Donald Stufft d966eb9735 Use ssl.get_default_verify_paths() to get the system CABundle 2016-01-19 00:57:45 -05:00
Xavier Fernandez fec74b29c0 Fix test_locations unit tests on windows 2016-01-17 22:40:46 +01:00
Xavier Fernandez f1b1061fc3 Fix assert message
- use python 2.6 compatible syntax
- add missing {}
2016-01-02 17:06:55 +01:00
Xavier Fernandez 48e89adba7 Ignore again distutils prefix when using --user
Was initially introduced in b227c45a7
But accidentaly removed in 7270d272f
2015-12-17 00:15:57 +01:00
Marcus Smith ca47dc9949 Merge pull request #3252 from domenkozar/install/prefix
Support pip install --prefix
2015-11-26 09:30:20 -08:00
Domen Kožar 7270d272f4 Make sure --user and --prefix install flags conflict 2015-11-22 19:23:22 +01:00
Domen Kožar e14a66f1b9 Support --prefix argument to install command.
There was no way to override prefix for an installation for wheels
previously. The default it whatever sys.prefix points to.
2015-11-22 19:13:51 +01:00
Andy Freeland 73a439ea66 Add pip.compat.expanduser to workaround http://bugs.python.org/issue14768 2015-09-29 16:01:32 -04:00
Xavier Fernandez f2ed6fcdc5 Remove unused __get_username function 2015-09-11 17:45:57 +02:00
Donald Stufft cc7f416378 Merge pull request #3037 from ianw/no-reset-platlib
Don't reset purelib/platlib when install-dir not set
2015-08-19 17:27:21 -04:00
Ian Wienand d871bcd1bb Don't reset purelib/platlib when install-dir not set
Change 3affcaa2b8 attempts to reset
purelib & platlib to any "install-dir" specified by the user in
setup.cfg.  This code is used when we are installing wheels.

The problem with this is that distutils is *always* setting
"i.install_lib" -- even when the user specifies nothing.  This has the
result of unconditionally setting purelib == platlib.

On some systems this results in .so's from the wheel getting installed
into /usr/lib/python2.7 (purelib) rather than /usr/lib64/python
(platlib).  Because distribution-packaged libraries have installed
their .so into platlib, we can now have a situation where the new
pip-installed library is picking up an old .so from the distro package
... with predictably bad results.

This takes the approach of checking the configuration to see if the
user has overridden install-dir and only resetting the paths if they
have.  The override case is covered by existing test-cases.

Closes #2940
2015-08-19 14:56:53 +10:00
James Polley b227c45a7b Ignore distutils prefix when using --user
Fixes bug #2683

There are two changes here; one to fix the using-wheels codepath and one
to fix the no-wheels codepath. Two tests are introduced, one to test
each codepath.
2015-06-26 19:08:45 +10:00
Donald Stufft 7288475118 We no longer need to handle a static build directory 2015-04-07 04:20:51 -04:00
Ionel Cristian Mărieș ae41fe2866 Fix import so exception module is accesible. With the previous import `pip` module wouldn't have any `exceptions` attribute as it's __init__ doesn't actually import it. Fixes the confusing error message from #2067. 2014-12-22 16:53:16 -05:00
Donald Stufft 5b817f960b --isolated should isolate from ~/.pydistutils.cfg as well 2014-12-11 11:51:06 -05:00
Xavier Fernandez b713e96df2 cleanup: use "with open()" to open files 2014-10-18 20:41:18 +02:00
Donald Stufft f63d1e3abb Implement platform specific user config locations 2014-09-10 11:43:34 -04:00
Donald Stufft 8e0ec8d293 Move appdirs from pip.appdirs to pip.utils.appdirs 2014-09-10 10:40:22 -04:00
Donald Stufft 767d11e49c Switch to using the stdlib logger instead of pip.log 2014-09-10 09:36:09 -04:00
Donald Stufft 89fc318113 Merge pull request #1897 from paweljasinski/ironpython
detect windows when running under IronPython
2014-08-30 13:48:45 -04:00
Matthew Einhorn 4baca82181 Replaces spaces in username.
Conflicts:
	pip/locations.py
2014-08-29 21:12:04 -04:00
Richard Jones aedca3c842 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
2014-08-22 14:26:41 +10:00
Pawel Jasinski 6e1abb91aa detect windows when running under IronPython 2014-08-12 02:26:24 +02:00
Donald Stufft 4a8173c4ed Fix #1680 - Use System SSL Certificates if Available 2014-06-12 23:10:00 -04:00
Matthew Iversen dcb0ee0702 Move backwardcompat package to compat module 2014-05-14 13:10:06 +10:00
Donald Stufft 52ca02608e Use CacheControl instead of custom cache code
* Deprecates the --download-cache option & removes the download
  cache code.
* Removes the in memory page cache on the index
* Uses CacheControl to cache all cacheable HTTP requests to the
  filesystem.
  * Properly handles CacheControl headers for unconditional
    caching.
  * Will use ETag and Last-Modified headers to attempt to do a
    conditional HTTP request to speed up cache misses and turn
    them into cache hits.
  * Removes some concurrency unsafe code in the download cache
    accesses.
  * Uses a Cache-Control request header to limit the maximum
    length of time a cache is valid for.
* Adds pip.appdirs to handle platform specific application
  directories such as cache, config, data, etc.
2014-05-09 18:28:20 -04:00
Matthew Iversen 5d30c43fff Add back `user_site` for locations and util 2014-04-16 07:59:56 +10:00
Matthew Iversen bcc1a4018c Move site.USER_SITE and sysconfig out of backwardcompat
2.6 always has these now :D
2014-04-16 06:13:08 +10:00
Donald Stufft 5a76a47d3b Fix code to handle the latest flake8 2014-03-26 18:24:19 -04:00
schlamar 3affcaa2b8 install_lib should take precedence when reading distutils config. 2014-03-13 20:19:26 +01:00
Donald Stufft 95035fc5c4 Turn on everything in flake8
flake8 ignores some errors by default, these ignored by defaults
change sometimes. This will make things stabler by selecting
everything.
2014-02-24 16:52:23 -05:00
Donald Stufft 2743768b7b Fix the style of the code base to better match pep8 2014-01-27 14:11:29 -05:00
Donald Stufft e68986c734 Find the virtual environments created by Python3.3 2013-12-19 23:42:32 -05:00
Marcus Smith f53befcd99 merge from 1.5.X 2013-12-08 15:24:42 -08:00
Paul Moore 884861f390 Added a virtualenv-specific configuration file 2013-12-04 13:04:54 +00:00
Marcus Smith 861023bc0d uninstalling --user dists should leave global scripts alone 2013-11-29 17:08:43 -08:00
Marcus Smith 1d1aaa9058 fix for certain platforms/versions not having `os.O_NOFOLLOW` 2013-11-24 15:26:22 -08:00
Marcus Smith ab21c1de32 `pip.locations.distutils_scheme` should read distutils config files 2013-11-04 23:40:26 -08:00
Donald Stufft 00c11deb25 Ensure that --root continues to work with Wheels 2013-10-31 08:49:23 -04:00
Donald Stufft 97507f8931 Make Wheel respect --root 2013-10-30 08:19:39 -04:00