actually fix the thing

This commit is contained in:
2017-09-21 13:16:40 -04:00
parent 795f3d9539
commit a95f0b166c
2 changed files with 11 additions and 9 deletions
+10 -8
View File
@@ -226,13 +226,12 @@ class Project(object):
pfile = pipfile.load(self.pipfile_location)
lockfile = json.loads(pfile.lock())
# We may need this later...
# for section in ('default', 'develop'):
# lock_section = lockfile.get(section, {})
for section in ('default', 'develop'):
lock_section = lockfile.get(section, {})
# for key in list(lock_section.keys()):
# norm_key = pep423_name(key)
# lockfile[section][norm_key] = lock_section.pop(key)
for key in list(lock_section.keys()):
norm_key = pep423_name(key)
lockfile[section][norm_key] = lock_section.pop(key)
return lockfile
@@ -397,8 +396,11 @@ class Project(object):
# Read and append Pipfile.
p = self._pipfile
# Don't re-capitalize file URLs.
if not is_file(package_name):
# Don't re-capitalize file URLs or VCSs.
converted = convert_deps_from_pip(package_name)
converted = converted[[k for k in converted.keys()][0]]
if not (is_file(package_name) or is_vcs(converted)):
package_name = pep423_name(package_name)
key = 'dev-packages' if dev else 'packages'
+1 -1
View File
@@ -115,7 +115,7 @@ class TestProject():
with open('test_internal_pipfile/Pipfile', 'w') as f:
f.write('[[source]]\nurl = \'https://pypi.python.org/simple\'\n'
'verify_ssl = true\n\n\n[packages]\n'
'Requests = { extras = [\'socks\'] }\nFlask_Auth = \'*\'\n\n\n'
'requests = { extras = [\'socks\'] }\nFlask_Auth = \'*\'\n\n\n'
'[dev-packages]\nclick = \'*\'\nDjango = {git = '
'"https://github.com/django/django.git", ref="1.10"}\n')