mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
actually fix the thing
This commit is contained in:
+10
-8
@@ -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'
|
||||
|
||||
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user