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

111 commits

Author SHA1 Message Date
Xavier Fernandez
79ea6b75f1 parse_requirements: use compressed form of startswith 2015-03-07 09:37:39 +01:00
Donald Stufft
8f69e31ee7 Merge pull request #2280 from xavfernandez/url_to_link
Replace InstallRequirement.url attribute by a link attribute
2015-03-06 18:04:38 -05:00
Marc Abramowitz
8689ae4b51 Add __repr__ to InstallRequirement
This makes it easier to inspect with pdb.

Instead of:

    (Pdb++) req_to_install
    <pip.req.req_install.InstallRequirement object at 0x10459f7d0>

we get the much friendlier:

    (Pdb++) req_to_install
    <InstallRequirement object: wheel==0.24.0 in /Users/marca/python/virtualenvs/pip/lib/python2.7/site-packages>
2015-03-06 07:58:34 -08:00
Xavier Fernandez
3fcf5972bc add is_wheel method to Link class 2015-03-05 11:04:41 +01:00
Xavier Fernandez
e8e2566279 replace InstallRequirement.url by a link attribute 2015-03-05 11:01:28 +01:00
Xavier Fernandez
0cf2a49d98 Reset uninstall order as before c509c5c4ab
In the case of develop install where we have an egg-info directory and
an egg-link, make sure we uninstall it in the develop_egg_link if case.

Fix #2456
2015-02-25 14:11:50 +01:00
Donald Stufft
0bc8aa5622 Style fixes for the latest flake8 2015-02-24 07:46:10 -05:00
Alex Gaynor
62d07e8b4d Hide lines from the output about changing mode
These don't really add value for developers
2015-02-05 12:46:56 -08:00
Paul Moore
18748b3de6 Make pip.utils.rmtree retry in case antivirus etc holds a directory 2015-02-04 20:34:24 +00:00
Donald Stufft
80fedf7334 Deprecate uninstalling distutils installed projects 2015-01-30 19:22:35 -05:00
Xavier Fernandez
d926c9e3b8 fix uninstall for distutils installed packages
fix #2384
2015-01-31 00:10:28 +01:00
Xavier Fernandez
c509c5c4ab change uninstallation logic
check develop_egg_link case first and map distribution types based on
dist.egg_info attribute
close #2346 #2348 #2350
2015-01-15 09:48:10 +01:00
Xavier Fernandez
a0cd939a12 On uninstall, match the egg case via its extension
instead of egg_name since they don't seem to be unambiguous
also add a debug log in case no uninstall case match
(it would have made the debugging much easier)

closes #2293
2015-01-14 14:07:14 +01:00
Donald Stufft
62d71fca60 Check if distribute is installed before checking installed version 2014-12-30 15:11:55 -05:00
Donald Stufft
5f414a69c6 Don't return cached output for InstallRequirement().installed_version 2014-12-23 07:39:13 -05:00
Xavier Fernandez
1921ad1611 switch extra requirements log to debug 2014-12-19 19:13:04 +01:00
Xavier Fernandez
de7e9c5266 drop egg_info_lines
and use pkg_resources.Distribution instead
2014-12-19 19:12:20 +01:00
Xavier Fernandez
06da6c07ec Fix environment extras installation for sdist
use pkg_resources.Distribution.requires instead of
Requirements.requirements to have environment markers parsing for free
It also unifies a little the process for wheel and non-wheel installs

closes #2174
2014-12-19 19:12:20 +01:00
Xavier Fernandez
4ea7937264 parse_editable: clarify output
extras and editable_options are two different things
2014-12-19 19:11:14 +01:00
Xavier Fernandez
65c004dcb1 remove InstallRequirement.delete_marker_filename 2014-12-19 15:34:21 +01:00
Marc Abramowitz
8e2d441dab Displays info about [un]installed versions
Displays version when installing and uninstalling -- e.g.:

    Successfully installed pyrepl-0.8.4 pytest-2.6.4

and:

    Uninstalling pyrepl-0.8.4:
      Successfully uninstalled pyrepl-0.8.4
    Uninstalling pytest-2.6.4:
      Successfully uninstalled pytest-2.6.4
2014-12-18 17:18:46 -08:00
Donald Stufft
5e717e809a Merge pull request #2206 from msabramo/make_installed_version_work_with_wheel
Make installed_version work for wheel
2014-12-17 22:35:20 -05:00
Marc Abramowitz
59d1ce1af7 Add test_installed_version_not_installed
Checks what happens when user tries to get `installed_version` property
for a InstallRequirement object when that distribution is not installed.
2014-12-17 15:23:42 -08:00
Xavier Fernandez
cc445dcfb8 remove unused unpack arg from build_location 2014-12-17 22:40:03 +01:00
Xavier Fernandez
92b8608529 simpler RequirementSet.cleanup_files 2014-12-17 14:02:04 +01:00
Marc Abramowitz
279c123928 Make installed_version work for wheel
by using `pkg_resources.get_distribution` instead of calling pkg_info
method. Wheels don't have a .pip-egg-info folder.

See: GH-2202
2014-12-16 19:12:48 -08:00
Marc Abramowitz
34b98f917e Loosen filter regexes slightly
to catch a few messages that slipped through when I was installing
docutils on Python 3.4:

    warning: no files found matching 'MANIFEST'
    warning: no previously-included files matching '.cvsignore' found under directory '*'
    Skipping implicit fixer: buffer

Before:

    $ pip install ~/src/docutils --upgrade
    Processing /Users/marca/src/docutils
        warning: no files found matching 'MANIFEST'
        warning: no previously-included files matching '.cvsignore' found under directory '*'
        warning: no previously-included files matching '*~' found under directory '*'
        warning: no previously-included files matching '.DS_Store' found under directory '*'
    Installing collected packages: docutils
      Found existing installation: docutils 0.13
        Uninstalling docutils:
          Successfully uninstalled docutils
      Running setup.py install for docutils
        Skipping implicit fixer: buffer
        Skipping implicit fixer: idioms
        Skipping implicit fixer: set_literal
        Skipping implicit fixer: ws_comma
      ...

After:

    $ pip install ~/src/docutils --upgrade
    Processing /Users/marca/src/docutils
    Installing collected packages: docutils
      Found existing installation: docutils 0.13
        Uninstalling docutils:
          Successfully uninstalled docutils
      Running setup.py install for docutils
      ...
2014-12-16 11:43:19 -08:00
Xavier Fernandez
883a9cf227 remove unused code 2014-12-15 23:59:21 +01:00
Paul Moore
00ec8e636c Merge pull request #2188 from msabramo/GH-2187_dont_say_unpacking_for_directory
Don't say "Unpacking" if installing from directory
2014-12-15 21:58:59 +00:00
Paul Moore
427b9fc9f1 Merge pull request #2191 from msabramo/filter_out_more_manifest_junk_when_installing
Make filter regex more inclusive
2014-12-15 18:56:46 +00:00
Marc Abramowitz
7711b934f7 Don't say "Unpacking" if installing from directory
Fixes: GH-2187
2014-12-15 10:11:36 -08:00
Marc Abramowitz
971d9c098f Make filter regex more inclusive
so that it filters out more "no previously-included..." warnings from
distutils while installing.

Before:

    $ pip install -e ~/dev/git-repos/pip
    Obtaining file:///Users/marca/dev/git-repos/pip
        warning: no previously-included files found matching '.coveragerc'
        warning: no previously-included files found matching '.mailmap'
        warning: no previously-included files found matching '.travis.yml'
        warning: no previously-included files found matching 'pip/_vendor/Makefile'
        warning: no previously-included files found matching 'tox.ini'
        no previously-included directories found matching '.travis'
        no previously-included directories found matching 'docs/_build'
        no previously-included directories found matching 'contrib'
        no previously-included directories found matching 'tasks'
        no previously-included directories found matching 'tests'
    Installing collected packages: pip
      Running setup.py develop for pip
        warning: no previously-included files found matching '.coveragerc'
        warning: no previously-included files found matching '.mailmap'
        warning: no previously-included files found matching '.travis.yml'
        warning: no previously-included files found matching 'pip/_vendor/Makefile'
        warning: no previously-included files found matching 'tox.ini'
        no previously-included directories found matching '.travis'
        no previously-included directories found matching 'docs/_build'
        no previously-included directories found matching 'contrib'
        no previously-included directories found matching 'tasks'
        no previously-included directories found matching 'tests'
    ...

After:

    $ pip install -e ~/dev/git-repos/pip
    Obtaining file:///Users/marca/dev/git-repos/pip
    Installing collected packages: pip
      Running setup.py develop for pip
    ...
2014-12-15 09:55:07 -08:00
Donald Stufft
8e11f76171 Merge pull request #2185 from msabramo/GH-376_change_downloading_unpacking_msg_to_collecting
Change "Downloading/unpacking" to "Collecting"
2014-12-14 14:50:43 -05:00
Marc Abramowitz
b16d283d69 Change "Downloading/unpacking" to "Collecting"
"Downloading/unpacking" was misleading and confusing, especially when
the package is never found, as nothing was ever downloaded or unpacked
in this case.

The word "collecting" seems general enough to be accurate and it goes
well with the fact that later on pip will say, "Installing collected
packages".

Fixes: GH-376
2014-12-14 00:06:08 -08:00
Donald Stufft
6f64d3e6e2 Implement PEP 440 2014-12-13 13:50:21 -05:00
Donald Stufft
33eba11761 Merge pull request #2178 from msabramo/pip_install_make_some_warnings_debug
install: Make some warnings DEBUG rather than INFO
2014-12-12 16:48:38 -05:00
Donald Stufft
201d63b307 Merge pull request #2177 from msabramo/egg_info_log_debug_instead_of_info
"Running setup.py...egg_info" log: INFO => DEBUG
2014-12-12 15:49:34 -05:00
Marc Abramowitz
a3842b2a82 install: Make some warnings DEBUG rather than INFO
* `warning: no previously-included files matching`
* `warning: no files found matching`

See: GH-1070
2014-12-12 11:52:56 -08:00
Marc Abramowitz
7eb00c97ea "Running setup.py...egg_info" log: INFO => DEBUG
Change log level of `"Running setup.py (path:%s) egg_info"` log messages
from INFO to DEBUG. The average user does not know or care that pip is
running `python setup.py egg_info`, unless things are broken, IMHO.

See: GH-1070
2014-12-12 11:37:08 -08:00
Marc Abramowitz
86c714deb1 install: "Cleaning up..." msg: info => debug
This message isn't particularly useful to an end user and clutters the
output IMHO.
2014-12-12 09:02:23 -08:00
Donald Stufft
5b817f960b --isolated should isolate from ~/.pydistutils.cfg as well 2014-12-11 11:51:06 -05:00
Donald Stufft
9d51060e0e Merge pull request #1934 from piwai/develop
Pip doesn't detect dependancies that failed to install
2014-12-11 08:21:41 -05:00
Donald Stufft
785ba69f8d Fix the logging level 2014-11-20 10:53:03 -05:00
Victor Stinner
e498d83db1 Support markers in requirements
It's now possible to specify requirements markers in requirements.
Examples::

    futures; python_version < '2.7'
    mock; python_version < '3.3'
    nose
    ordereddict; python_version < '2.7'
    unittest2; python_version < '2.7'

The separator is "; ". For convinience, ";" alone is also supported, but
no in URLs. The ";" character is a legit and common character in an URL.
Example of valid URL without markers::

    http://foo.com/?p=bar.git;a=snapshot;h=v0.1;sf=tgz

Example of URL with markers::

    http://foo.com/?p=bar.git;a=snapshot;h=v0.1;sf=tgz; python_version < '3.3'
2014-11-20 10:52:08 -05:00
Victor Stinner
e236842944 Fix issue #1433: parse requirements in markers
* InstallRequirement supports PEP 426 markers
* RequirementSet.add_requirement() ignores an InstallRequirement if
  markers don't match.
2014-11-20 10:52:08 -05:00
Xavier Fernandez
b713e96df2 cleanup: use "with open()" to open files 2014-10-18 20:41:18 +02:00
Toshio Kuratomi
9f9a07a447 Better detection of egg-info dirs 2014-10-06 03:21:52 -04:00
Pierre-Yves Rofes
6dc7f5ac35 Reverse package list to install required dependancies first 2014-10-01 23:16:50 +02:00
Toshio Kuratomi
416ca84bdf Record files don't always include directories so find eggdir by looking for a file within it.
Fixes #2075
2014-09-29 13:51:01 -04:00
Donald Stufft
17448b92d0 InstallRequirement.absolute_versions is no longer required. 2014-09-25 22:15:43 -04:00