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

62 commits

Author SHA1 Message Date
Xavier Fernandez
a4d1ec2e75 Fix shlex call for old python versions (<2.7.3) 2016-03-04 10:50:29 +01:00
Xavier Fernandez
c9b48feea6 Fix test_relative_local_nested_req_files 2016-01-17 22:40:46 +01:00
Donald Stufft
f39bc756e5 Merge branch 'develop' into hashes2 2015-11-06 18:46:09 -05:00
Erik Rose
f38fc903f2 Obey --require-hashes option in requirements files.
Removed the mention of "package index options" in the docs, because they don't all fit that category anymore. Not even --no-binary and --only-binary do; they're "install options".
2015-10-21 16:02:47 -04:00
Marcus Smith
b58d2c9f34 process line continuations first (but with some special handling for comments) 2015-10-08 15:25:51 -07:00
Erik Rose
7a0a97c081 Merge 'develop' into 'hashing' to bring the latter up to date. 2015-10-08 13:37:19 -04:00
Erik Rose
11dbb92440 Switch from --sha256 etc. to a single option: --hash.
Everybody seems to favor this. Spelled -H, it's still pretty short. And it is less unusual programmatically.
2015-09-24 22:16:00 -04:00
Erik Rose
3303be0c4e Teach requirements parser how to parser hash options, like --sha256.
We purposely keep it off the CLI for now. optparse isn't really geared to expose interspersed args and options, so a more heavy-handed approach will be necessary to support things like `pip install SomePackage --sha256=abcdef... OtherPackage --sha256=012345...`.
2015-09-23 17:39:32 -04:00
Marcus Smith
2b0a722191 - add a preprocess function so that interactions between filtering and
joining can easily be tested
- add some test cases mentioned by @pgervais
- deal with case of last line ending with \
2015-09-22 16:53:26 -07:00
Marcus Smith
ecdb8584f8 refactor to preserve reporting of original line numbers in requirement files 2015-09-21 14:10:31 -07:00
Xavier Fernandez
b290e13cfa Allow --pre option in requirement files
closes #1273
2015-09-05 23:13:03 +02:00
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