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

94 commits

Author SHA1 Message Date
Robert Collins 4926409340 Issue #2563: Read cached wheels from ~/.cache/pip
This won't put wheels into that directory, but will read them if they
are there. --no-cache-dir will disable reading such wheels.
2015-04-13 18:33:07 +12:00
Georgi Valkov 00dc7559e0 Revert back to using options=None and fix loose ends 2015-04-12 23:52:49 +02:00
Georgi Valkov 0ab7a7bbb5 Use optparse and pip.cmdoptions for parsing requirement-line options 2015-04-12 23:52:49 +02:00
Georgi Valkov 4a70730617 Replace all occurrences of install|global-options with install|global-option 2015-04-12 23:52:49 +02:00
Georgi Valkov d6e21b9d76 Use options={} instead of options=None. 2015-04-12 23:52:49 +02:00
Georgi Valkov b014668b30 Add --install-options and --global-options to the requirements file parser
This allows lines such as the following to exist in requirements files:

  INITools==0.2 --install-options="--prefix=/opt"
  virtualenv>=1 --global-options="--no-user-cfg"

In addition, the requirements file parser was overhauled with simplicity
and clarity in mind.
2015-04-12 23:52:49 +02:00
Robert Collins 12e719db78 Create ensure_dir helper.
We had a very widely used pattern which can be factored out for a mild
saving in LOC, and a gain in clarity.
2015-04-07 08:55:52 -04:00
Donald Stufft 5fdc76f370 Remove a broken import 2015-04-07 07:18:43 -04:00
Donald Stufft 92a15cd28b Remove the temporary shim 2015-04-07 07:16:06 -04:00
Donald Stufft 66c1d3bb6a Add a small shim for InstallRequirement.url 2015-04-07 06:27:36 -04:00
Donald Stufft acdaee398f Merge pull request #2421 from radhermit/venv-install-headers
Install headers into the project name subdirectory in virtualenvs
2015-04-07 00:11:52 -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
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
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 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 3e1d7a301c Docstring layout fix. 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
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
Marc Abramowitz d04850659c Make get_dist handle egg_info_path w/ slash at end
Without this, I was getting:

    $ pip install -U 'sentry[lol]'
    ...
      UnknownExtra: Unknown 7.4.1 has no such extra feature 'lol'

With this, I get:

    $ pip install -U 'sentry[lol]'
    ...
      UnknownExtra: sentry 7.4.1 has no such extra feature 'lol'
2015-03-16 11:48:41 -07:00
Donald Stufft 18d92c4543 Merge pull request #2506 from xavfernandez/build_location
simplify and comment build_location/correct_build_location
2015-03-16 07:54:14 -04:00
Marc Abramowitz 0a08fa70dc InstallRequirement.__repr__ show editable
This is handy to have when debugging with pdb.
2015-03-13 15:06:58 -07:00
Xavier Fernandez 95996f08bc simplify and comment build_location/correct_build_location
- add a bunch of comments
- renamed correct_build_location to _correct_build_location
- use build_location inside of _correct_build_location to be consistent
  with the other build directories
2015-03-10 22:29:15 +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
Tim Harder 882cd358d1 Install headers into the project name subdirectory in virtualenvs
This helps keep the header namespace cleaner instead of putting
everything in the top level include directory related to the python
version.
2015-02-12 11:55:44 -08: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