指定パッケージと依存ライブラリのインストールバージョンを確認するスクリプト。現在のwheelがpydist.jsonでなくpackage.jsonを作るのでパッチを当てる。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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