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

Restore extractPackages setting #754

Closed
mhsmith opened this issue Nov 22, 2022 · 7 comments
Closed

Restore extractPackages setting #754

mhsmith opened this issue Nov 22, 2022 · 7 comments
Milestone

Comments

@mhsmith
Copy link
Member

mhsmith commented Nov 22, 2022

See discussion at beeware/toga#1687 (comment), including the need to preserve .py files.

Things that this would be useful for:

Only extract_dir needs to check the setting: the actual import mechanism probably doesn't need to change.

@mhsmith mhsmith added this to the 13.1 milestone Nov 22, 2022
@mhsmith mhsmith mentioned this issue Nov 22, 2022
4 tasks
@eldon922
Copy link

Hi, what's the status of this issue? i need it exactly for the PyTorch hubconf.py files part 😅

@mhsmith
Copy link
Member Author

mhsmith commented Dec 19, 2022

We'll fix this issue in the next version of Chaquopy. Meanwhile, you can extract your hubconf.py file using the technique shown at #501 (comment).

@eldon922
Copy link

what if we want to extract only 1 file? the old way seems doesn't work anymore in the latest version

@mhsmith
Copy link
Member Author

mhsmith commented Mar 24, 2023

You should still be able to use the technique linked above to extract as many or as few files as you want. Or you can use extractPackages to extract an entire directory of Python files.

If something doesn't work, please give details.

@eldon922
Copy link

eldon922 commented Mar 27, 2023

this is the error if i update the version to 14.0.2. it doesn't happen in 13.0.0

com.chaquo.python.PyException: AttributeError: 'AssetFinder' object has no attribute 'extract_packages'

@mhsmith
Copy link
Member Author

mhsmith commented Mar 27, 2023

Please post the full stack trace, and the relevant sections of your code.

@mhsmith
Copy link
Member Author

mhsmith commented Mar 27, 2023

Actually, this is probably related to #820. Make sure you're using the __loader__ of the top-level package. I've updated #501 (comment) to explain this.

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

No branches or pull requests

2 participants