File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1077,6 +1077,13 @@ def smuggle(
10771077 # invalidate sys.meta_path module finder caches. Forces import
10781078 # machinery to notice newly installed module
10791079 importlib .invalidate_caches ()
1080+ # if pkg_resources module has already been loaded, reload it in
1081+ # case the just-installed package uses it internally to populate
1082+ # its __version__ attribute from its metadata, Otherwise,
1083+ # pkg_resources's cached working set won't include the new
1084+ # package
1085+ if 'pkg_resources' in sys .modules :
1086+ importlib .reload (sys .modules ['pkg_resources' ])
10801087 # check whether the smuggled package and/or any
10811088 # installed/updated dependencies were already imported during
10821089 # the current runtime
Original file line number Diff line number Diff line change 11[metadata]
22name = davos
3- version = 0.2.1
3+ version = 0.2.2
44description = Install and manage Python packages at runtime using the " smuggle" statement.
55long_description = file: README.md
66long_description_content_type = text/markdown
You can’t perform that action at this time.
0 commit comments