Merge branch 'master' into 2138-notpip_looping

This commit is contained in:
Kyle Altendorf
2018-05-14 14:34:21 -07:00
committed by GitHub
6 changed files with 79 additions and 6 deletions
+29
View File
@@ -0,0 +1,29 @@
---
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).
+7
View File
@@ -0,0 +1,7 @@
---
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.
+17
View File
@@ -0,0 +1,17 @@
---
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.
+2
View File
@@ -1,3 +1,5 @@
2018.05.12:
- Switch to calver for versioning.
11.10.4:
- Bugfix release (_mkstmp_inner backport breaks python3.4/3.5 compat)
11.10.3:
+1 -1
View File
@@ -2,4 +2,4 @@
# // ) ) / / // ) ) //___) ) // ) ) || / /
# //___/ / / / //___/ / // // / / || / /
# // / / // ((____ // / / ||/ /
__version__ = '11.10.4'
__version__ = '2018.05.18'
+23 -5
View File
@@ -84,14 +84,16 @@ def log(msg):
print('[vendoring.%s] %s' % (TASK_NAME, msg))
def _get_git_root(ctx):
return Path(ctx.run('git rev-parse --show-toplevel', hide=True).stdout.strip())
def _get_vendor_dir(ctx):
git_root = ctx.run('git rev-parse --show-toplevel', hide=True).stdout
return Path(git_root.strip()) / 'pipenv' / 'vendor'
return _get_git_root(ctx) / 'pipenv' / 'vendor'
def _get_patched_dir(ctx):
git_root = ctx.run('git rev-parse --show-toplevel', hide=True).stdout
return Path(git_root.strip()) / 'pipenv' / 'patched'
return _get_git_root(ctx) / 'pipenv' / 'patched'
def clean_vendor(ctx, vendor_dir):
@@ -321,7 +323,7 @@ def vendor(ctx, vendor_dir, rewrite=True):
rewrite_file_imports(item, vendored_libs, vendor_dir)
write_backport_imports(ctx, vendor_dir)
log('Applying post-patches...')
patches = patch_dir.glob('*.patch' if not is_patched else '_post*.patch')
patches = patch_dir.glob('*.patch' if not is_patched else '_post*.patch')
for patch in patches:
apply_patch(ctx, patch)
if is_patched:
@@ -457,6 +459,22 @@ def extract_license_member(vendor_dir, tar, member, name):
dest.write_bytes(tar.read(member))
@invoke.task()
def generate_patch(ctx, package_path, patch_description, base='HEAD'):
pkg = Path(package_path)
if len(pkg.parts) != 2 or pkg.parts[0] not in ('vendor', 'patched'):
raise ValueError('example usage: generate-patch patched/pew some-description')
patch_fn = '{0}-{1}.patch'.format(pkg.parts[1], patch_description)
command = 'git diff {base} -p {root} > {out}'.format(
base=base,
root=Path('pipenv').joinpath(pkg),
out=Path(__file__).parent.joinpath('patches', pkg.parts[0], patch_fn),
)
with ctx.cd(str(_get_git_root(ctx))):
log(command)
ctx.run(command)
@invoke.task(name=TASK_NAME)
def main(ctx):
vendor_dir = _get_vendor_dir(ctx)