pretty freeze file

This commit is contained in:
2017-01-20 17:57:06 -05:00
parent 21a286937b
commit 9fe1e0f6b0
3 changed files with 27 additions and 3 deletions
+25 -1
View File
@@ -1 +1,25 @@
{"default": {"crayons": "==0.1.1", "colorama": "==0.3.7", "daemon": "==1.1", "delegator.py": "==0.0.1", "pexpect": "==4.2.1", "toml": "==0.9.2", "click": "==6.7", "ptyprocess": "==0.5.1"}, "develop": {}, "_meta": {"sources": [{"url": "https://pypi.org/", "verify_ssl": true}], "requires": {}, "Pipfile-sha256": "ce6157382da4a84c865a7f63c551bb4112c15c3168158e4b21ce08c933e4c164"}}
{
"default": {
"crayons": "==0.1.1",
"colorama": "==0.3.7",
"daemon": "==1.1",
"delegator.py": "==0.0.1",
"pexpect": "==4.2.1",
"toml": "==0.9.2",
"click": "==6.7",
"ptyprocess": "==0.5.1"
},
"develop": {},
"_meta": {
"sources": [
{
"url": "https://pypi.org/",
"verify_ssl": true
}
],
"requires": {
"python_version": "2.7"
},
"Pipfile-sha256": "60ab5a49039ff95807e6c72bf5863478a3a75f3db3bfe5e5dac6cea075b490e9"
}
}
+1 -1
View File
@@ -145,7 +145,7 @@ class Pipfile(object):
data = self.data
data['_meta']['Pipfile-sha256'] = self.hash
# return _json.dumps(data)
return json.dumps(data)
return json.dumps(data, indent=4, separators=(',', ': '))
def assert_requirements(self):
""""Asserts PEP 508 specifiers."""
+1 -1
View File
@@ -277,7 +277,7 @@ def do_freeze():
lockfile['default'].update(convert_deps_from_pip(dep))
with open(project.lockfile_location(), 'w') as f:
f.write(json.dumps(lockfile))
f.write(json.dumps(lockfile, indent=4, separators=(',', ': ')))
click.echo(crayons.yellow('Note: ') + 'your project now has only default packages installed.')
click.echo('To install dev-packages, run: $ {}'.format(crayons.red('pipenv init --dev')))