shuxin / apk-signature-verify

jar Signature / APK Signature v2 verify with pure python (support rsa dsa ecdsa)
MIT License
30 stars 15 forks source link

ModuleNotFoundError on pip install #4

Closed krokofant closed 5 years ago

krokofant commented 5 years ago
Collecting apkverify
  Using cached https://files.pythonhosted.org/packages/5b/ae/2cee33c86c4cb5e81d732ad8f3f78ccff3106bc5b8c8969467f3c3541dd4/apkverify-0.1.1.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/3f/ts92xp0d3wn31g7_tgj6p_s00000gn/T/pip-install-ec0todpb/apkverify/setup.py", line 9, in <module>
        import apkverify
      File "/private/var/folders/3f/ts92xp0d3wn31g7_tgj6p_s00000gn/T/pip-install-ec0todpb/apkverify/apkverify/__init__.py", line 5, in <module>
        from .apkverify import ApkSignature
      File "/private/var/folders/3f/ts92xp0d3wn31g7_tgj6p_s00000gn/T/pip-install-ec0todpb/apkverify/apkverify/apkverify.py", line 25, in <module>
        from .sigverify import check_sig_pkcs7, check_sig_v2
      File "/private/var/folders/3f/ts92xp0d3wn31g7_tgj6p_s00000gn/T/pip-install-ec0todpb/apkverify/apkverify/sigverify.py", line 12, in <module>
        from asn1crypto import cms, x509
    ModuleNotFoundError: No module named 'asn1crypto'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/3f/ts92xp0d3wn31g7_tgj6p_s00000gn/T/pip-install-ec0todpb/apkverify/
shuxin commented 5 years ago

maybe something wrong with the config on pipy package. try pip install asn1crypto first

Get Outlook for iOShttps://aka.ms/o0ukef


From: krokofant notifications@github.com Sent: Thursday, December 27, 2018 23:38 To: shuxin/apk-signature-verify Cc: Subscribed Subject: [shuxin/apk-signature-verify] ModuleNotFoundError on pip install (#4)

Collecting apkverify Using cached https://files.pythonhosted.org/packages/5b/ae/2cee33c86c4cb5e81d732ad8f3f78ccff3106bc5b8c8969467f3c3541dd4/apkverify-0.1.1.0.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/private/var/folders/3f/ts92xp0d3wn31g7_tgj6p_s00000gn/T/pip-install-ec0todpb/apkverify/setup.py", line 9, in import apkverify File "/private/var/folders/3f/ts92xp0d3wn31g7_tgj6p_s00000gn/T/pip-install-ec0todpb/apkverify/apkverify/init.py", line 5, in from .apkverify import ApkSignature File "/private/var/folders/3f/ts92xp0d3wn31g7_tgj6p_s00000gn/T/pip-install-ec0todpb/apkverify/apkverify/apkverify.py", line 25, in from .sigverify import check_sig_pkcs7, check_sig_v2 File "/private/var/folders/3f/ts92xp0d3wn31g7_tgj6p_s00000gn/T/pip-install-ec0todpb/apkverify/apkverify/sigverify.py", line 12, in from asn1crypto import cms, x509 ModuleNotFoundError: No module named 'asn1crypto'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/3f/ts92xp0d3wn31g7_tgj6p_s00000gn/T/pip-install-ec0todpb/apkverify/

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fshuxin%2Fapk-signature-verify%2Fissues%2F4&data=02%7C01%7C%7Cffeb001bb8be4fc765d208d66c115772%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636815219060466283&sdata=ELu8GWIe%2FqTI7PCHexw6%2FuCsgnk%2BowCyBGd%2BI96u1Yk%3D&reserved=0, or mute the threadhttps://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAs1pdYRHe_wauCYAisE1HlAEhxGzlWoks5u9OlxgaJpZM4Zi6F_&data=02%7C01%7C%7Cffeb001bb8be4fc765d208d66c115772%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636815219060466283&sdata=wDWC9YxFhWb6perNDcTzyTkO74ssfHO%2B3IEE0UZmXaw%3D&reserved=0.

krokofant commented 5 years ago

@shuxin I opened a PR to fix this #5

shuxin commented 5 years ago

there must be another way. setup.py must not import the package before it installed.

krokofant commented 5 years ago

@shuxin I think you're misreading the changes. What you describe is what used to happen - this change removes that import.

It removes the line https://github.com/shuxin/apk-signature-verify/blob/88d80e1b664a73e7a296739a3564c38dc424d329/apkverify/__init__.py#L5

shuxin commented 5 years ago

i known. that line is for useage of from apkverify import ApkSignature instead of `from apkverify.apkverify import ApkSignature I means that a better solution is to fix the setup.py

krokofant commented 5 years ago

I thought about moving the metadata but it was used in several places. Is that import in __init__.py required? I'm not especially familiar with python.

shuxin commented 5 years ago

I'm not especially familiar with python too. 😟 I think I should clean the setup.py

krokofant commented 5 years ago

I'll provide another PR in a moment

krokofant commented 5 years ago

@shuxin I've moved out the metadata in this PR #6

shuxin commented 5 years ago

great, many thanks.

krokofant commented 5 years ago

@shuxin You're welcome. Thanks for the module. Please do a new release when you have time.