Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disabling downloading lib when creating wheel #669

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

almarklein
Copy link
Member

Ref #666

@hmaarrfk Would this simple tweak allow the feedstock to drop another patch?

Not sure if there's an env var that we can check that a conda build is in progress. But in any case I imagine you can set an env var in the recipe.

@almarklein almarklein requested a review from Korijn as a code owner January 31, 2025 09:09
Korijn
Korijn previously approved these changes Jan 31, 2025
tools/hatch_build.py Outdated Show resolved Hide resolved
@hmaarrfk
Copy link
Contributor

Testing the patch conda-forge/wgpu-py-feedstock#30

@hmaarrfk
Copy link
Contributor

Would it be possible to also lazyload requests:

diff --git a/tools/download_wgpu_native.py b/tools/download_wgpu_native.py
index dfc17c0..6a18acf 100644
--- a/tools/download_wgpu_native.py
+++ b/tools/download_wgpu_native.py
@@ -6,8 +6,6 @@ import tempfile
 import platform
 from zipfile import ZipFile
 
-import requests
-
 
 DEFAULT_UPSTREAM = "gfx-rs/wgpu-native"
 
@@ -49,6 +47,8 @@ def write_current_version(version, commit_sha):
 
 
 def download_file(url, filename):
+    import requests
+
     resp = requests.get(url, stream=True)
     with open(filename, mode="wb") as fh:
         for chunk in resp.iter_content(chunk_size=1024 * 128):

I'm very weary of having requests as a dependency at build time since many (like this package) will pull in dependencies during the build process. Avoiding the dependency alltogether is an easy smoke test.

Co-authored-by: Mark Harfouche <mark.harfouche@gmail.com>
@hmaarrfk
Copy link
Contributor

can confirm that with the requests patch this works.

I mean I don't want to focus our attention on building the best build system. there is always some customization on this front for the build files.

Thanks for helping on the maintenance front!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants