Stéphane Bidoul (ACSONE)
261c286de9
Make wheel_cache an argument of build()
2019-12-29 18:51:45 +01:00
Stéphane Bidoul (ACSONE)
c8d4277535
Convert _build_one from method to function
...
It does not rely on WheelBuilder anymore.
2019-12-29 18:51:44 +01:00
Stéphane Bidoul (ACSONE)
3828699ddc
Move build options from WheelBuilder to build function
2019-12-29 18:49:54 +01:00
Pradyun Gedam
b24a6d09fc
Merge pull request #7522 from pradyunsg/refactor/move-pep517-wheel-build-process
...
Move PEP-517 wheel build logic into operations.build
2019-12-29 17:44:01 +00:00
Christopher Hunt
dc860e865e
Merge pull request #7519 from chrahunt/bugfix/restrict-two-dist-info-dirs-toplevel-only
...
Only check for .dist-info directories at the top-level
2019-12-29 20:16:25 +08:00
Christopher Hunt
b3741acb8e
Merge pull request #7510 from chrahunt/refactor/operations-prepare-move-download-up
...
Move download copying out of unpacking functions
2019-12-29 20:15:19 +08:00
Pradyun Gedam
ccfef67016
Move PEP-517 wheel build logic into operations.build
2019-12-29 16:57:02 +05:30
Pradyun Gedam
2721712c2b
Getting Started: Remove a duplicate word ( #7521 )
2019-12-29 09:58:27 +00:00
Christopher Hunt
711cf4deaf
Merge pull request #7517 from sbidoul/wheel-builder-disentangle-6-sbi
...
Move final wheel builder copy operation to wheel command
2019-12-29 13:46:02 +08:00
Chris Hunt
8dc6919875
Fix mypy checks on Windows
...
Previously we were making unguarded calls to non-Windows-only APIs. Mypy
only automatically excludes these from platform-specific checks when
inside conditions.
2019-12-29 00:33:28 -05:00
Chris Hunt
c9ab34a945
Fix docs build on Windows
...
Sphinx expects the "document name" field to be normalized with respect
to slashes (all /), so we now do this in a portable way for Windows.
2019-12-28 18:21:46 -05:00
Eitan Adler
98543b2caa
getting_started: remove a a duplicate word
2019-12-28 15:08:39 -08:00
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
Chris Hunt
93900e1199
Only check for .dist-info directories at the top-level
...
Previously we were restricting to a single .dist-info directory anywhere
in the unpacked wheel directory. That was incorrect since only a
top-level .dist-info directory indicates a contained "package". Now we
limit our restriction to top-level .dist-info directories.
2019-12-28 15:49:08 -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
Stéphane Bidoul (ACSONE)
1f39950f3a
Add news file explaining the new pip wheel behavior
2019-12-28 16:18:10 +01:00
Stéphane Bidoul (ACSONE)
7c2c58442f
Update docstring
2019-12-28 16:18:10 +01: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)
158ae67910
Remove unused _wheel_dir in WheelBuilder
2019-12-26 21:43:57 +01:00
Stéphane Bidoul (ACSONE)
9909b4069a
Move final copy operation from wheel_builder to wheel command
2019-12-26 21:43:57 +01:00
Stéphane Bidoul (ACSONE)
cf21401fd7
Make wheelbuilder.build return successes too
...
Also, pluralize variable names for readability and consistency with
similar variables in callers.
2019-12-26 21:43:57 +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
Chris Hunt
ce9ddbb600
Move download file copying out of unpacking functions
...
Now our "unpacking" functions aren't also for sometimes populating
the download directory.
2019-12-26 11:12:17 -05:00
Pradyun Gedam
37f3fd7087
Move legacy wheel build process
2019-12-25 17:52:39 +05:30
Chris Hunt
5c90145462
Switch conditions
2019-12-24 16:59:24 -05:00
Chris Hunt
554db9230d
Move directory requirement download logging out of unpack_file_url
...
One less use of `download_dir` in `unpack_file_url`, which will make it
easier to factor out.
2019-12-24 16:56:24 -05:00
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
b375580132
Move logic for legacy installs to dedicated module
2019-12-18 16:11:12 +05:30