0002-disable-downloads-inside-conda-build.patch 1.0 KB

1234567891011121314151617181920212223
  1. From cd5d122b364d4a4e719d2da200b73c87fcb507cf Mon Sep 17 00:00:00 2001
  2. From: Jonathan Helmus <jjhelmus@gmail.com>
  3. Date: Mon, 30 Jul 2018 16:33:26 -0500
  4. Subject: [PATCH 2/2] disable downloads inside conda build
  5. ---
  6. setuptools/package_index.py | 4 ++++
  7. 1 file changed, 4 insertions(+)
  8. diff --git a/setuptools/package_index.py b/setuptools/package_index.py
  9. --- a/setuptools/package_index.py 2022-03-28 00:12:42.000000000 +0300
  10. +++ b/setuptools/package_index.py 2022-04-04 13:47:11.310851515 +0300
  11. @@ -328,6 +328,10 @@
  12. # FIXME: 'PackageIndex.process_url' is too complex (14)
  13. def process_url(self, url, retrieve=False): # noqa: C901
  14. """Evaluate a URL as a possible download, and maybe retrieve it"""
  15. + if os.getenv("CONDA_BUILD"):
  16. + raise RuntimeError("Setuptools downloading is disabled in conda build. "
  17. + "Be sure to add all dependencies in the meta.yaml url=%s" % url)
  18. +
  19. if url in self.scanned_urls and not retrieve:
  20. return
  21. self.scanned_urls[url] = True