|
17 | 17 | GITLAB_WHEEL_BUILDER_URL = ( |
18 | 18 | "https://gitlab.com/riseproject/python/wheel_builder/-/tree/main" |
19 | 19 | ) |
20 | | - |
21 | | -# YAML source still lives in the old wheel_builder repo for now. |
22 | | -YAML_SRC_DIR = os.path.normpath( |
23 | | - os.path.join( |
24 | | - os.path.dirname(os.path.abspath(__file__)), |
25 | | - "..", "..", "..", "wheel_builder", "docs", "source", "packages", |
26 | | - ) |
27 | | -) |
| 20 | +PYPI_INDEX_URL = "https://pypi.riseproject.dev/simple/" |
28 | 21 |
|
29 | 22 | # Match RST inline external refs: `Label <url>`_ or `Label <url>`__ |
30 | 23 | RST_LINK_RE = re.compile(r"`([^`<]+?)\s*<([^>]+)>`_+") |
@@ -168,11 +161,10 @@ def generate_md_page(yaml_file, output_md, package_list): |
168 | 161 | lines.append("") |
169 | 162 |
|
170 | 163 | install_command = ( |
171 | | - f"pip install {package_name} " |
172 | | - f"--index-url {GITLAB_REGISTRY_URL}/pypi/simple" |
| 164 | + f"pip install {package_name} --index-url {PYPI_INDEX_URL}" |
173 | 165 | if is_latest |
174 | 166 | else f"pip install {package_name}=={version_number} " |
175 | | - f"--index-url {GITLAB_REGISTRY_URL}/pypi/simple" |
| 167 | + f"--index-url {PYPI_INDEX_URL}" |
176 | 168 | ) |
177 | 169 | lines += ["```bash", install_command, "```", ""] |
178 | 170 |
|
@@ -231,12 +223,12 @@ def generate_md_page(yaml_file, output_md, package_list): |
231 | 223 |
|
232 | 224 |
|
233 | 225 | def process_all_yaml_files(package_list): |
234 | | - yaml_files = sorted(glob.glob(os.path.join(YAML_SRC_DIR, "*.yaml"))) |
| 226 | + out_dir = os.path.dirname(os.path.abspath(__file__)) |
| 227 | + yaml_files = sorted(glob.glob(os.path.join(out_dir, "*.yaml"))) |
235 | 228 | if not yaml_files: |
236 | | - print(f"No YAML files found in {YAML_SRC_DIR}") |
| 229 | + print(f"No YAML files found in {out_dir}") |
237 | 230 | return |
238 | 231 |
|
239 | | - out_dir = os.path.dirname(os.path.abspath(__file__)) |
240 | 232 | package_entries = [] |
241 | 233 | for yaml_file in yaml_files: |
242 | 234 | base = os.path.basename(yaml_file).replace(".yaml", ".md") |
|
0 commit comments