Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Commit

Permalink
Merge pull request #8 from NoRedInk/keep-order-in-json
Browse files Browse the repository at this point in the history
keep order in elm-package.json
  • Loading branch information
eeue56 authored Oct 14, 2016
2 parents 1fc24c3 + bbe076e commit 1e435ed
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion native_package_install.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#! /usr/bin/env python

from __future__ import print_function

import collections
import argparse
import json
import os
Expand Down Expand Up @@ -85,6 +87,7 @@ def fetch_packages(vendor_dir, packages):
vendor = format_vendor_dir(vendor_dir, package['namespace'])
url = format_url(package)

print("Downloading {namespace}/{name} {version}".format(**package))
tar_file = urllib2.urlopen(url)
with open(tar_filename, 'w') as tar:
tar.write(tar_file.read())
Expand Down Expand Up @@ -172,7 +175,7 @@ def update_elm_package(vendor_dir, configs, packages):

for config in configs:
with open(config) as f:
data = json.load(f)
data = json.load(f, object_pairs_hook=collections.OrderedDict)

repository = data['repository']
source_directories = data['source-directories']
Expand Down

0 comments on commit 1e435ed

Please sign in to comment.