Skip to content
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

Unable to use newer version of pycryptodomex / pycryptodome #807

Closed
Ansh1248163264 opened this issue Feb 4, 2023 · 7 comments
Closed

Unable to use newer version of pycryptodomex / pycryptodome #807

Ansh1248163264 opened this issue Feb 4, 2023 · 7 comments

Comments

@Ansh1248163264
Copy link

Task :app:generateDebugPythonRequirements
Chaquopy: Installing for arm64-v8a
Looking in indexes: https://pypi.org/simple, https://chaquo.com/pypi-7.0, https://chaquo.com/pypi-13.1
Collecting pycryptodomex==3.15.0
Using cached pycryptodomex-3.15.0.tar.gz (4.5 MB)
ERROR: Command errored out with exit status 1:
command: 'C:\Users\anshu\AppData\Local\Programs\Python\Python311\python.exe' -S -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\anshu\AppData\Local\Temp\pip-install-c0ab3b5i\pycryptodomex\setup.py'"'"'; file='"'"'C:\Users\anshu\AppData\Local\Temp\pip-install-c0ab3b5i\pycryptodomex\setup.py'"'"';import chaquopy_monkey; chaquopy_monkey.disable_native();f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' --no-user-cfg egg_info --egg-base 'C:\Users\anshu\AppData\Local\Temp\pip-pip-egg-info-sixnk9vl'
ERROR: Command errored out with exit status 1:

     cwd: C:\Users\anshu\AppData\Local\Temp\pip-install-c0ab3b5i\pycryptodomex\
Complete output (19 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\anshu\AppData\Local\Temp\pip-install-c0ab3b5i\pycryptodomex\setup.py", line 488, in <module>
    set_compiler_options(package_root, ext_modules)
  File "C:\Users\anshu\AppData\Local\Temp\pip-install-c0ab3b5i\pycryptodomex\compiler_opt.py", line 341, in set_compiler_options
    clang = compiler_is_clang()
            ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\anshu\AppData\Local\Temp\pip-install-c0ab3b5i\pycryptodomex\compiler_opt.py", line 251, in compiler_is_clang
    return test_compilation(source, msg="clang")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\anshu\AppData\Local\Temp\pip-install-c0ab3b5i\pycryptodomex\compiler_opt.py", line 82, in test_compilation
    objects = compiler.compile([fname], extra_postargs=extra_cc_options)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\android\DRIVE C PROJECTS\Compressed\ANdroid_STUDIO\AndroidStudioProjects\demo\app\build\generated\python\bp\chaquopy_monkey.py", line 56, in compile
    chaquopy_block_native("CCompiler.compile")
  File "D:\android\DRIVE C PROJECTS\Compressed\ANdroid_STUDIO\AndroidStudioProjects\demo\app\build\generated\python\bp\chaquopy_monkey.py", line 87, in chaquopy_block_native
    raise DistutilsPlatformError("{}: {}".format(prefix, CHAQUOPY_NATIVE_ERROR))
distutils.errors.DistutilsPlatformError: CCompiler.compile: Chaquopy cannot compile native code
Testing support for clang
----------------------------------------

ERROR: Failed to install pycryptodomex==3.15.0 from https://files.pythonhosted.org/packages/52/0d/6cc95a83f6961a1ca041798d222240890af79b381e97eda3b9b538dba16f/pycryptodomex-3.15.0.tar.gz#sha256=7341f1bb2dadb0d1a0047f34c3a58208a92423cdbd3244d998e4b28df5eac0ed.
For assistance, please raise an issue at https://github.com/chaquo/chaquopy/issues.
Failed to install pycryptodomex==3.15.0 from https://files.pythonhosted.org/packages/52/0d/6cc95a83f6961a1ca041798d222240890af79b381e97eda3b9b538dba16f/pycryptodomex-3.15.0.tar.gz#sha256=7341f1bb2dadb0d1a0047f34c3a58208a92423cdbd3244d998e4b28df5eac0ed.

Chaquopy: Exit status 1

Task :app:generateDebugPythonRequirements FAILED
Execution failed for task ':app:generateDebugPythonRequirements'.
Process 'command 'C:/Users/anshu/AppData/Local/Programs/Python/Python311/python.exe'' finished with non-zero exit value 1

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

@mhsmith
Copy link
Member

mhsmith commented Feb 4, 2023

As you can see from the repository, we don't have this version of pycryptodomex, but we do have version 3.9.4.

I see from my emails that you posted some other comments saying version 3.9.4 is "of no use". If you've deleted those comments, then maybe you changed your mind about that. Otherwise, please explain why you need the new version.

@mhsmith mhsmith changed the title Unable to build For Specific Python Package "pycryptodomex" , more specifically, unable to install this package from cmd on windows Unable to use newer version of pycryptodomex Feb 4, 2023
@mhsmith
Copy link
Member

mhsmith commented Feb 4, 2023

We're not planning to update this package in the near future, but if anyone else needs a newer version, please click the thumbs up button above, and post a comment explaining why you need it.

Or if you'd like to try building the new version yourself, follow the instructions here. And if you're successful, please make a pull request so we can add the new version to the public repository.

@mhsmith mhsmith changed the title Unable to use newer version of pycryptodomex Unable to use newer version of pycryptodomex / pycryptodome Feb 4, 2023
@Ansh1248163264
Copy link
Author

Hello , Thankyou so much for your attention on this issue , I was just adding a python pip package , and on it's requirements there was issue with this "pycryptodomex" .
{ I was wondering if there was a option to remove this requirement ( like in gradle we have option to 'exclude' on adding any third party package , So , i want to ask is there any way in #chaquopy to exclude requirements , while adding any package through pip. }

Thanks Again for dropping the link for "building of new version" , sure i would give it a try ... ( currently ,I am successfully using "pycryptodomex 3.9.4" , {Thanks For Making It Available}, I solved my problem by using lower version of that python package , because it was asking for latest version of "pycryptodomex" , and currently by god grace things are working fine in my android project.

@mhsmith
Copy link
Member

mhsmith commented Feb 4, 2023

I was wondering if there was a option to remove this requirement ( like in gradle we have option to 'exclude' on adding any third party package , So , i want to ask is there any way in #chaquopy to exclude requirements , while adding any package through pip.

As far as I know, pip doesn't have any direct way to do that. The best option I can think of is:

  • Make a complete list of all your direct and indirect requirements. You can extract this list from the pip output shown while building your app, then convert it to the correct format with some simple find-and-replace operations.
  • Remove the requirements you don't want.
  • Install the list with an option of --no-deps.

@Ansh1248163264
Copy link
Author

Ansh1248163264 commented Feb 4, 2023

@mhsmith
Copy link
Member

mhsmith commented Dec 16, 2023

I had a quick look at this when doing #1049, but the patch doesn't apply on any newer pycryptodome version. However, it's a fairly simple patch, so updating it should not be too hard.

@mhsmith
Copy link
Member

mhsmith commented Oct 23, 2024

pycryptodome and pycryptodomex version 3.21.0 is now available for Python 3.9 - 3.13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants