(ns)
| 26 | |
| 27 | |
| 28 | def get_pip_layout(ns): |
| 29 | pip_dir = get_pip_dir(ns) |
| 30 | if not pip_dir.is_dir(): |
| 31 | log_warning("Failed to find {} - pip will not be included", pip_dir) |
| 32 | else: |
| 33 | pkg_root = "packages/{}" if ns.zip_lib else "Lib/site-packages/{}" |
| 34 | for dest, src in rglob(pip_dir, "**/*"): |
| 35 | yield pkg_root.format(dest), src |
| 36 | if ns.include_pip_user: |
| 37 | content = "\n".join( |
| 38 | "[{}]\nuser=yes".format(n) |
| 39 | for n in ["install", "uninstall", "freeze", "list"] |
| 40 | ) |
| 41 | yield "pip.ini", ("pip.ini", content.encode()) |
| 42 | |
| 43 | |
| 44 | def extract_pip_files(ns): |
no test coverage detected
searching dependent graphs…