Skip to content

Commit

Permalink
Merge branch 'master' of github.com:pypa/pipenv
Browse files Browse the repository at this point in the history
  • Loading branch information
techalchemy committed Jun 29, 2018
2 parents ec3b47a + ca54b6d commit dbeb0de
Show file tree
Hide file tree
Showing 17 changed files with 433 additions and 206 deletions.
22 changes: 15 additions & 7 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
Be sure to check the existing issues (both open and closed!).

Describe the issue briefly here.

Please run `$ python -m pipenv.help`, and paste the results here.

If you're on MacOS, just run the following:
------------

$ python -m pipenv.help | pbcopy
##### Issue description

------------
Describe the issue briefly here.

##### Expected result

Expand All @@ -21,3 +17,15 @@ When possible, provide the verbose output (`--verbose`), especially for locking
##### Steps to replicate

Provide the steps to replicate (which usually at least includes the commands and the Pipfile).

-------------

Please run `$ pipenv --support`, and paste the results here. Don't put backticks (`` ` ``) around it! The output already contains Markdown formatting.

If you're on macOS, run the following:

$ pipenv --support | pbcopy

If you're on Windows, run the following:

> pipenv --support | clip
66 changes: 37 additions & 29 deletions .github/ISSUE_TEMPLATE/Bug_report.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,37 @@
---
name: Bug report
about: Create a report to help us improve

---

Be sure to check the existing issues (both open and closed!).

Describe the issue briefly here.

Please run `$ python -m pipenv.help`, and paste the results here.

If you're on MacOS, just run the following:

$ python -m pipenv.help | pbcopy

------------

##### Expected result

Describe what you expected.

##### Actual result

When possible, provide the verbose output (`--verbose`), especially for locking and dependencies resolving issues.

##### Steps to replicate

Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
---
name: Bug report
about: Create a report to help us improve

---

Be sure to check the existing issues (both open and closed!).

------------

##### Issue description

Describe the issue briefly here.

##### Expected result

Describe what you expected.

##### Actual result

When possible, provide the verbose output (`--verbose`), especially for locking and dependencies resolving issues.

##### Steps to replicate

Provide the steps to replicate (which usually at least includes the commands and the Pipfile).

-------------

Please run `$ pipenv --support`, and paste the results here. Don't put backticks (`` ` ``) around it! The output already contains Markdown formatting.

If you're on macOS, run the following:

$ pipenv --support | pbcopy

If you're on Windows, run the following:

> pipenv --support | clip
29 changes: 22 additions & 7 deletions .github/ISSUE_TEMPLATE/Custom.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
---
name: Usage / Requests for Help
about: Requests for assistance or general usage guidance.

---

Please refer to our [StackOverflow tag](https://stackoverflow.com/questions/tagged/pipenv) for more information.
---
name: Usage / Requests for Help
about: Requests for assistance or general usage guidance.

---

Please refer to our [StackOverflow tag](https://stackoverflow.com/questions/tagged/pipenv) for more information.

If Pipenv is not functioning as you would like it to, consider filing either a bug report, or a feature request instead.


-------------

Please run `$ pipenv --support`, and paste the results here. Don't put backticks (`` ` ``) around it! The output already contains Markdown formatting.

If you're on macOS, run the following:

$ pipenv --support | pbcopy

If you're on Windows, run the following:

> pipenv --support | clip
40 changes: 23 additions & 17 deletions .github/ISSUE_TEMPLATE/Feature_request.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
---
name: Feature request
about: Suggest an idea for this project

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
---
name: Feature request
about: Suggest an idea for this project

---

Be sure to check the existing issues (both open and closed!).

##### Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

##### Describe the solution you'd like

A clear and concise description of what you want to happen.

##### Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

##### Additional context

Add any other context or screenshots about the feature request here. It may be a good idea to mention that platform and Python version you are on.
89 changes: 73 additions & 16 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
build: off
version: 1.0.{build}

skip_branch_with_pr: true

init:
- ps: >-
git config --global core.sharedRepository true
git config --global core.longpaths true
git config --global core.autocrlf input
if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
Write-Host "There are newer queued builds for this pull request, skipping build."
Exit-AppveyorBuild
}
If (($env:SKIP_NOTAG -eq "true") -and ($env:APPVEYOR_REPO_TAG -ne "true")) {
Write-Host "Skipping build, not at a tag."
Exit-AppveyorBuild
}
- git config --global core.sharedRepository true
- git config --global core.longpaths true
- git config --global core.autocrlf input
environment:

PYPI_VENDOR_DIR: '.\tests\pypi\'
GIT_ASK_YESNO: 'false'
APPVEYOR_SAVE_CACHE_ON_ERROR: 'true'
APPVEYOR_SKIP_FINALIZE_ON_EXIT: 'true'
SHELL: 'windows'
PYTHON_ARCH: '64'
PYTHONIOENCODING: 'utf-8'

matrix:

- PYTHON: 'C:\Python27-x64'
PYTHON_VERSION: '2.7.x'
TEST_SUITE: 'not install'
Expand All @@ -39,19 +55,60 @@ environment:
PYTEST_ADDOPTS: '--cache-clear'
RUN_INTEGRATION_TESTS: 'True'

- PYTHON: 'C:\Python37-x64'
PYTHON_VERSION: '3.7.x'
TEST_SUITE: 'not install'

- PYTHON: 'C:\Python37-x64'
PYTHON_VERSION: '3.7.x'
TEST_SUITE: 'install'
PYTEST_ADDOPTS: '--cache-clear'
RUN_INTEGRATION_TESTS: 'True'

install:
- 'set PATH=%PYTHON%;%PYTHON%\Scripts;%PATH%'
- '%PYTHON%\python.exe -m pip install --upgrade pip'
- '%PYTHON%\python.exe -m pip install -e .'
- '%PYTHON%\python.exe -m pipenv run pip install -e .'
- '%PYTHON%\python.exe -m pipenv install --dev'
- '%PYTHON%\python.exe -m pipenv --venv'
- '%PYTHON%\python.exe -m pipenv --py'
- '%PYTHON%\python.exe -m pipenv run python --version'
- ps: >-
$script_path = Join-Path -path $env:PYTHON -childpath Scripts
$py_exe = Join-Path -path $env:PYTHON -childpath python.exe
$pipenv_exe = Join-Path -path $script_path -childpath pipenv.exe
$env:PATH = "$py_path;$script_path;$env:PATH"
Invoke-Expression "$py_exe -m pip install --upgrade pip invoke"
Invoke-Expression "$py_exe -m pip install -e ."
Invoke-Expression "$pipenv_exe install --dev"
Invoke-Expression "$pipenv_exe --venv"
Invoke-Expression "$pipenv_exe --py"
cache:
- '%LocalAppData%\pip\cache'
- '%LocalAppData%\pip\cache'
- '%LocalAppData%\pipenv\cache'

test_script:
- 'if "%RUN_INTEGRATION_TESTS%" == "True" (rmdir /s /q %LocalAppData%\pip\cache)'
- '%PYTHON%\python.exe -m pipenv run pytest -v -n 4 -m "%TEST_SUITE%" tests'

- ps: >-
$script_path = Join-Path -path $env:PYTHON -childpath Scripts
$py_exe = Join-Path -path $env:PYTHON -childpath python.exe
$pipenv_exe = Join-Path -path $script_path -childpath pipenv.exe
$env:PATH = "$py_path;$script_path;$env:PATH"
$invoke_path = Join-Path -path $script_path -childpath invoke.exe
Invoke-Expression "$pipenv_exe run pytest -v -n 4 --ignore=pipenv\patched --ignore=pipenv\vendor -m `"$env:TEST_SUITE`" tests"
If ($env:RUN_INTEGRATION_TESTS -and ($env:PYTHON_VERSION -eq "3.6.x")) {
Invoke-Expression "$py_exe -m pip install invoke parver"
Invoke-Expression "$invoke_path vendoring.update"
}
1 change: 1 addition & 0 deletions news/2371.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
All calls to ``pipenv shell`` are now implemented from the ground up using `shellingham <https://github.com/sarugaku/shellingham>`_, a custom library which was purpose built to handle edge cases and shell detection.
1 change: 1 addition & 0 deletions news/2371.vendor
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
All calls to ``pipenv shell`` are now implemented from the ground up using `shellingham <https://github.com/sarugaku/shellingham>`_, a custom library which was purpose built to handle edge cases and shell detection.
1 change: 1 addition & 0 deletions news/2477.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added new flag ``pipenv --support`` to replace the diagnostic command ``python -m pipenv.help``.
5 changes: 5 additions & 0 deletions pipenv/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ def _infer_return_type(*args):
else:
from .vendor.pathlib2 import Path

# Backport required for earlier versions of Python.
if sys.version_info < (3, 3):
from .vendor.backports.shutil_get_terminal_size import get_terminal_size
else:
from shutil import get_terminal_size

try:
from weakref import finalize
Expand Down
11 changes: 11 additions & 0 deletions pipenv/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ def validate_pypi_mirror(ctx, param, value):
callback=validate_pypi_mirror,
help="Specify a PyPI mirror.",
)
@option(
'--support',
is_flag=True,
help="Output diagnostic information for use in Github issues."
)
@version_option(
prog_name=crayons.normal('pipenv', bold=True), version=__version__
)
Expand All @@ -171,6 +176,7 @@ def cli(
man=False,
completion=False,
pypi_mirror=None,
support=None
):
if completion: # Handle this ASAP to make shell startup fast.
from . import shells
Expand Down Expand Up @@ -229,6 +235,11 @@ def cli(
elif py:
do_py()
sys.exit()
# --support was passed...
elif support:
from .help import get_pipenv_diagnostics
get_pipenv_diagnostics()
sys.exit(0)
# --venv was passed...
elif venv:
# There is no virtualenv yet.
Expand Down
Loading

0 comments on commit dbeb0de

Please sign in to comment.