kivy / kivy-ios

Toolchain for compiling Python / Kivy / other libraries for iOS
https://kivy.org/docs/guide/packaging-ios.html
MIT License
759 stars 238 forks source link

Added the ability to pass arguments to as a string #726

Open Neizvestnyj opened 2 years ago

Neizvestnyj commented 2 years ago

Previously, if you read dependencies from a file and passed "$requirements" from toolchain build, then the script accepted dependencies with one line (['kivy python3']), now this is fixed

Example:

we have file requirements.txt with (python3, kivy, openssl pillow) although we have double spaces and commas in the file, the libraries are read and assembled correctly

requirements="$(cat requirements.txt)"
toolchain build "$requirements"
toolchain pip install ecdsa, bcrypt, cryptography
req = 'python3 kivy, openssl   pillow'
recipe = ''.join(req).replace(',', '').replace('  ', ' ').split()
print(recipe)  # ['python3', 'kivy', 'openssl', 'pillow']

test_req.txt

Neizvestnyj commented 2 years ago

Look, maybe we can change the argument parser, now it works like this: toolchain build '' --r "$build_requirements"