Commit Graph

71 Commits

Author SHA1 Message Date
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 5f414a69c6 Don't return cached output for InstallRequirement().installed_version 2014-12-23 07:39:13 -05: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
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
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
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 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 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
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
Donald Stufft 5b817f960b --isolated should isolate from ~/.pydistutils.cfg as well 2014-12-11 11:51:06 -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
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
Donald Stufft cc2a44e995 Normalize names in a URL
PyPI and Bandersnatch now normalize the project name in their
URLs. This change matches that and will reduce the number of
redirects we hit on PyPI and will reduce the need to hit /simple/
on a Bandersnatch mirror.
2014-09-18 07:11:31 -04:00
Donald Stufft ec91d8e421 Move from pip.compat.* to six.moves.* for urllib related stuff 2014-09-11 18:40:45 -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
Berker Peksag a1ad3a6113 py2 fixes 2014-08-22 13:54:24 +03:00
Berker Peksag 0cb2991cf0 Strip tracebacks. 2014-08-22 13:47:36 +03:00
Berker Peksag a79b854753 Revert show_stderr=False to investigate test failures. 2014-08-21 22:59:23 +03:00
Berker Peksag 97dbdd1a13 Add show_stderr parameter to call_subprocess. 2014-08-21 22:48:50 +03:00
Berker Peksag 42e4d11900 Cover more cases. 2014-08-21 18:28:12 +03:00
Pawel Jasinski 6e1abb91aa detect windows when running under IronPython 2014-08-12 02:26:24 +02:00
Donald Stufft aaa4bfcdbc Merge pull request #1956 from qwcode/issue_1952
preserve the full vcs url when using `InstallRequirement.from_line`
2014-08-04 10:13:18 -04:00
Marcus Smith 4eb9e3297f InstallRequirement.url should preserve the initial value for from_line requirements 2014-08-03 21:01:12 -07:00
Donald Stufft 90688e82b1 Revert "Merge pull request #1519 from dstufft/remove-dependency-links"
This reverts commit da02f073da, reversing
changes made to 2ad8888901.

Conflicts:
	CHANGES.txt
	pip/commands/freeze.py
	pip/commands/list.py
	pip/commands/wheel.py
	pip/index.py
	pip/req/req_set.py
	pip/vcs/subversion.py
2014-08-01 16:50:08 -04:00
Daniel Holth 7c652cb07e improved ability to install into non-ASCII directories 2014-07-10 23:50:43 -04:00
MinRK c2e71e7ce6 query installed requirements for extras
fixes issue where egg_info('requires.txt') does not exist
for packages installed from wheels.
2014-06-25 22:45:28 -04:00