Commit Graph

122 Commits

Author SHA1 Message Date
Maxim Kurnikov 3692097cca add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
Maxim Kurnikov 64dacbf888 update mypy to 0.730 2019-09-28 17:42:27 +03:00
Pradyun Gedam c6a2f0aac7
Rename {setup_py_dir -> unpacked_source_directory}
Why: Because PEP 517 means you won't have a setup.py in your unpacked sources.
2019-09-27 00:53:24 +05:30
Chris Jerdonek 0435316fde Move path_to_url() to utils/urls.py. 2019-09-24 02:01:52 -07:00
Chris Hunt ee8cc0e648 Use unpack_file instead of unpack_file_url in wheel 2019-09-19 20:19:24 -04:00
Pradyun Gedam ad68984ec6
Rename {build_location -> ensure_build_location} 2019-09-15 22:09:34 +05:30
Pradyun Gedam e0239735a3
Refactor wheel.move_wheel_files to use updated distlib (#6763) 2019-09-09 00:18:15 +05:30
Pradyun Gedam 5bee317e66
Simplify build loop in WheelBuilder.build (#6978)
Merge pull request #6978 from chrahunt/refactor/wheel-build-simpler-loop
2019-09-07 21:04:43 +05:30
Chris Hunt f92961d99e More descriptive function name. 2019-09-07 10:50:14 -04:00
Chris Hunt 3da9a89b5b %-style to .format style string formatting. 2019-09-07 09:56:36 -04:00
Chris Hunt 6ebee37dc4 Add comment, reformat logging statement. 2019-09-07 09:39:32 -04:00
Chris Hunt 0c5721fe84 Simplify directory delete marker file check. 2019-09-05 11:25:19 +02:00
Chris Hunt 4cbbec982b Shorten long line. 2019-09-04 22:33:09 -04:00
Chris Hunt aa90d44239 Store output directory in build set instead of calculating in loop. 2019-09-04 22:29:16 -04:00
Chris Hunt 41f0ea076e Remove unneeded shorter alias. 2019-09-04 22:27:37 -04:00
Chris Hunt ebac7c012a Pull constant python_tag out of loop. 2019-09-04 22:21:40 -04:00
Chris Hunt 907bc82d8b Un-optimize conditional directory creation. 2019-09-04 22:17:19 -04:00
Chris Hunt 3473a6736d Simplify assertion 2.
Per `should_use_ephemeral_cache`, we only use a non-ephemeral cache
if `cache_available`, so there's no need to check it again here.
2019-09-04 22:11:10 -04:00
Chris Hunt 7b772e42d8 Simplify assertion.
Checking `self._wheel_dir` is redundant with the existing assertion at
the top of the function.
2019-09-04 22:08:44 -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 ec4f59c8aa Change 'bdist_wheel' to 'wheel build'. 2019-09-04 20:13:42 -04:00
Chris Hunt b0a7d2b503 Refactor wheel.move_wheel_files to use updated distlib. 2019-09-01 22:36:13 -04:00
Pradyun Gedam 9332803089
Merge pull request #6729 from asottile/3_10_fixes
sys.version fixes for python 3.10
2019-08-18 09:27:09 +09: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 63639bfc0f Make tags required in Wheel.support_index_min() and supported(). 2019-08-10 02:59:59 -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 Jerdonek 075358a0ec Simplify Wheel.supported(). 2019-08-08 22:49:48 -07:00
Pradyun Gedam f377148f6d
Use mypy's inline configuration syntax for opt-outs 2019-07-30 12:39:51 +05:30
Prabakaran Kumaresshan f76014efac Add global options and no user config args to make_setuptools_shim_args (#6706) 2019-07-28 11:28:35 -07:00
Chris Jerdonek 6f638eb591 Add get_major_minor_version(). 2019-07-27 20:01:52 -07:00
Anthony Sottile c3fb5cbff0 sys.version fixes for python 3.10 2019-07-27 19:59:18 -07:00
Pradyun Gedam 537b0fca12
Change isort multi_line_output to 3 2019-07-22 10:15:27 +05:30
Xavier Fernandez 34092d3234 Move pip marker related constant & function in their own module
It didn't seem related with the rest of the locations module
2019-07-18 22:53:05 +02:00
Prabakaran Kumaresshan 91b6b4ed54 Refactor SETUPTOOLS_SHIM with function make_setuptools_shim_args (#6691) 2019-07-12 01:29:41 -07:00
Bertil Hatt b47da272aa Set sys.argv[0] to the underlying setup.py in the setuptools shim. 2019-07-07 18:40:31 -07:00
Pradyun Gedam edbd0822dc Rename InstallRequirement.setup_py -> setup_py_path 2019-06-30 20:23:12 +02: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 99228e503a Import path_to_url() from utils/misc.py instead of download.py. 2019-06-03 02:31:40 -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
Paul Moore 9921442d1f Reject --build-options for PEP 517 builds 2019-02-27 17:40:52 +00:00
Chris Jerdonek b88239918b
Merge pull request #6290 from cjerdonek/add-format-command
Add format_command_args().
2019-02-24 13:23:51 -08:00
Pradyun Gedam 04f1e70427
Merge pull request #6282 from mkurnikov/update-flake8-to-3.7.6
Update flake8 to 3.7.6
2019-02-22 21:56:28 +05:30
Maxim Kurnikov c4dfdbe265 remove unused imports 2019-02-22 14:18:46 +03:00
Maxim Kurnikov f77b8ca051 remove #noqa: F401 2019-02-22 14:17:07 +03: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