(dependency)
| 53 | |
| 54 | |
| 55 | def transform_dep_for_pip(dependency): |
| 56 | if dependency.find("@") > 0 and ( |
| 57 | dependency.find("@") < dependency.find("://") or |
| 58 | "://" not in dependency |
| 59 | ): |
| 60 | # WORKAROUND FOR UPSTREAM BUG: |
| 61 | # https://github.com/pypa/pip/issues/6097 |
| 62 | # (Please REMOVE workaround once that is fixed & released upstream!) |
| 63 | # |
| 64 | # Basically, setup_requires() can contain a format pip won't install |
| 65 | # from a requirements.txt (PEP 508 URLs). |
| 66 | # To avoid this, translate to an #egg= reference: |
| 67 | if dependency.endswith("#"): |
| 68 | dependency = dependency[:-1] |
| 69 | url = (dependency.partition("@")[2].strip().partition("#egg")[0] + |
| 70 | "#egg=" + |
| 71 | dependency.partition("@")[0].strip() |
| 72 | ) |
| 73 | return url |
| 74 | return dependency |
| 75 | |
| 76 | |
| 77 | def extract_metainfo_files_from_package( |
no outgoing calls