Commit Graph

152 Commits

Author SHA1 Message Date
Pradyun Gedam 0bd01d9462
Merge pull request #5336 from benoit-pierre/src_build_reqs_in_pep518
PEP 518: enable source installs for build dependencies
2018-07-20 09:36:52 +05:30
Pradyun Gedam e3b06f9e51
Isolate when pyproject.toml does not have build-system.requires 2018-07-09 07:48:36 +05:30
Benoit Pierre 06fb565f0c tests: drop `package4` test data
No need for a wheel of `simple` now that build dependencies support source installs.
2018-06-26 10:40:23 +02:00
Benoit Pierre 43b8ed4945 detect fork-bombs during build dependencies installs 2018-06-26 10:40:23 +02:00
Pradyun Gedam 2b68c7983e
Only disable isolation when build-system.requires is skipped 2018-06-19 16:27:07 +05:30
Pradyun Gedam fdd5101128
Cleanup Tests 2018-06-19 16:27:07 +05:30
Pradyun Gedam a25cb53d02
Add tests to verify refusal of non PEP 518 compliant pyproject.toml 2018-06-19 16:27:07 +05:30
Pradyun Gedam 8cfed25602
Use python -m for pip modifying test 2018-05-30 15:57:48 +05:30
Benoit Pierre ca4e2ad6ad improve handling of PEP 518 build requirements
Offload more work to the underlying pip command used to install the
build requirements, so there's no need to duplicate code to handle
environment markers/extras. This is done by setting the correct options
from the finder passed in argument to `_install_build_reqs`.
2018-05-18 23:45:55 +02:00
Benoit Pierre 04874e24fd tests: improve PEP 518 tests
- avoid hitting the index: use `common_wheels`/`script.pip_install_local`
- use `script.pip(..., use_module=True)` to simplify some tests
- improve `test_pep518_uses_build_env` parametrization
- simplify `test_pep518_with_user_pip`: we only need to check build
  requirements can be installed, so no need for testing with both
  `install` and `wheel` command
- fix `test_pip_wheel_with_pep518_build_reqs_no_isolation`: building
  pep518-3.0 without isolation should fail if the build requirements
  are not installed.
2018-05-18 23:45:55 +02:00
Benoit Pierre 3de9bdb7f2 tests: tweak `simplewheel` test distribution
- change module name to prevent conflicts with other distributions
- add a `__version__` field for version checks
2018-05-18 23:40:15 +02:00
Donald Stufft 90b3db476f Drop support for Python 3.3 2018-05-17 13:34:48 -04:00
Benoit Pierre 02b678f557 fix PEP 518 support when pip is installed in the user site
Do not use the build environment isolation during the build dependencies installation.
2018-04-16 22:58:44 +02:00
Paul Moore 2ae420e8e9 Style checker line length 2018-04-10 18:30:07 +01:00
Paul Moore 22c8656b57 Don't warn about script locations if --target is specified 2018-04-10 18:07:53 +01:00
Benoit Pierre 6da1d9e47c fix PEP 518 support
* fix build environment handling when using PyPy
* do use the build environment for all build commands
* allow installing and building a wheel of a PEP 518 enabled
  package without prior installation of setuptools and/or wheels
* fix check for minimum supported requirements for PEP 518 support:
  - correctly handle complex requirements
  - both setuptools and wheels are needed
2018-04-08 14:06:11 +02:00
Pradyun Gedam 3d7fbb31a9
Merge branch 'master' into resolver/warn-after-resolution 2018-03-27 20:10:56 +05:30
Paul Moore 834c1f12d5 Remove test_basic_install_environment_markers.
This test relies on buggy setuptools behaviour (keeping
requirements with environment markers in install_requires,
rather than moving them to extras_require) which has been
fixed in recent setuptools versions.
2018-03-20 13:48:15 +00:00
Pradyun Gedam 851518b17a
Merge branch 'refactor/reduce-action-at-distance' into resolver/warn-after-resolution 2018-03-03 02:51:37 +05:30
Ed Morley 4b81388199 Use log level info when ignoring packages due to environment markers
The use of environment markers implies that the user expects the
packages to not be installed in some cases (eg depending on version
of Python), so the log output shouldn't be classed as a warning,
particularly since this results in it being sent to `stderr` rather
than `stdout`.

Fixes #4876.
2018-01-28 15:36:23 +00:00
Pradyun Gedam 045e244b7e
Run pip check in pip install
Also, add --no-warn-conflicts option to allow supressing the error messages generated.
2018-01-24 18:16:18 +05:30
Pradyun Gedam 4c147397ea
Merge branch 'master' into cache/ephem-wheel-cache 2018-01-24 02:15:21 +05:30
Pradyun Gedam e31d784b41
Rename a few tests to add the word "basic"
This essentially allows me to do an overall check general check by running the tests using pytest's `-k basic` syntax. Given that I like running tests often and that, in general, I make typos more often than changes that break core functionality, I think this will reduce cycle times for me.
2017-12-16 23:43:46 +05:30
Anthony Sottile e21e2d3f8f Upgrade syntax in ./tests
Changes were automated via https://github.com/asottile/pyupgrade

See #4921
2017-12-14 21:59:41 -08:00
Pradyun Gedam cd14240529
Merge branch 'master' into cache/ephem-wheel-cache 2017-12-01 19:16:27 +05:30
Pradyun Gedam 8f4f15a5a9
Merge pull request #4881 from pradyunsg/misc/trailing-commas-imports
isort: Include trailing commas
2017-11-24 07:34:14 +05:30
Pradyun Gedam 353a13ddff
isort: Include trailing commas 2017-11-21 13:23:59 +05:30
Pradyun Gedam 8ed4ac1fe6
Another round of https updates (#4870) 2017-11-21 00:53:22 +05:30
Pradyun Gedam 01d97e71f0
Merge branch 'master' into cache/ephem-wheel-cache 2017-11-17 12:32:40 +05:30
Mathieu Bridon 62875be050 Record installed files in a deterministic order
Installed files are recorded by Pip in the order the underlying tool
(Distutils, Setuptools, ...) recorded them.

Unfortunately, at least Setuptools doesn't record them in a
deterministic order in the case of a directory being installed, as it
uses os.walk to find the list of files.

We could fix all those underlying tools to record their files in a
deterministic order in all situations. But fixing it once here in Pip
for all tools is certainly simpler and more future-proof.

This makes the installation more reproducible, and therefore more
verifiable.
2017-10-26 22:29:19 +02:00
Pradyun Gedam 1c6a450643
Merge branch 'master' of github.com:pypa/pip into cache/ephem-wheel-cache 2017-10-20 13:51:22 +05:30
Benoit Pierre 961737ab98 Fix integration tests on Windows (#4769) 2017-10-06 20:51:42 +01:00
Pradyun S. Gedam 16cda3069d Cleanup and rename test 2017-10-04 18:55:04 +05:30
Pradyun S. Gedam 901f52976a Fix test that broke in the merge 2017-10-04 18:53:55 +05:30
Pradyun S. Gedam ebf06ceb9d Merge master 2017-10-04 16:58:31 +05:30
Benoit Pierre d778fc330e Small tests related cleanups (#4703)
* fix test not using temporary directory
* avoid creating a `cache_dir` directory in the source tree
* drop `data` fixture from tests that don't use it

* tests: fix pytest warning
2017-10-02 18:33:52 +01:00
Pradyun Gedam fc7ca26489 Warn user when installing scripts outside PATH (#4553) 2017-10-02 17:54:37 +01:00
Donald Stufft 95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Xavier Fernandez 1c7876fa49 Fix test_install_no_binary_disables_building_wheels
The only files present in the cache were http cache files from the
pip install wheel command.
2017-07-21 18:08:53 +02:00
Xavier Fernandez b709b1ef4a Add a common_wheels fixtures providing wheel & setuptools wheels 2017-07-21 18:08:53 +02:00
Thomas Kluyver 73440ede23 Update another install output test 2017-07-05 20:06:11 -04:00
Thomas Kluyver ad242d179d Update test of install output 2017-07-05 20:06:11 -04:00
Pradyun S. Gedam 21be153044 Display where pip is looking for packages (#4483)
Display where PackageFinder is looking for packages
2017-06-26 21:45:47 +01:00
Pradyun S. Gedam 9923c1ad7e Sort imports and minor Flake8 changes (#4520)
* Run isort on the codebase

Command: isort --recursive --skip __main__.py --skip _vendor -o pip._vendor -sd THIRDPARTY -m 5 -p pip -p tests ./pip ./tests

* 📰
2017-06-13 14:17:00 +02:00
Thomas Kluyver 20955812bf Merge branch 'master' into pep518 2017-05-19 11:04:32 +01:00
Pradyun S. Gedam 1832569530 Sort all imports 2017-05-16 15:47:47 +05:30
Thomas Kluyver aee5b6c984 Download packages to path, not to file:/// URL 2017-05-13 22:41:15 +01:00
Thomas Kluyver 2b2bdd1567 Download setuptools, wheel during tests
Rather than storing wheels in the test data directory
2017-05-13 19:51:38 +01:00
Brandon L. Reiss 1902760220 Fix egg= param in relative path tests
Also, reduce the number of test cases because these tests take too long.

The issue is that the setup and teardown of the test environment takes a
long time, and in order to reuse the same test environment, we must
perform install/uninstall cycles to test different URL and path formats.

A better approach might be to generate `FSPkg` using a function that
writes the `setup.py` and `__init__.py` files to a new directory. The
test packages would be easy to generate and save the uninstall time.

For now, we reduce the number of URL/path formats tested, since the
previous test coverage was even more limited.
2017-04-06 09:49:57 -04:00
Brandon L. Reiss c932706bbe Split relative paths tests to avoid timeout
Tests are timing out and also not following requirements/install test
factorization. Split to conform to test organization and to prevent
test timeout.
2017-04-05 18:38:26 -04:00