Help me with private recipe in python for android

54 views
Skip to first unread message

Evecimar Silva

unread,
Feb 24, 2021, 9:14:27 AM2/24/21
to Kivy users support
Hi guys good morning!
I have a problem creating a recipe from a private repository. Python 4 android cannot download, as github does not allow downloading via the https protocol. So I'm omitting the url parameter when creating the recipe so that it gets the package locally, but p4a is saying that it is not finding the package. Can anyone tell me where to put the tar.gz package or what parameter should I configure?

Robert

unread,
Feb 24, 2021, 12:14:40 PM2/24/21
to Kivy users support
Python 4 android cannot download as github does not allow downloading via the https protocol

I don't think this is correct, for example I use:

There is some other issue. "from a private repository"  If this is private in the GitHub sense then of course it can't be downloaded by some random process on another computer. If the repository is yours then you can login and download a zip manually.

For a local copy: unpack the archive and copy the directory containing the package (not the whole github directory) to your project folder.
To Python this looks like any package you wrote, so don't reference in .spec
(unless the package makes unusual assumptions, then you will have some debugging to do, which is not an issue if it is your code from your repository)

Pranav Balaji Pooruli

unread,
Feb 24, 2021, 12:18:16 PM2/24/21
to kivy-...@googlegroups.com
Try

requirements = python3, kivy, git+https://github.com/kivymd/kivymd

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/5591db87-2b75-45a3-9936-20e429fdc975n%40googlegroups.com.

Evecimar Silva

unread,
Feb 24, 2021, 12:59:17 PM2/24/21
to kivy-...@googlegroups.com
Hello guys, good afternoon!
Thank you all for your help. I got it as follows:

I downloaded tar.gz and unzipped it in the folder where my recipe is.
Then I used the IncludedFilesBehaviour class which has the src_filename attribute available, where I can pass the name of the folder where it is to the private module.

from pythonforandroid.recipe import PythonRecipe, IncludedFilesBehaviour

class MyRecipe(IncludedFilesBehaviour, PythonRecipe):

    name = 'my_package_name'
   
version = 'master'
   
depends = ['setuptools',"pylint","requests","websocket-client==0.56"]
    src_filename = 'dir_name'
   
call_hostpython_via_targetpython = False
   
install_in_hostpython = True

recipe = MyRecipe()


You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/ByfavrhxfKI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/E3D450E7-7191-494E-9F20-BAB7AABAB7D8%40gmail.com.


--
Atenciosamente
Evecimar Silva

Evecimar Silva

unread,
Feb 24, 2021, 12:59:26 PM2/24/21
to Kivy users support
Hello guys, good afternoon!
Thank you all for your help. I got it as follows:

I downloaded tar.gz and unzipped it in the folder where my recipe is.
Then I used the IncludedFilesBehaviour class which has the src_filename attribute available, where I can pass the name of the folder where it is to the private module.

from pythonforandroid.recipe import PythonRecipe, IncludedFilesBehaviour

class MyRecipe(IncludedFilesBehaviour, PythonRecipe):

    name = 'my_package_name'
    version = 'master'
    depends = ['setuptools',"pylint","requests","websocket-client==0.56"]
    src_filename = 'dir_name'
    call_hostpython_via_targetpython = False
    install_in_hostpython = True

recipe = MyRecipe()


Reply all
Reply to author
Forward
Message has been deleted
0 new messages