1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

3815 commits

Author SHA1 Message Date
Donald Stufft c85f1d6ff1 Merge pull request #2616 from rbtcollins/issue-2478
Issue #2478: Topological installation order
2015-03-31 20:17:48 -04:00
Robert Collins 17352765f0 Issue #2478 - topological install order.
This is needed for setup-requires, since without it its possible
to cause installation to fail in sort-circuit scenarios such as
the added functional test case demonstrates.
2015-04-01 12:33:17 +13:00
Robert Collins c9f451aa21 Make a helper function for adding requirements
This is for reuse in the declarative requires patch.
2015-04-01 09:00:42 +13:00
Robert Collins 611f04096b Issue #2260: Resolve unnamed dependencies first.
On its own, this is a fix for a regression vs master, as it passes
tests. It is needed for topological handling, as we need to build a
dependency graph, and can't do that without resolving unnamed -> named
dependencies before adding the depended-on requirements.
2015-04-01 09:00:42 +13:00
Marcus Smith a15e57b346 Merge pull request #2614 from xavfernandez/find_all_versions_by_project_name
Find all versions by project name
2015-03-31 07:21:03 -07:00
Xavier Fernandez e6a249b9ac Prefer project_name to req_name 2015-03-27 17:44:29 +01:00
Xavier Fernandez 1683f2caf6 PackageFinder._find_all_versions only needs the project_name 2015-03-27 17:38:50 +01:00
Xavier Fernandez 8bff8b5411 PackageFinder._get_index_urls_locations only needs req_name
and InstallRequirement does not need its url_name property anymore
2015-03-27 17:31:05 +01:00
Xavier Fernandez 02c6d2117e PackageFinder._get_pages only needs a req_name
and normalize_name already performs lower()
2015-03-27 17:05:39 +01:00
Xavier Fernandez 8daaf67c31 _find_url_name does not need a req arg anymore
it's always called with url_name=req.url_name and its req arg is only
used to get req.url_name
2015-03-27 16:46:27 +01:00
Xavier Fernandez 9fcda74012 PackageFinder._get_page does not accept req anymore 2015-03-27 16:42:22 +01:00
Xavier Fernandez 1e89191909 HTMLPage.get_page does not accept a req anymore
This removes the "Will skip URL %s when looking for download links for %s" log.
2015-03-27 16:40:37 +01:00
Marcus Smith 47963aec7f Merge pull request #2577 from msabramo/test_install_less_deps_2
Less network deps in test_install
2015-03-23 19:46:26 -07:00
Donald Stufft 610db0c1fb Merge pull request #2587 from rbtcollins/develop
More refactoring of req_set
2015-03-23 22:36:59 -04:00
Robert Collins 90c185fe81 Introduce a factory function for DistAbstraction.
This allows introducing detection logic for different sources of source trees.
2015-03-24 14:47:47 +13:00
Robert Collins 1aa1498409 Remove a confusing if block.
We had what looked like buggy code - nothing happening when link is false - but
actually link is always true by that point.
2015-03-24 14:47:47 +13:00
Robert Collins 05d654a2e8 Split out the installed case for AbstractDistribution
This makes the code in IsSDist a bit simpler.
2015-03-24 14:47:47 +13:00
Robert Collins 06dba3380e Document a quirk of reporting. 2015-03-24 14:47:47 +13:00
Robert Collins daef5b1220 Localise more_reqs a little. 2015-03-24 14:47:47 +13:00
Robert Collins 9f17fe2618 Document requirements for installable things. 2015-03-24 14:47:47 +13:00
Robert Collins 9b40f0391a Factor out source_dir assignment for editables.
This is a small change to make prepare_file easier to read. It is slightly
complicated by the round-about way it was being assigned in non-editable cases.
2015-03-24 14:47:47 +13:00
Robert Collins 587f1f927b Explain the DistributionNotFound case more clearly.
Still need to chat with dstufft on that.
2015-03-24 14:47:47 +13:00
Robert Collins fd05fb62f8 Pull out into a method the upgrade check.
This is now isolated enough to sanely factor out. Yay.
2015-03-24 14:47:47 +13:00
Robert Collins c30af314cc Consolidate upgrade logic somewhat.
We had several overly-scope variables in prepare_files which weren't needed.

install is fully modelled by satisfied_by, if we move some logic into the right
guarded conditions, which this does.

not_found was already obsolete.

best_installed really only needed to exist and be checked within the
index-consulting upgrade block.
2015-03-24 14:46:23 +13:00
Robert Collins 3e1d7a301c Docstring layout fix. 2015-03-24 14:46:23 +13:00
Robert Collins 7054a3d18e Note about possible cleanup of download_dir and wheel_download_dir. 2015-03-24 14:46:23 +13:00
Robert Collins 23e55948f8 Don't log about extras when ignoring dependencies.
It makes no sense to say we're doing something we're not.
2015-03-24 14:46:23 +13:00
Robert Collins dd3afd20ec Cleanup link handling in req_set.
* Move the caching of find_requirement into find_requirement.

* Move the decision to set / not-set link into InstallRequirement.
2015-03-24 14:46:23 +13:00
Donald Stufft 79c7662700 Merge pull request #2593 from msabramo/RequirementSet_repr
Add RequirementSet.__repr__
2015-03-23 20:06:55 -04:00
Donald Stufft 3e6bc99d21 Merge pull request #2598 from offby1/develop
Update user_guide.rst
2015-03-23 20:06:16 -04:00
Marcus Smith df785551ce Merge pull request #2583 from msabramo/test_install_package_with_target
test_install_package_with_target: No network
2015-03-23 06:38:40 -07:00
Marc Abramowitz 291bb12d07 test_install_package_with_target: No network
and also fix intermittent failures reported in
https://github.com/pypa/pip/issues/2580
2015-03-22 23:09:38 -07:00
Eric Hanchrow b3c73c32a0 Update user_guide.rst
Fix typo: the example at the end is for _installing_ a bundle, not _uninstalling_ it
2015-03-22 17:03:04 -07:00
Donald Stufft 707e889f6e Merge pull request #2595 from msabramo/updated_cachecontrol_to_0.11.2
Update cachecontrol from 0.11.1 to 0.11.2
2015-03-22 14:35:43 -04:00
Marc Abramowitz cc9cf3b05a Update cachecontrol from 0.11.1 to 0.11.2
Fixes https://github.com/pypa/pip/issues/2481
2015-03-22 11:11:57 -07:00
Marcus Smith 0eccd5031a update changelog for #2552 2015-03-22 08:40:01 -07:00
Marcus Smith 39ae3c3459 Merge pull request #2552 from takluyver/uninstall-symlinks
Don't follow symlinks when uninstalling files
2015-03-22 08:36:10 -07:00
Marc Abramowitz 083b8770c5 Add RequirementSet.__repr__
This is useful when exploring with pdb -- e.g.:

    (Pdb++) requirement_set
    <RequirementSet object; 17 requirement(s): coverage==3.7.1, dj-database-url==0.2.2, dj-static==0.0.5, Django==1.6.2, django-nose==1.2, django-toolbelt==0.0.1, flake8==2.1.0, gunicorn==18.0, mccabe==0.2.1, nose==1.3.0, pep8==1.4.6, psycopg2==2.5.2, pyflakes==0.7.3, selenium==2.39.0, South==0.8.4, static==0.4, wsgiref==0.1.2>
2015-03-20 16:20:41 -07:00
Thomas Kluyver b5d84a0dba Fix monkeypatching of is_local() 2015-03-20 16:18:43 -07:00
Thomas Kluyver 94c63a78c1 Fix pep8 in tests again 2015-03-20 16:18:33 -07:00
Thomas Kluyver 068dfd7bd9 Simplify tests using pytest fixtures 2015-03-20 16:09:34 -07:00
Paul Moore b7f0472e4d Merge pull request #2568 from msabramo/speed_up_filter_install
Speed up _filter_install function
2015-03-20 09:09:50 +00:00
Marc Abramowitz d02cb6de43 Speed up _filter_install function
This speeds up the _filter_install function that is used to filter the
output of `python setup.py install` when installing packages. It does
this by using a single regex which is pre-compiled and thus avoiding a
`for` loop over 15 different regexes.

Before:

    $ python
    Python 2.7.9 (v2.7.9:648dcafa7e5f, Dec 10 2014, 10:10:46)
    [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import timeit
    >>> timeit.timeit("""_filter_install("if we've already set distribute as a conflict to setuptools blah blah blah blah")""", setup='from pip.req.req_install import InstallRequirement; ir = InstallRequirement("foo", None, None); _filter_install = ir._filter_install')
    21.220640897750854

After:

    $ python
    Python 2.7.9 (v2.7.9:648dcafa7e5f, Dec 10 2014, 10:10:46)
    [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import timeit
    >>> timeit.timeit("""_filter_install("if we've already set distribute as a conflict to setuptools blah blah blah blah")""", setup='from pip.req.req_install import InstallRequirement; ir = InstallRequirement("foo", None, None); _filter_install = ir._filter_install')
    0.9454500675201416
2015-03-19 19:27:19 -07:00
Donald Stufft 3bacab35e6 Merge pull request #2576 from rbtcollins/develop
Constant-fold unpack in prepare_files.
2015-03-19 19:43:35 -04:00
Marc Abramowitz 60d09fe748 Ignore DoctestTextfile when collecting
Prevents this error:

    $ tox -e py27 -- -m unit
    ...
    INTERNALERROR>   File "/Users/marca/dev/git-repos/pip/tests/conftest.py", line 16, in pytest_collection_modifyitems
    INTERNALERROR>     item.module.__file__,
    INTERNALERROR> AttributeError: 'DoctestTextfile' object has no attribute 'module'
2015-03-19 14:24:25 -07:00
Robert Collins 3ed5cf646a Remove excess use of link.
link is assigned in all branches, and then all the checks for it being
set are guarded by a outer if clause.
2015-03-20 10:04:49 +13:00
Guilherme Espada 06ba1d5de9 Update documentation on the generate task
Instead of base64, we now use base85
2015-03-19 19:46:06 +00:00
Thomas Kluyver 7034545111 Make pep8 linter happy 2015-03-19 09:35:53 -07:00
Aleks Bunin 3fbd504520 Special handling for root user in order to handle properly cases where users use sudo without -H flag.
#2390
2015-03-19 10:31:06 -04:00
Aleks Bunin 77af5935f9 Checking if path is writable, instead of checking for uid and owner.
Fixes #2390.
2015-03-19 09:00:06 -04:00