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

136 commits

Author SHA1 Message Date
Chris Hunt 60f6ed9387 Move wheel.Wheel to models.wheel.Wheel
This aligns more closely with how the class is used and makes it easier
to move the rest of the wheel module to a dedicated module for
installation.
2019-12-02 11:52:51 +08:00
Chris Hunt bf26185d55 Import Wheel in tests directly 2019-12-02 11:52:51 +08:00
Chris Hunt 1abf978e88 Move format_tag to pep425tags
This is a more appropriate place for the function, since it is more
related to tags than wheels, and will make it easier to refactor Wheel
into its own module.
2019-12-02 11:52:51 +08:00
mdebi f6aaba9fd9 Warn if a path in PATH starts with tilde during install 2019-11-16 00:16:41 +01:00
Chris Hunt 7d27bff299 Make versions argument singular for pep425tags.get_supported()
This simplifies the interface of this function in preparation for
switching to packaging.tags.
2019-11-12 20:58:44 -05:00
Christopher Hunt 8ce34af430
Merge pull request #7323 from chrahunt/refactor/less-intrusive-pep425tags
Be less intrusive towards pep425tags in tests
2019-11-11 15:37:10 +08:00
Chris Hunt 94dbbe2556 Remove patching of pep425tags internals in wheel tests 2019-11-09 13:09:18 -05:00
Chris Hunt 7f910251a4 Remove unused sys.platform patching from test_wheel 2019-11-09 13:09:06 -05:00
Chris Hunt 8963f63989 Parameterize requirement name for logging 2019-11-08 21:54:03 -05:00
Chris Hunt e03a71aff8 Use new Scheme model for wheel installation 2019-11-07 12:43:39 -05:00
Pradyun Gedam 9435050c2d
Move tests for WheelBuilder and friends 2019-11-04 11:51:44 +05:30
Pradyun Gedam 647d30ec77
Move hash_file to utils.misc
Why: Allows for better code reuse, without introducing dependency
between wheel->wheel_builder.
2019-11-04 11:51:08 +05:30
Pradyun Gedam da9a432576
Move WheelBuilder and friends to a dedicated module 2019-11-04 11:49:02 +05:30
Stéphane Bidoul (ACSONE) f5eba4f726
Add tests for git sha wheel caching 2019-11-03 22:54:33 +01:00
Stéphane Bidoul (ACSONE) cdf09bfc4a
remove should_use_ephemeral_cache 2019-10-29 09:15:44 +01:00
Stéphane Bidoul (ACSONE) aaa4237adf
refactor should_use_ephemeral_cache 2019-10-28 22:56:04 +01:00
Pradyun Gedam 8dbf8461fc
Clean up wheel.move_wheel_files (#7176) 2019-10-20 13:26:48 +05:30
Chris Hunt 913f856739 Cleanup arguments, add docstring 2019-10-11 22:24:50 -04:00
Chris Hunt 39572ddd12 Don't pass InstallRequirement to install_unpacked_wheel
We are only using this value for logging. Passing a string reduces
coupling between InstallRequirement and this function.
2019-10-11 21:58:58 -04:00
Chris Hunt 4682f3cb9b Pass scheme to install_unpacked_wheel
This reduces the number of required arguments and helps establish a
convention for install_* functions, which should take a scheme instead
of the individual components.
2019-10-11 21:49:39 -04:00
Chris Hunt 578de7d863 Rename wheel install function 2019-10-11 21:41:47 -04:00
Patrik Kopkan 9a2181a087 Add new option: pip wheel --save-wheel-names 2019-09-25 13:39:34 +02:00
Pradyun Gedam ab6d550592
Remove link.is_artifact 2019-09-21 14:30:14 +05:30
Chris Hunt 2aeed371e5 Make content_type optional in unpack_file. 2019-09-19 20:02:47 -04:00
Chris Hunt 89bbe73498 Remove unused argument in unpacking.unpack_file 2019-09-19 01:47:24 -04:00
Chris Hunt 6a5bd723ec Move unpack_* from utils.misc to utils.unpacking. 2019-09-17 23:40:02 -04:00
Chris Hunt 0689cf5db7 Remove function-level imports in test. 2019-09-17 23:37:38 -04:00
Chris Jerdonek fe2509bd58 Move LinkCollector to a new collector.py module. 2019-09-14 02:54:07 -07:00
Pradyun Gedam e0239735a3
Refactor wheel.move_wheel_files to use updated distlib (#6763) 2019-09-09 00:18:15 +05:30
Chris Hunt f92961d99e More descriptive function name. 2019-09-07 10:50:14 -04:00
Chris Hunt b63ea9cd08 Remove now-unused finder and format_control from WheelBuilder. 2019-09-04 21:10:34 -04:00
Chris Hunt a4102d179a Don't check allowed format in wheel.py, pass function to do check. 2019-09-04 21:06:52 -04:00
Chris Hunt b0a7d2b503 Refactor wheel.move_wheel_files to use updated distlib. 2019-09-01 22:36:13 -04:00
Stéphane Bidoul (ACSONE) 2e1dfbef76 consolidate vcs link detection 2019-08-16 08:14:33 +02:00
Stéphane Bidoul (ACSONE) ea517a2bb9 clarify WheelBuilder.build() a bit 2019-08-14 11:24:26 +02:00
Chris Jerdonek 022a36662f Remove WheelBuilder's dependence on PipSession. 2019-08-11 11:33:23 -07:00
Chris Jerdonek bb9cb5e19d Change the return type of Wheel.support_index_min() to int. 2019-08-08 22:58:17 -07:00
Chris Hunt 39ac9ca351 Rename compatible functions in tests.lib.path.Path. 2019-07-02 18:48:44 -04:00
Ian Wienand 0dbab23df9 Add SHA256 hash of .whl as info output (#5908)
* Add SHA256 hash of .whl as info output

Currently I'm trying to debug some issues with what appear to be
corrupt wheels.  It would be very useful to see what pip thought the
state of things was as it wrote the wheel output; if a final corrupt
distributed file is then different to what pip has saved in its build
logs, you know the problem is somewhere after pip but before
distribution.

Currently we get a log of the initial creation, then the stamp when it
gets moved in the final output location, e.g.:

 creating '/tmp/pip-wheel-71CpBe/foo-1.2.3-py2.py3-none-any.whl
 ...
 Stored in directory: /opt/wheel/workspace

A lot happens in between this, so my suggestion is we add the final
output file and it's hash before the "Stored in directory:", e.g. you
now see:

 Building wheels for collected packages: simple
   Running setup.py bdist_wheel for simple: started
   Running setup.py bdist_wheel for simple: finished with status 'done'
   Finished: simple-3.0-py3-none-any.whl sha256=39005a57a6327972575072af82e11d0817439fe6a069381f6f2a123a8c0bf1cf
   Stored in directory: /tmp/pytest-of-iwienand/pytest-18/test_pip_wheel_success0/workspace/scratch
 Successfully built simple

Despite the hash being fairly important for things like
--require-hashes, AFAICS the final hash is not put in the logs at all
currently, so I think this is generically helpful.

* Reword wheel hash details output

This rewords the output to be more like the form of the preceding
messages.  Additionally the size is added, since we have calculated it
anyway.  The output will now look like:

 Collecting simple==3.0
 Building wheels for collected packages: simple
   Building wheel for simple (setup.py): started
   Building wheel for simple (setup.py): finished with status 'done'
   Created wheel for simple: filename=simple-3.0-py3-none-any.whl size=1138 sha256=2a980a802c9d38a24d29aded2dc2df2b080e58370902e5fdf950090ff67aec10
   Stored in directory: /tmp/pytest-of-iwienand/pytest-0/test_pip_wheel_success0/workspace/scratch
 Successfully built simple
2019-06-26 02:44:43 -07:00
Chris Jerdonek a9a9cfd98c Improve the debug log message when installing an incompatible wheel. 2019-05-25 23:59:32 -07:00
Chris Jerdonek 32c11ee2c3 Respect --global-option and --install-option for VCS installs. 2019-04-08 02:03:17 -07:00
Chris Jerdonek 87f0539b78 Change format_command_result() to use format_command_args(). 2019-02-22 02:52:06 -08:00
Chris Jerdonek 1d0645e86f Add format_command_args() with tests. 2019-02-22 02:52:02 -08:00
Chris Jerdonek aec72bd0cd Add log divider variable. 2019-02-22 00:14:58 -08:00
Chris Jerdonek ebe2417110 Fix the RECORD filename of installed files appearing in the old RECORD. 2019-02-15 02:33:02 -08:00
Chris Jerdonek d3a1b8536a Improve logging in the case of a failed legacy build. 2019-02-14 13:57:07 -08:00
Chris Jerdonek 6cdecce71d Fix an IndexError crash when a legacy build of a wheel fails. 2019-02-10 13:10:39 -08:00
Chris Jerdonek 2d9d3ff90b Add more unit test cases. 2019-02-01 17:41:46 -08:00
Chris Jerdonek 6b0892eace Use the ephemeral cache if autobuilding and no cache directory is available. 2019-02-01 02:25:56 -08:00
Chris Jerdonek 806a013bc0 Add failing test for the have_directory_for_build AssertionError. 2019-02-01 02:23:58 -08:00