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

242 commits

Author SHA1 Message Date
Donald Stufft a23a65cee4 Merge pull request #3073 from dstufft/remove-8-deprecations
Remove items slated for removal in pip 8.0
2015-09-03 11:10:51 -04:00
Donald Stufft 6afc718307 Remove items slated for removal in pip 8.0 2015-09-03 10:55:11 -04:00
Xavier Fernandez f8040ab13e Use stdlib os.path.relpath
instead of custom (and now useless) make_path_relative
2015-09-03 15:38:44 +02:00
Donald Stufft 0f5d4286a5 Deprecate and Noop the PEP 438 functionality due to PEP 470 2015-09-02 23:47:05 -04:00
Xavier Fernandez e0522c4109 Add debug log when using cached wheel
closes #3000
2015-08-02 20:10:49 +02:00
Xavier Fernandez 0e8d5801b0 Compute pip version from its metadata
Move InstallRequirement.installed_version to a get_installed_version helper
Adapt test
2015-07-06 10:28:18 +02:00
Donald Stufft 3abaac5abc Merge pull request #2743 from Carreau/importlib
imp deprecated on 3.4
2015-06-23 19:13:31 -04:00
James Polley 6d719576e8 Handle missing case from bug #2888
If a single package is listed as a constraint; is a dependency of a
package being installed; *and* is already installed, we end up
processing it multiple times. This change adds a new "prepared" flag
which we set the first time the package is processed, to prevent
multiple handling.

Fixes bug #2888
2015-06-19 15:21:02 +10:00
Robert Collins bb0b429a49 Issue #2731: Constraints files.
This adds constraints files. Like requirements files constraints files
control what version of a package is installed, but unlike
requirements files this doesn't itself choose to install the package.
This allows things that aren't explicitly desired to be constrained if
and only if they are installed.
2015-06-03 06:38:33 +12:00
Marcus Smith c16747bfd0 - we won't be shlex parsing the args later,
so the split here should just be simple string split on ' '
- token parsing logic fixes
- text fixes (tuples, not lists)
2015-06-02 06:50:16 +12:00
Marcus Smith f4b2ee1a9e Break up the line into an args and options string.
We only want to shlex (and then optparse) the options, not the args.
args can contain markers which are corrupted by shlex
2015-06-02 06:50:05 +12:00
Donald Stufft 09542477a9 Allow --allow-all-external inside of a requirements.txt 2015-05-22 17:51:35 -04:00
Donald Stufft 56d5076ee2 Hide setup.py output unless using -v 2015-05-20 21:27:12 -04:00
Matthew Trumbell 4babf310a4 Addresses issue #1236. Extras can now be specified on file/directory-like requirement specifications as well as url requirement specifications. 2015-05-14 11:24:49 -05:00
Donald Stufft 18064e7017 Remove the workarounds/hacks to handle distribute -> setuptools 2015-05-09 15:09:05 -04:00
Matthias Bussonnier cdb1dc7685 imp deprecated on 3.4
importing it prevent to debug other packages with `-W error` as the
deprecation warning will raise.

Though there is still imp imported from a few vendorized packages,
and for other purposes than cache_from_source.
2015-05-02 10:48:25 -07:00
Marcus Smith b3ec00b45d fix case where original requirements file is a local path and the nested file is over http. 2015-05-01 16:03:59 -07:00
Marcus Smith e1e428bb74 Merge pull request #2735 from qwcode/issue_2734
fix for Issue 2734
2015-04-28 17:42:22 -07:00
Marcus Smith afdb664f55 pep8 fixes 2015-04-28 16:17:50 -07:00
Marcus Smith 50c3b6c371 pep8 fix 2015-04-28 16:15:50 -07:00
Marcus Smith dc295237c0 warn when requirements are ignored due to non-matching markers 2015-04-28 15:59:37 -07:00
Marcus Smith d47b1a5b26 more explanation in the process_line doc string 2015-04-28 15:23:02 -07:00
Marcus Smith 09ea42e7f3 convert elif's to if's since we're allowing multiple options per line 2015-04-24 23:10:07 -07:00
Marcus Smith 7c83f8d3cd 1) parse with defaults set as they are naturally (vs forcing to None)
and adjust the logic to match; the result is simpler.
2) Due to #1, we can remove some hairy "format_control" hacks
3) Due to #1, we have to relax the parsing and allow:
   - multiple options per line
   - any supported option on a line with a requirement (not just
     --install-option/--global-option, although they are the only
     options that are passed into a requirement)
2015-04-24 22:32:26 -07:00
Robert Collins 582af6e684 Issue #2677: Disable wheels for setup.py options.
Using --install-options, --build-options, --global-options changes
the way that setup.py behaves, and isn't honoured by the wheel code.
The new wheel autobuilding code made this very obvious - disable
the use of wheels when these options are supplied.
2015-04-24 16:14:48 +12:00
Robert Collins 6aec23cafe Issue #2675: Granular control over wheels/sdists
With wheel autobuilding in place a release blocker is some granular
way to opt-out of wheels for known-bad packages. This patch introduces
two new options: --no-binary and --only-binary to control what
archives we are willing to use on both a global and per-package basis.

This also closes #2084
2015-04-24 08:52:48 +12:00
Marcus Smith b911339625 Merge remote-tracking branch 'pypa/develop' into refactor_req_file
Conflicts:
	pip/req/req_file.py
2015-04-23 02:21:01 -07:00
Marcus Smith fdd10ade9c only calculate the dest strings once 2015-04-23 01:39:02 -07:00
Marcus Smith 55e7bd3daa handle requirement specifiers with spaces, e.g. "pkg >= 1" 2015-04-23 01:31:48 -07:00
Robert Collins ec46a3bac4 Replace wheel cache cache_dir with an object.
Wheel cache lookups become more complex when we wish to allow binary
blacklisting. Rather than passing more parameters around, replace
cache_root with wheel_cache, and create a wheel cache in all the
relevant command entry points.
2015-04-23 10:03:50 +12:00
Marcus Smith cfd69612e4 pep8 fix 2015-04-18 13:12:54 -07:00
Marcus Smith 2c5be94f10 - inline the logic from the get_options_dest function
- report the option string when using an incorrect option with a requirement
2015-04-18 13:03:46 -07:00
Marcus Smith 437871878b process_line tests for setting attributes on the finder, and the fixes for problems that were found 2015-04-18 11:42:06 -07:00
Marcus Smith 764e468f42 refactor the requirements file parsing
two major changes:

1) re-use the optparse options in pip.cmdoptions instead of maintaining
   a custom parser

2) as a result of #1, simplify the call stack
    from:  parse_requirements -> parse_content -> parse_line
      to:  parse_requirements -> process_line

beyond #1/#2, minor cosmetics and adjusting the tests to match
2015-04-16 22:10:46 -07:00
Robert Collins 0e57ebc008 Make adding options be just function calls.
The .make is just sugar for 'call a function' that gets in the way of
just having functions.
2015-04-17 15:04:25 +12:00
Robert Collins 08acb6670d Issue #2140: Build wheels automatically
Building wheels before installing elminates a cause of broken environments -
where install fails after we've already installed one or more packages.

If a package fails to wheel, we run setup.py install as normally.
2015-04-13 18:33:07 +12:00
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 29f0c75c63 Do not shlex.split() and flatten value of global|install_options 2015-04-12 23:52:49 +02:00
Georgi Valkov 5a57325761 Fix pep8 compatibility 2015-04-12 23:52:49 +02:00
Georgi Valkov 832c050ca4 Fix pep8 compatibility 2015-04-12 23:52:49 +02:00
Georgi Valkov fbffb09ae7 Python 2/3 compatibiltiy fix 2015-04-12 23:52:49 +02:00
Georgi Valkov 00dc7559e0 Revert back to using options=None and fix loose ends 2015-04-12 23:52:49 +02:00
Georgi Valkov 7e1bcf5b85 Remove evil trailing comma 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
Donald Stufft c6e149f67b Merge pull request #2665 from rbtcollins/broken-out
Fix only-download use in req_set.
2015-04-09 19:43:05 -04:00
Donald Stufft 92ea0851ec Merge pull request #2659 from xavfernandez/check_markers
Always check environment markers
2015-04-09 18:40:09 -04:00
Robert Collins ed511fac9c Fix only-download use in req_set.
only_download means 'mark the extracted tree for automatic deletion'.
is_download in req_set indicates we're downloading to a user specified
directory - and has nothing to do with deleting the extracted tree.
The actual thing we want to use to control that is the removed
--no-install parameter.

Additionally for wheels we only want to mark the unpacked tree for
deletion when we're downloading the wheel (rather than installing it)
as otherwise the marker looks like part of the wheel.
2015-04-09 21:33:39 +12:00