mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Comments
This commit is contained in:
@@ -266,6 +266,9 @@ class PyPIRepository(BaseRepository):
|
||||
setup_requires = self.finder.get_extras_links(
|
||||
dist.get_metadata_lines('requires.txt')
|
||||
)
|
||||
# HACK: Sometimes the InstallRequirement doesn't properly get
|
||||
# these values set on it during the resolution process. It's
|
||||
# difficult to pin down what is going wrong. This fixes things.
|
||||
ireq.version = dist.version
|
||||
ireq.project_name = dist.project_name
|
||||
ireq.req = dist.as_requirement()
|
||||
|
||||
@@ -247,8 +247,13 @@ def actually_resolve_reps(
|
||||
if ' -i ' in dep:
|
||||
dep, url = dep.split(' -i ')
|
||||
req = Requirement.from_line(dep)
|
||||
|
||||
# req.as_line() is theoratically the same as dep, but is guarenteed to
|
||||
# be normalized. This is safer than passing in dep.
|
||||
# TODO: Stop passing dep lines around; just use requirement objects.
|
||||
constraints.append(req.as_line())
|
||||
# extra_constraints = []
|
||||
|
||||
if url:
|
||||
index_lookup[req.name] = project.get_source(url=url).get('name')
|
||||
if req.markers:
|
||||
|
||||
@@ -468,7 +468,10 @@ 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)
|
||||
if patch_description:
|
||||
patch_fn = '{0}-{1}.patch'.format(pkg.parts[1], patch_description)
|
||||
else:
|
||||
patch_fn = '{0}.patch'.format(pkg.parts[1])
|
||||
command = 'git diff {base} -p {root} > {out}'.format(
|
||||
base=base,
|
||||
root=Path('pipenv').joinpath(pkg),
|
||||
|
||||
Reference in New Issue
Block a user