-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Cython projects that don't need any special option should work without a CythonRecipe #1406
Comments
Ok since this turned out to be way more horrible than anticipated, let me share my suffering with you with some of the things I had to do to get my project to build:
I can't even imagine what I would have done without Docker! Install obscure recipes and a webserver and somehow hope I don't trash the entire install on my machine?? How are other people supposed to do this? If recipes weren't necessary for Cython, I would have been done with this: Right now, the recipes are an absolute disaster for external projects, because:
Given this situation, it would help improve the situation massively if Cython with default settings could be used without relying on this recipe mess. Disclaimer: Maybe I missed something and all of this is a lot easier. That'd be nice. But right now, the mess above is the only way I managed to make it build. |
Rather than setting up a webserver, it would be much simpler to write a recipe class that uses local files. There's already a simple mixin that does this, The method for using it is something like:
It would be nice to support a more generic api, if it's possible to easily get pip to resolve paths for us then that would be ideal. |
Thinking about it, I think it might be fairly easy to use pip for much more of the dependency resolution than is currently the case. I'll maybe look into it once the python3 stuff is working. |
Yes I also feel there're way to lower our current boilerplate a lot. But I want us to make sure we don't break things up, e.g. via integration testing. |
@AndreMiras yeah I think the main problem at hand here is still that Cython projects require a recipe in the first place. Because it is feasible with the additional use of ctypes to completely avoid any special options even when interacting with libs (because with ctypes, no linking is necessary) while taking most of the performance gains of Cython - so with a bit of care, the need of any special options can be avoided in projects that care to do so. But unless p4a uses proper defaults without a recipe, that gives no real benefits... |
@inclement that is useful to know, thanks! However, as suggested in #1407 I think the standard recipe should just support file URLs and/or file paths out of the box. Everything else is just again overcomplicating things and quite non-intuitive. Why should I need a mixin class for something that is completely unambiguous regarding my intent like the file URL? (it's not even a different type of thing, it's still a completely bog standard URL) |
I made a pull request to fix this: #1483 |
Versions
3.x
Description
Cython projects that don't need any special option should work without recipe. Right now, an empty Cython recipe with zero useful information is needed even in case no patching, no special options, no anything needs to be done, because otherwise
p4a
apparently won't set up things like the Cython being available in the first place correctly. I think that's unnecessary and shouldn't be required, since it makes using projects with p4a that don't require any of this way more complicated (since they need a recipe when they would work fine without, if p4a actually had reasonable default behavior).In general, I find over-reliance on recipes quite a roadblock for external projects that are well-tested with p4a but developed independently, since they would somehow need to make users install recipes or get them into the main repo which just eats away at everyone's time...
buildozer.spec
not used, but should be irrelevant. I tested with a p4a one-liner with two projects of mine as requirements, one of them requiring Cython:
--requirements=python3crystax,https://github.com/JonasT/wobblui/archive/master.zip,https://github.com/JonasT/nettools/archive/master.zip
Logs
Basically, the Cython part of the setup.py just plain doesn't work as you can see here (Cython doesn't seem to be present in the virtual env p4a sets up in the first place, if not using a CythonRecipe):
The text was updated successfully, but these errors were encountered: