Commit Graph

4905 Commits

Author SHA1 Message Date
Dan Ryan 02fc52b8da Leverage pip to access installed packages
- Use `get_installed_distributions` from pip
- This cascades to `pkg_resources.working_set` which relies on
  `sys.path` to uncover packages
- Consequently I implemented `temp_path()` as a contextmanager in the
  style of `temp_environ()`
- This requires us to know the environment's `sys.path`, so
  `load_path(python)` will do a `json.dumps` of `sys.path` to stdout
  which then gets loaded and returned
- Allows us to avoid trying to hack around `pip freeze` output to parse
  out names from comments etc
- Provides other potential uses

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-07-23 01:06:55 -04:00
Dan Ryan 134927c28d Merge pull request #2616 from pypa/minor-cleanup
Minor cleanup
2018-07-22 13:27:04 -04:00
Dan Ryan 899b46f12d Merge branch 'master' into minor-cleanup 2018-07-21 14:43:29 -04:00
Dan Ryan d4488405e2 Merge pull request #2617 from pypa/update-requirementslib
Update requirementslib
2018-07-21 14:43:15 -04:00
Dan Ryan 499558e7bc Update requirementslib
- Fix a bug which raised `UnboundLocalError` when parsing malformed urls
- Fixes #2614

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-07-20 02:17:00 -04:00
Dan Ryan 5ff1bcf4fc Add install reqs to pipenv dict
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-07-20 02:03:15 -04:00
Dan Ryan c9efc71a6b reformat core.py
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-07-20 01:56:04 -04:00
Dan Ryan 03b6ecb573 cleanup kwargs in pip install
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-07-20 01:53:33 -04:00
Tzu-ping Chung 568a9d2c69 Merge pull request #2610 from pypa/bugfix/2326-exists-action-bug
Fix `exists-action` argument passing
2018-07-19 14:35:42 +08:00
Dan Ryan caf6046cf5 Fix exists-action argument passing
- Fixes #2326

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-07-18 19:50:17 -04:00
Tzu-ping Chung 25abbc9c15 Merge pull request #2604 from eli-schwartz/noinstall-tests
Exclude more things from installation which aren't meant to be installed
2018-07-18 17:01:12 +08:00
Tzu-ping Chung 58ae894cfd Merge branch 'master' into noinstall-tests 2018-07-18 16:39:02 +08:00
Tzu-ping Chung 3ea2bd980f Merge pull request #2605 from slhck/better-error-message
fix grammar in error message
2018-07-18 16:38:47 +08:00
Werner Robitza 8ae3be9a03 fix grammar in error message
addresses PR #2595
2018-07-18 10:29:49 +02:00
Tzu-ping Chung 171a8cd062 Merge pull request #2572 from pypa/pyenv-autodetect
New, better pyenv module
2018-07-18 16:14:31 +08:00
Eli Schwartz 43074c1d86 Exclude more things from installation which aren't meant to be installed
find_packages' exclude keyword is a bit unintuitive in that it only
excludes the top-level directory specified, but happily includes all the
children unless you wildcard those too.

Update this to actually match the original intent.
2018-07-18 04:02:22 -04:00
Tzu-ping Chung f15bb54b17 Merge branch 'master' into pyenv-autodetect 2018-07-18 15:34:19 +08:00
Tzu-ping Chung 6008891e3f Merge pull request #2603 from pypa/rodxavier-master
Pass PIPENV_DOTENV_LOCATION directly to load_dotenv if present
2018-07-18 15:33:59 +08:00
Rod Xavier Bondoc 5cbe272550 Remove find_dotenv() 2018-07-18 15:03:41 +08:00
Rod Xavier Bondoc b440821153 Pass PIPENV_DOTENV_LOCATION directly to load_dotenv if present 2018-07-18 15:03:41 +08:00
Tzu-ping Chung bb5201edbd Merge pull request #2595 from sinscary/better_error_message
Show better error if virtual env is broken
2018-07-18 14:38:20 +08:00
Tzu-ping Chung 234b55035c Merge branch 'master' into better_error_message 2018-07-18 14:16:22 +08:00
Tzu-ping Chung eabe99d042 Merge pull request #2600 from sup/make-readme-badges-inline
Make README badges inline
2018-07-18 14:15:51 +08:00
Charles Lai 72d643c1f2 Make README badges inline 2018-07-17 17:06:21 -07:00
Nitesh Sharma f141911dab Show better error if virtual env is broken
Closes https://github.com/pypa/pipenv/issues/1918
2018-07-17 20:02:18 +05:30
Tzu-ping Chung 5c49b9ae0e Merge pull request #2597 from giuscri/add-rm-option-to-usage-examples
Add --rm option example to Usage Examples
2018-07-17 19:45:30 +08:00
Giuseppe fe89ed43ec Add --rm option example to Usage Examples 2018-07-17 12:42:55 +02:00
Tzu-ping Chung 91b39d34ff Merge pull request #2592 from Alexgmin/master
Fix broken link in CONTRIBUTING.md
2018-07-16 22:08:38 +08:00
Alex Gómez Martín 4f433c0131 Fix broken link in CONTRIBUTING.md 2018-07-16 15:58:52 +02:00
Tzu-ping Chung e17d76e414 Merge pull request #2591 from Alexgmin/master
Add pkg-resources to the ignored packages list
2018-07-16 21:51:38 +08:00
Alex Gómez Martín ff3c49e5b4 Add pkg-resources to the ignored packages list 2018-07-16 15:33:57 +02:00
Dan Ryan 6b1ec91607 Added working draft of changelog and release task for markdown conversion
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-07-15 16:22:06 -04:00
Dan Ryan d8b6ccaed7 Added missing news entries
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-07-15 16:18:32 -04:00
Dan Ryan 6ead6ff8bc Bumped version.
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-07-15 16:18:11 -04:00
Dan Ryan 2355bdca00 Update release task
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-07-15 16:14:32 -04:00
Tzu-ping Chung b9423b6823 Merge pull request #2561 from JacobHayes/2504-fix-array-element-serialization
Serialize prettytoml ArrayElements as lists
2018-07-13 22:35:51 +08:00
Tzu-ping Chung 3623914001 Also allow TokenElement in lock file encoder
Can't be too careful hadling things here.
2018-07-13 22:26:43 +08:00
Tzu-ping Chung 98a52149d7 Seperate lock file concerns in a custom encoder 2018-07-13 16:26:54 +08:00
Tzu-ping Chung 5cedecd9eb Merge branch '2504-fix-array-element-serialization' of https://github.com/JacobHayes/pipenv into 2504-fix-array-element-serialization 2018-07-13 14:43:34 +08:00
Erin O'Connell 94fbfe44b7 Merge pull request #2578 from sup/master
Revert "Revert "Add docstrings to show short_help when running --help""
2018-07-12 14:23:47 -06:00
Jacob Hayes b1ecc68951 Merge branch 'master' into 2504-fix-array-element-serialization 2018-07-12 15:20:15 -05:00
Charles Lai 8f2b4abeb1 Revert "Revert "Add docstrings to show short_help when running --help""
This reverts commit 05b3581756.
2018-07-12 16:05:20 -04:00
Tzu-ping Chung 946050087f Merge pull request #2568 from JacobHayes/make-local-test-easy
Simplify testing for new contributors
2018-07-13 03:23:47 +08:00
Tzu-ping Chung f711678537 Get virtualenv location from output
The Project class's implementation is a fucking mess. Avoid that.
2018-07-13 03:14:22 +08:00
Jacob Hayes b8dbe78775 Merge branch 'master' into make-local-test-easy 2018-07-12 08:09:04 -05:00
Jacob Hayes e9379437f8 Merge branch 'master' into 2504-fix-array-element-serialization 2018-07-12 08:08:13 -05:00
Jacob Hayes dbc9008131 Duck type prettytoml types during serialization 2018-07-12 08:05:58 -05:00
Tzu-ping Chung 16ad0a1005 New, better pyenv module
Installation logic refactored into the new module. Also implemented
logic to read newest version from "pyenv install --list" automatically,
instead of maintaining a custom mapping.
2018-07-12 17:55:38 +08:00
Erin O'Connell 6cfe5fb993 Merge pull request #2571 from pypa/revert-2542-master
Revert "Add docstrings to show short_help when running --help"
2018-07-12 02:16:55 -06:00
Erin O'Connell 05b3581756 Revert "Add docstrings to show short_help when running --help" 2018-07-12 02:13:20 -06:00