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

8717 commits

Author SHA1 Message Date
Chris Hunt
4d1fd08d45 Run linters/docs on Windows and macOS
This ensures that contributors on any of the major platforms can run our
linting and doc building checks without any changes.
2019-12-28 17:43:10 -05:00
Pradyun Gedam
7420629800
Effectively disable the wheel cache if not writable (#7489) 2019-12-28 18:56:05 +00:00
Pradyun Gedam
7d9b392fc0
Move legacy wheel build process into "operations.build" (#7513) 2019-12-28 18:55:06 +00:00
Pradyun Gedam
d4b5392b7a
Merge pull request #7516 from chrahunt/refactor/remove-unnecessary-cleanup
Remove unnecessary InstallRequirement cleanup in install_given_reqs
2019-12-28 12:42:01 +00:00
Stéphane Bidoul (ACSONE)
1ee270a8d4
Check that the cache is writable in _main()
This avoid code duplication (for the wheel and http
cache) and repeated warnings.
2019-12-28 13:04:54 +01:00
Stéphane Bidoul (ACSONE)
865539bdad
Test that pip wheel succeeds when cache dir is not writeable 2019-12-28 13:04:40 +01:00
Stéphane Bidoul (ACSONE)
a4d06aecaa wheel builder: unconditionally update req.link (#7515)
We unconditionally update the requirement
link with the build wheel (in cache), so
when build() will return build success as
well as build failure, the caller can obtain
the built wheel by looking at req.local_file_path
2019-12-27 04:31:55 +08:00
Chris Hunt
db42a03ee2 Remove unnecessary InstallRequirement cleanup in install_given_reqs
install_given_reqs is only called from InstallCommand.run, which calls
RequirementSet.cleanup_files, which calls
InstallRequirement.remove_temporary_source for each InstallRequirement,
so the call here was not necessary.

We have test coverage affirming this still works as expected in
tests/functional/test_install_cleanup.py.
2019-12-26 14:46:05 -05:00
Pradyun Gedam
37f3fd7087
Move legacy wheel build process 2019-12-25 17:52:39 +05:30
Christopher Hunt
0292938f89
Merge pull request #7501 from uranusjr/appdirs-patch 2019-12-24 23:30:55 +08:00
Tzu-ping Chung
c98c0ad79c Default to /etc/xdg if XDG_CONFIG_DIRS if empty 2019-12-23 14:33:17 +08:00
Christopher Hunt
92da786643
Merge pull request #7494 from chrahunt/refactor/wheel-metadata-retrieval
Only allow one top-level .dist-info directory in wheels
2019-12-23 05:41:30 +08:00
Christopher Hunt
3f4bb75fa4
Merge pull request #7499 from chrahunt/feature/add-old-entrypoints
Add old pip entrypoints
2019-12-23 05:40:10 +08:00
Chris Hunt
649a4f3fb0 Add news 2019-12-21 21:27:51 -05:00
Chris Hunt
e5495cf6a1 Raise UnsupportedWheel when .dist-info doesn't match name
This aligns with the previous behavior that would have enforced the
found .dist-info directory starting with the name of the package.

We raise UnsupportedWheel because it looks better in output than the
AssertionError (which includes traceback).
2019-12-21 21:27:49 -05:00
Chris Hunt
0d865d8fe3 Add test for multiple .dist-info in wheel 2019-12-21 10:51:57 -05:00
Chris Hunt
de217b54af Only allow one top-level .dist-info directory in wheels 2019-12-21 10:50:20 -05:00
Pradyun Gedam
c06874c471
Merge pull request #7490 from sbidoul/legacy-cache-bug-sbi
Fix cache bug with legacy cache entries
2019-12-21 07:27:46 +00:00
Chris Hunt
38585adaec Add warning when using old console script wrappers
We use sys.stderr instead of our `deprecated` helper because logging is
not set up at the time this is executed.
2019-12-20 22:01:25 -05:00
Tzu-ping Chung
f6afa1a154 Make appdirs detect IronPython Windows 2019-12-20 15:42:44 +08:00
Tzu-ping Chung
2ccc5c055d Match site_config_dirs for empty XDG_CONFIG_DIRS 2019-12-20 14:36:30 +08:00
Tzu-ping Chung
368c811467 Treat Windows an macOS as special case in appdirs 2019-12-20 14:16:30 +08:00
Tzu-ping Chung
82b456e043
Fix typo in docstring
Co-Authored-By: Christopher Hunt <chrahunt@gmail.com>
2019-12-20 14:15:52 +08:00
Chris Hunt
973cb349ba Add news 2019-12-19 21:20:53 -05:00
Chris Hunt
241679e6c2 Setup old entrypoints in pip module
This should make everything "just work" with respect to combinations of
PATH, sys.path, and multiple Python installs. Later we can add a warning
here to help guide users to better understanding.
2019-12-19 21:20:51 -05:00
Tzu-ping Chung
204887da03 Apply changes from bundled appdirs to vendored
* Convert Windows app data directory values to bytes on Python 2, so the
  output type is consistent across platforms (pypa/pip#4000)
* Also look in ~/.config for user config on macOS (pypa/pip#4100)
* Remove pywin32 dependency, only use ctypes and winreg for directory
  lookup on Windows (pypa/pip#2467)
* Always use os.path.join() instead of os.sep.join() so cross-platform
  tests work as expected (pypa/pip#3275)
2019-12-19 17:15:03 +08:00
Chris Hunt
82a2651f93 Move pip._internal.main to cli submodule
Moving this out of the way gives us the flexibility to define wrappers
that will redirect requests to our old entrypoints to our new one.
2019-12-18 21:09:22 -05:00
Tzu-ping Chung
2472a6e51d Fix path in _vendor/README.rst to match reality 2019-12-18 13:23:15 +01:00
Pradyun Gedam
d613433ad8
Merge pull request #7492 from pradyunsg/refactor/expand-metadata-generation-arguments
Expand arguments to metadata generation functions
2019-12-18 09:40:14 +00:00
Pradyun Gedam
75f7f06ca7
Move assertions to calling functions 2019-12-18 11:53:34 +05:30
Christopher Hunt
2a48286178
Merge pull request #7484 from sbidoul/wheel-builder-disentangle-3-sbi
Add missing error logging in WheelBuilder
2019-12-18 13:12:54 +08:00
Christopher Hunt
ab12706aaa
Merge pull request #7478 from chrahunt/refactor/make-functional-download-tests
Make unpack_* unit tests into functional tests
2019-12-17 07:55:29 +08:00
Stéphane Bidoul (ACSONE)
2a1fb915e2
Remove useless pass statement
Co-Authored-By: Christopher Hunt <chrahunt@gmail.com>
2019-12-16 17:44:34 +01:00
Stéphane Bidoul (ACSONE)
74c2837adf
Simplify handling of cache candidate directories 2019-12-16 17:39:25 +01:00
Pradyun Gedam
350a5986c9
Expand the arguments for modern metadata generation 2019-12-16 17:26:17 +05:30
Pradyun Gedam
00bc7d1727
Expand the arguments for legacy metadata generation 2019-12-16 17:26:17 +05:30
Pradyun Gedam
17428d9eab
Add an InstallRequirement._generate_metadata method 2019-12-16 17:26:12 +05:30
Stéphane Bidoul (ACSONE)
45222a2b36
ensure cache dir is present before building 2019-12-15 23:56:20 +01:00
Stéphane Bidoul (ACSONE)
36ff884673
Fix WheelCache.get in presence of legacy cache keys 2019-12-15 23:43:36 +01:00
Stéphane Bidoul (ACSONE)
80bfba3302
Improve WheelCache.get test 2019-12-15 23:41:03 +01:00
Stéphane Bidoul (ACSONE)
9c74c0214a
Add failing test for legacy cache keys 2019-12-15 23:41:03 +01:00
Pradyun Gedam
b2fcaac533
Merge pull request #7485 from pradyunsg/vendoring/switch-to-dedicated-tool
Switch to a dedicated tool for vendoring pip's dependencies
2019-12-15 17:19:07 +00:00
Pradyun Gedam
6929cc6d6b
Address review comments
These were all nitpicks but hey, that's good news. :)
2019-12-15 21:22:04 +05:30
Christopher Hunt
d6491fe666
Merge pull request #7483 from chrahunt/refactor/install-packed-wheel
Add downloaded/local archive path to InstallRequirement
2019-12-15 23:50:36 +08:00
Pradyun Gedam
618b2d8393
📰 2019-12-15 12:34:35 +05:30
victorvpaulo
81805a5776 Add option to silence warnings related to deprecation of Python versions (#6739)
* Add option to silence warnings related to deprecation of Python versions

* Move skip_if_python2 and skip_if_not_python2 decorator declaratios to test/lib/__init__.py and use them in test_warning.py

* Add tests to ensure that python version deprecation warning is shown correctly and can be silenced by a flag.

* Add new test to ensure that --no-python-version-warning flag does nothing if python version is not 2
2019-12-15 09:59:34 +08:00
Pradyun Gedam
53aaa3e40b
Drop invoke task for vendoring dependencies
This is no longer needed, since `vendoring` does what we need here.
2019-12-15 04:02:17 +05:30
Pradyun Gedam
248f6b2fc6
Switch tox -e vendoring, to use vendoring 2019-12-15 04:02:12 +05:30
Pradyun Gedam
cdee9e2c33
Add configuration for using vendoring 2019-12-15 04:00:07 +05:30
Stéphane Bidoul (ACSONE)
2f125342e0
Remove now redundant ensure_dir
Since _build_one ensure the output dir is
present and does proper error logging,
we can remove ensure_dir from build(), further
simplifying that method.
2019-12-14 23:01:58 +01:00