Commit Graph

51 Commits

Author SHA1 Message Date
Xavier Fernandez a9325b0727 Allow --process-dependency-links in req files
closes #1274
2015-09-05 20:19:30 +02:00
Xavier Fernandez e168b845a4 Allow --trusted-host option in requirement files
closes #2822
2015-09-03 22:33:31 +02:00
Donald Stufft 0f5d4286a5 Deprecate and Noop the PEP 438 functionality due to PEP 470 2015-09-02 23:47:05 -04: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
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 50c3b6c371 pep8 fix 2015-04-28 16:15:50 -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 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 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 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
Xavier Fernandez 88e9f34969 parse_requirements: add _remove_prefixes
this isolates the line parsing bit
2015-03-07 10:49:59 +01:00
Xavier Fernandez 0bb2c8e35e parse_requirements: simpler line cleanup
- no need to check for startswith('#') since the regex removed all
  comments
- make sure the regex removes all spaces before the comment
- remove all long prefixes the same way
- only lstrip short options since the line has already been stripped
2015-03-07 10:23:07 +01:00
Xavier Fernandez 79ea6b75f1 parse_requirements: use compressed form of startswith 2015-03-07 09:37:39 +01:00
Donald Stufft 6f64d3e6e2 Implement PEP 440 2014-12-13 13:50:21 -05:00
Donald Stufft 5b817f960b --isolated should isolate from ~/.pydistutils.cfg as well 2014-12-11 11:51:06 -05:00
Donald Stufft 0e96b1af4b Switch versioning from X.Y.Z to X.Y dropping the leading 1 2014-09-17 22:05: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
Brad Erickson c53cfa1e28 Optional finder variable must be validated before use 2014-08-05 19:17:29 -07:00
Jyrki Pulliainen 3377dd1917 req: Support --no-use-wheel flag in requirements.txt
Default from pip 1.6 will be to always use wheels, so the --use-wheels
in requirements.txt is now deprecated. However, the --no-use-wheels
is introduced to be able to disable wheel usage via requirements.txt.
2014-06-10 14:57:24 +02:00
Matthew Iversen dcb0ee0702 Move backwardcompat package to compat module 2014-05-14 13:10:06 +10:00
Donald Stufft 7037443975 Require an already created session to be passed into APIs 2014-05-06 22:37:46 -04:00
Valentin Haenel c91d78a064 slightly more pythonic syntax for iterating over line numbers 2014-04-02 18:46:34 +02:00
Donald Stufft 5a76a47d3b Fix code to handle the latest flake8 2014-03-26 18:24:19 -04:00
Donald Stufft 2743768b7b Fix the style of the code base to better match pep8 2014-01-27 14:11:29 -05:00
Donald Stufft 8a2882c2c6 Merge branch 'master' into develop
Conflicts:
	pip/__init__.py
	pip/req.py
2014-01-26 10:39:29 -05:00
Marcus Smith a7c522da97 fix references to req methods/classes after refactor 2014-01-12 10:05:11 -08:00
Marcus Smith 48e1a0f480 fix req pkg imports 2014-01-11 22:50:07 -08:00