Skip to content

Instantly share code, notes, and snippets.

@aodag aodag/deps.py
Created Feb 14, 2015

Embed
What would you like to do?
指定パッケージと依存ライブラリのインストールバージョンを確認するスクリプト。現在のwheelがpydist.jsonでなくpackage.jsonを作るのでパッチを当てる。
import sys
from pprint import pprint
import distlib.database
dist_name = sys.argv[1]
dist_path = distlib.database.DistributionPath(include_egg=True)
dists = list(dist_path.get_distributions())
dist = dist_path.get_distribution(dist_name)
if dist is None:
print("%s is not installed" % dist_name)
sys.exit()
graph = distlib.database.make_graph(dists)
deps = graph.adjacency_list[dist]
print(graph.repr_node(dist))
diff -r 471427909ebb distlib/metadata.py
--- a/distlib/metadata.py Fri Feb 13 20:01:09 2015 +0000
+++ b/distlib/metadata.py Sat Feb 14 18:17:44 2015 +0900
@@ -616,7 +616,8 @@
self.version)
-METADATA_FILENAME = 'pydist.json'
+# METADATA_FILENAME = 'pydist.json'
+METADATA_FILENAME = 'metadata.json'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.