Skip to content

Commit 826262d

Browse files
committed
Switch to using only the pypi-13.1 repository (closes #808)
1 parent e50e8da commit 826262d

File tree

6 files changed

+13
-12
lines changed

6 files changed

+13
-12
lines changed

Diff for: product/gradle-plugin/src/main/kotlin/PythonTasks.kt

-1
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,6 @@ internal class TaskBuilder(
234234
args("--")
235235
args("--disable-pip-version-check")
236236
if (!customIndexUrl) {
237-
args("--extra-index-url", "https://chaquo.com/pypi-7.0")
238237
args("--extra-index-url", "https://chaquo.com/pypi-13.1")
239238
}
240239
args("--implementation", Common.PYTHON_IMPLEMENTATION)

Diff for: product/gradle-plugin/src/test/integration/test_gradle_plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ def test_buildpython_missing(self):
888888
def test_download_wheel(self):
889889
# Our current version of pip shows the full URL for custom indexes, but only
890890
# the filename for PyPI.
891-
CHAQUO_URL = (r"https://chaquo.com/pypi-7.0/murmurhash/"
891+
CHAQUO_URL = (r"https://chaquo.com/pypi-13.1/murmurhash/"
892892
r"murmurhash-0.28.0-7-cp38-cp38-android_16_x86.whl")
893893
PYPI_URL = "six-1.14.0-py2.py3-none-any.whl"
894894

Diff for: product/runtime/docs/sphinx/android.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ install <https://pip.pypa.io/en/stable/cli/pip_install/>`_. For example::
333333
In our most recent tests, Chaquopy could install over 90% of the top 1000 packages on `PyPI
334334
<https://pypi.org/>`_. This includes almost all pure-Python packages, plus a constantly-growing
335335
selection of packages with native components. To see which native packages are currently
336-
available, you can `browse the repository here <https://chaquo.com/pypi-7.0/>`_. To
336+
available, you can `browse the repository here <https://chaquo.com/pypi-13.1/>`_. To
337337
request a package to be added or updated, or for any other problem with installing
338338
requirements, please visit our `issue tracker <https://github.com/chaquo/chaquopy/issues>`_.
339339

Diff for: product/runtime/docs/sphinx/faq.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,8 @@ To make your own mirror of our Maven repository:
151151

152152
To make your own mirror of our pip repository:
153153

154-
* Download whatever packages your app needs from https://chaquo.com/pypi-7.0, and arrange them
155-
in the same directory structure as the server.
154+
* Download whatever packages your app needs from https://chaquo.com/pypi-13.1/, and
155+
arrange them in the same directory structure as the server.
156156
* Add the following lines to the :ref:`pip block <android-requirements>` of your build.gradle
157157
file:
158158

Diff for: server/pypi/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ Here are some examples of existing recipes:
105105
`setup.py` find the library.
106106
* scikit-learn: lists several requirements in `meta.yaml`:
107107
* The "build" requirement (Cython) will be installed automatically.
108-
* The "host" requirements (NumPy etc.) must be downloaded manually from
109-
[the public repository](https://chaquo.com/pypi-7.0/). Save them into a corresponding
108+
* The "host" requirements (NumPy etc.) must be downloaded manually from [the public
109+
repository](https://chaquo.com/pypi-13.1/). Save them into a corresponding
110110
subdirectory of `dist` (e.g. `dist/numpy`), before running the build.
111111

112112
Then run build-wheel as shown above.

Diff for: server/pypi/build-wheel.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ def unpack_and_build(self):
180180
wheel_dir,
181181
ensure_dir(f"{PYPI_DIR}/dist/{normalize_name_pypi(self.package)}"))
182182

183-
184183
def parse_args(self):
185184
ap = argparse.ArgumentParser(add_help=False)
186185
ap.add_argument("--help", action="help", help=argparse.SUPPRESS)
@@ -408,7 +407,8 @@ def create_host_env(self):
408407
self.extract_target()
409408

410409
for package, version in self.get_requirements("host"):
411-
dist_dir = f"{PYPI_DIR}/dist/{normalize_name_pypi(package)}"
410+
dist_subdir = normalize_name_pypi(package)
411+
dist_dir = f"{PYPI_DIR}/dist/{dist_subdir}"
412412
matches = []
413413
if exists(dist_dir):
414414
for filename in os.listdir(dist_dir):
@@ -420,8 +420,10 @@ def create_host_env(self):
420420
if match and (int(match["api_level"]) <= self.api_level):
421421
matches.append(match)
422422
if not matches:
423-
raise CommandError(f"Couldn't find compatible wheel for {package} "
424-
f"{version} in {dist_dir}")
423+
raise CommandError(
424+
f"Couldn't find compatible wheel for {package} {version}. Try "
425+
f"downloading it from https://chaquo.com/pypi-13.1/{dist_subdir}/ "
426+
f"into {dist_dir}.")
425427
matches.sort(key=lambda match: int(match.group("build_num")))
426428
wheel_filename = join(dist_dir, matches[-1].group(0))
427429
run(f"unzip -d {self.host_env} -q {wheel_filename}")
@@ -563,7 +565,7 @@ def get_python_env_vars(self, env, pypi_env):
563565
# complex.h functions were introduced between API levels 23 and 26. Make Cython
564566
# use its own implementations instead.
565567
if self.api_level < 26:
566-
env["CFLAGS"] += f" -DCYTHON_CCOMPLEX=0"
568+
env["CFLAGS"] += " -DCYTHON_CCOMPLEX=0"
567569

568570
env["LDFLAGS"] += f" -lpython{self.python}"
569571

0 commit comments

Comments
 (0)