Closed khanhhien06 closed 5 years ago
It looks like the where the pycrypto tar file was being hosted is no longer available. The URL where the file was hosted previously looks dead(?). This is an interesting recipe because it tries to get the tar file from https://ftp.dlitz.net rather than the pypi website like most of the other recipes. A work around is to change the URL manually to where the file is hosted on pypi.
QUICK FIX: Try changing "https://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-{version}.tar.gz" to "https://files.pythonhosted.org/packages/60/db/645aa9af249f059cc3a368b118de33889219e0362141e75d4eaf6f80f163/pycrypto-2.6.1.tar.gz" in line 11 of the init.py file of the pycrypto recipe. The init.py file for the pycrypto recipe can be found in /foo/bar/kivy-ios/recipes/pycrypto folder.
SOLUTION IN THE FUTURE: Update the recipe in kivy-ios for pycrypto to grab the proper URL from the get go.
I think pycrypto should be removed. It is deprecated, contains security issues. It must be replaced with pycryptodome.
Thanks guys. I can now install pycrypto but it is still not working correctly. I have a very simple app: from firebase import firebase I run the following command lines:
./toolchain.py build python3 openssl kivy
./toolchain.py build python3 pycrypto
./toolchain.py create kindact ~/Desktop/main
./toolchain.py pip3 install firebase
./toolchain.py pip3 install pycryptodome
./toolchain.py pip3 install python_jwt
When I click the 'Play' button in Xcode, I get the following errors. I assume it has to do with pycrypto. How do I go about this issue?
2019-09-19 00:20:03.716608-0400 kindact[55466:291354] [framework] CUIThemeStore: No theme registered with id=0
2019-09-19 00:20:03.957463-0400 kindact[55466:291354] Available orientation: KIVY_ORIENTATION=LandscapeLeft LandscapeRight Portrait PortraitUpsideDown
2019-09-19 00:20:03.957772-0400 kindact[55466:291354] Initializing python
/Users/hiencao/Library/Developer/CoreSimulator/Devices/9E046BFB-CB75-4394-BBBB-CD52178F0DEA/data/Containers/Bundle/Application/73683AE3-2088-4B84-9B74-248B20FB0932/kindact.app/kindact:1: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
2019-09-19 00:20:04.169015-0400 kindact[55466:291354] Running main.py: /Users/hiencao/Library/Developer/CoreSimulator/Devices/9E046BFB-CB75-4394-BBBB-CD52178F0DEA/data/Containers/Bundle/Application/73683AE3-2088-4B84-9B74-248B20FB0932/kindact.app/YourApp/main.pyc
Traceback (most recent call last):
File "<string>", line 39, in load_module
File "/Users/hiencao/Desktop/4/kivy-ios/dist/root/python3/lib/python3.7/imp.py", line 342, in load_dynamic
return _load(spec)
File "<frozen importlib._bootstrap>", line 696, in _load
File "<frozen importlib._bootstrap>", line 670, in _load_unlocked
File "<frozen importlib._bootstrap>", line 583, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1043, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: dynamic module does not define module export function (PyInit_cryptography_hazmat_bindings__constant_time)
Traceback (most recent call last):
File "<string>", line 39, in load_module
File "/Users/hiencao/Desktop/4/kivy-ios/dist/root/python3/lib/python3.7/imp.py", line 342, in load_dynamic
File "<frozen importlib._bootstrap>", line 696, in _load
File "<frozen importlib._bootstrap>", line 670, in _load_unlocked
File "<frozen importlib._bootstrap>", line 583, in module_from_spec
File "<frozen importlib._bootstrap_external>", line 1043, in create_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
ImportError: dynamic module does not define module export function (PyInit_cryptography_hazmat_bindings__constant_time)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/hiencao/Desktop/4/kivy-ios/kindact-ios/YourApp/main.py", line 1, in <module>
File "/Users/hiencao/Library/Developer/CoreSimulator/Devices/9E046BFB-CB75-4394-BBBB-CD52178F0DEA/data/Containers/Bundle/Application/73683AE3-2088-4B84-9B74-248B20FB0932/kindact.app/lib/python3.7/site-packages/firebase/__init__.py", line 14, in <module>
import python_jwt as jwt
File "/Users/hiencao/Library/Developer/CoreSimulator/Devices/9E046BFB-CB75-4394-BBBB-CD52178F0DEA/data/Containers/Bundle/Application/73683AE3-2088-4B84-9B74-248B20FB0932/kindact.app/lib/python3.7/site-packages/python_jwt/__init__.py", line 8, in <module>
from jwcrypto.jws import JWS, JWSHeaderRegistry
File "/Users/hiencao/Library/Developer/CoreSimulator/Devices/9E046BFB-CB75-4394-BBBB-CD52178F0DEA/data/Containers/Bundle/Application/73683AE3-2088-4B84-9B74-248B20FB0932/kindact.app/lib/python3.7/site-packages/jwcrypto/jws.py", line 8, in <module>
from jwcrypto.jwa import JWA
File "/Users/hiencao/Library/Developer/CoreSimulator/Devices/9E046BFB-CB75-4394-BBBB-CD52178F0DEA/data/Containers/Bundle/Application/73683AE3-2088-4B84-9B74-248B20FB0932/kindact.app/lib/python3.7/site-packages/jwcrypto/jwa.py", line 10, in <module>
from cryptography.hazmat.primitives import constant_time, hashes, hmac
File "/Users/hiencao/Library/Developer/CoreSimulator/Devices/9E046BFB-CB75-4394-BBBB-CD52178F0DEA/data/Containers/Bundle/Application/73683AE3-2088-4B84-9B74-248B20FB0932/kindact.app/lib/python3.7/site-packages/cryptography/hazmat/primitives/constant_time.py", line 11, in <module>
from cryptography.hazmat.bindings._constant_time import lib
File "<string>", line 43, in load_module
File "/Users/hiencao/Desktop/4/kivy-ios/dist/root/python3/lib/python3.7/imp.py", line 342, in load_dynamic
ImportError: dynamic module does not define module export function (PyInit__constant_time)
2019-09-19 00:20:05.240365-0400 kindact[55466:291354] Application quit abnormally!
2019-09-19 00:20:05.263239-0400 kindact[55466:291354] Leaving
Closing issue since Firebase module can be replaced by Requests and json as a workaround.
After building python3, openssl and kivy, I want to build pycrypto by typing: ./toolchain.py build pycrypto It spits out the following error: