-
Notifications
You must be signed in to change notification settings - Fork 61
Implement building and publishing Android packages #279
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
Implement building and publishing Android packages #279
Conversation
Would it make sense to also bundle in the changes to update this as well? Lines 11 to 31 in 5e89132
|
Yeah I think so. Working on that part now. |
Looks like I'm getting some typing errors. @alexcrichton do you happen to know the right mypy incantation? It's failing because the function doesn't exist. But the reason I'm running the function is to see if it exists then catch any errors, which I believe is the pythonic way to do this. |
For things like this I've done I think you might also want to move the |
@alexcrichton I believe this is ready for review. I decided to check for the existance of the function rather than ignoring mypy errors. Apparently it's not necessarily un-pythonic0. |
Can you try these wheels and confirm they work? |
@alexcrichton I spent way to long trying to figure out how to get the briefcase config file to use test.pypi.org and finally gave up (@mhsmith any idea how to do this?), but downloading the wheel manually and using the absolute path seems to be working. Tested on the Android x86_64 emulator. |
You can use Briefcase's |
Yeah I tried that one but it doesn't seem to be making it past Chaquopy:
|
Did you specify this as a list of two strings, as shown in the |
That was it, thanks. Is there any way to tell it to use test.pypi.org only for wasmtime? It seems to be pulling in other dependencies from there and breaking. |
Also it doesn't look like it's grabbing the correct wheel:
|
I'm alas no PyPI expert myself so I don't know how to use it :( Not downloading the right wheel though is something I was worried about, I'm not sure how to fix and/or debug that though. I'm afraid to call this "mission complete" though until pip or similar can fetch it. |
It looks like wasmtime-32.0.0-py3-none-any.whl is misnamed – it actually contains a Windows DLL. The Android wheels are:
Because of their filenames, there are a couple more steps necessary to get pip to download them:
I was able to install the wheel with the following Briefcase options, followed by rerunning
The first example in the README then ran successfully. The only problem I can see with the wheel is the wasmtime-32.0.0.dev360.dist-info/WHEEL file:
|
I think all indexes are the same priority, so the only workarounds I can think of are to avoid using |
That's very helpful, thanks. I managed to get from setuptools.dist import Distribution
class BinaryDistribution(Distribution):
def has_ext_modules(self):
return True
setup(
...
distclass=BinaryDistribution,
) but then the wheel filename it spits out is |
This is a shorter way: setup(
has_ext_modules=lambda: True,
) Still no luck on the tags |
For py3-none-any there's some more discussion at #271 but the theory is that any platform which doesn't fit into PyPI's tags would have a DLL bundled in that image. Currently that's just MinGW which is why it's a Windows DLL. As for |
Ah maybe So I need a way to tell it we're not pure python, without telling it we have extensions. |
Looking at the setuptools source, it appears the only way to set Unfortunately setting either of those results in an ABI tag. Currently trying to figure out if that can be overriden separately. |
Ok if I'm not missing anything, it looks like @mhsmith any ideas? Are you certain |
I believe so: see this section of the wheel spec. However, it's possible setuptools can't produce a wheel with this combination of tags and attributes. In which case, you could edit the tag as a post-processing step, maybe by using the
Chaquopy could certainly be a bit smarter about this, so I've made some notes about that in chaquo/chaquopy#1374. However, the next version of Chaquopy probably won't be until October. |
No description provided.