cher-nov / cryptg

Official Telethon extension to provide much faster cryptography for Telegram API requests.
https://pypi.org/project/cryptg/
Creative Commons Zero v1.0 Universal
75 stars 24 forks source link

Master branch not being installed #17

Closed vasusen-code closed 2 years ago

vasusen-code commented 2 years ago
Cloning https://github.com/cher-nov/cryptg to /tmp/pip-req-build-a9820f6n
         Running command git clone --filter=blob:none -q https://github.com/cher-nov/cryptg /tmp/pip-req-build-a9820f6n
         Resolved https://github.com/cher-nov/cryptg to commit c274f4abdad9332ee6bde4d89033c87f507e15d1
         Installing build dependencies: started
         Installing build dependencies: finished with status 'done'
         Getting requirements to build wheel: started
         Getting requirements to build wheel: finished with status 'error'
         ERROR: Command errored out with exit status 1:
          command: /app/.heroku/python/bin/python /app/.heroku/python/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp7p_1v0lw
              cwd: /tmp/pip-req-build-a9820f6n
         Complete output (44 lines):
         Traceback (most recent call last):
           File "/app/.heroku/python/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
             main()
           File "/app/.heroku/python/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
             json_out['return_val'] = hook(**hook_input['kwargs'])
           File "/app/.heroku/python/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
             return hook(config_settings)
           File "/tmp/pip-build-env-4jw7otkj/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 177, in get_requires_for_build_wheel
             return self._get_build_requires(
           File "/tmp/pip-build-env-4jw7otkj/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 159, in _get_build_requires
             self.run_setup()
           File "/tmp/pip-build-env-4jw7otkj/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 281, in run_setup
             super(_BuildMetaLegacyBackend,
           File "/tmp/pip-build-env-4jw7otkj/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 174, in run_setup
             exec(compile(code, __file__, 'exec'), locals())
           File "setup.py", line 61, in <module>
             main(sys.argv)
           File "setup.py", line 20, in main
             setup(
           File "/tmp/pip-build-env-4jw7otkj/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 154, in setup
             _install_setup_requires(attrs)
           File "/tmp/pip-build-env-4jw7otkj/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 143, in _install_setup_requires
             dist = MinimalDistribution(attrs)
           File "/tmp/pip-build-env-4jw7otkj/overlay/lib/python3.8/site-packages/setuptools/__init__.py", line 135, in __init__
             super().__init__(filtered)
           File "/tmp/pip-build-env-4jw7otkj/overlay/lib/python3.8/site-packages/setuptools/dist.py", line 456, in __init__
             for ep in metadata.entry_points(group='distutils.setup_keywords'):
           File "/tmp/pip-build-env-4jw7otkj/overlay/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 999, in entry_points
             return SelectableGroups.load(eps).select(**params)
           File "/tmp/pip-build-env-4jw7otkj/overlay/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 449, in load
             ordered = sorted(eps, key=by_group)
           File "/tmp/pip-build-env-4jw7otkj/overlay/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 996, in <genexpr>
             eps = itertools.chain.from_iterable(
           File "/tmp/pip-build-env-4jw7otkj/overlay/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/_itertools.py", line 16, in unique_everseen
             k = key(element)
           File "/tmp/pip-build-env-4jw7otkj/overlay/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 931, in _normalized_name
             return self._name_from_stem(stem) or super()._normalized_name
           File "/tmp/pip-build-env-4jw7otkj/overlay/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 600, in _normalized_name
             return Prepared.normalize(self.name)
           File "/tmp/pip-build-env-4jw7otkj/overlay/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/__init__.py", line 855, in normalize
             return re.sub(r"[-_.]+", "-", name).lower().replace('-', '_')
           File "/app/.heroku/python/lib/python3.8/re.py", line 210, in sub
             return _compile(pattern, flags).sub(repl, string, count)
         TypeError: expected string or bytes-like object
         ----------------------------------------
       WARNING: Discarding git+https://github.com/cher-nov/cryptg. Command errored out with exit status 1: /app/.heroku/python/bin/python /app/.heroku/python/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp7p_1v0lw Check the logs for full command output.
       ERROR: Command errored out with exit status 1: /app/.heroku/python/bin/python /app/.heroku/python/lib/python3.8/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmp7p_1v0lw Check the logs for full command output.
 !     Push rejected, failed to compile Python app.
 !     Push failed
Build finished
[Blogs](https://blog.heroku.com/)
[Careers](https://www.heroku.com/careers)
a68366 commented 2 years ago

It looks like the error is caused by the .dist-info folder present in the repo. Removing it fixes the problem.

I also noticed this issue mentioned here: https://github.com/LonamiWebs/Telethon/pull/3778#issuecomment-1079651256

@Lonami is there a particular reason why the folder is named .dist-info? Simply renaming it to e.g. third-party-licenses should fix the CI.

Another possible fix is pinning setuptools version to setuptools==60.8.2. The error only occurs with setuptools>=60.9.0.

Lonami commented 2 years ago

is there a particular reason why the folder is named .dist-info?

No particular reason, probably read it somewhere. If it can be removed without consequences and it fixes the problem, we should probably do it.

Or maybe it will be fixed in a future setuptools version?

a68366 commented 2 years ago

I'm not very knowledgeable in how setuptools works, but if I remember correctly, folders with .dist-info in the name are supposed to be some sort of package metadata. Setuptools probably chokes on an unexpected folder content. As a simple solution, I think it would be better to delete/rename the folder to avoid any possible fututre problems.

пт, 15 апр. 2022 г., 14:03 Lonami @.***>:

is there a particular reason why the folder is named .dist-info?

No particular reason, probably read it somewhere. If it can be removed without consequences and it fixes the problem, we should probably do it.

Or maybe it will be fixed in a future setuptools version?

— Reply to this email directly, view it on GitHub https://github.com/cher-nov/cryptg/issues/17#issuecomment-1100040509, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7X4FMH25DRSPXGQXOFRTTVFFEGNANCNFSM5POYTGIQ . You are receiving this because you commented.Message ID: @.***>