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

trezor-agent: update trezor dependency to 0.13.9 #183792

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

romanz
Copy link
Contributor

@romanz romanz commented Sep 7, 2024

Following romanz/trezor-agent#485.

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing HOMEBREW_NO_INSTALL_FROM_API=1 brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

@github-actions github-actions bot added autosquash Automatically squash pull request commits according to Homebrew style. python Python use is a significant feature of the PR or issue labels Sep 7, 2024
Update `trezor` dependency to 0.13.9 to support TREZOR Safe 5.

Following romanz/trezor-agent#485.
@github-actions github-actions bot removed the autosquash Automatically squash pull request commits according to Homebrew style. label Sep 7, 2024
@carlocab carlocab changed the title Update trezor dependency to 0.13.9 in trezor-agent.rb trezor-agent: update trezor dependency to 0.13.9 Sep 7, 2024
@chenrui333
Copy link
Member

ModuleNotFoundError: No module named 'setuptools.extern'

@chenrui333 chenrui333 added the build failure CI fails while building the software label Sep 7, 2024
@romanz
Copy link
Contributor Author

romanz commented Sep 8, 2024

2024-09-07T08:58:15.6856860Z   Getting requirements to build wheel: started
2024-09-07T08:58:15.6856990Z   Running command Getting requirements to build wheel
2024-09-07T08:58:15.6857070Z   Traceback (most recent call last):
2024-09-07T08:58:15.6857520Z     File "/opt/homebrew/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
2024-09-07T08:58:15.6857580Z       main()
2024-09-07T08:58:15.6858020Z     File "/opt/homebrew/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
2024-09-07T08:58:15.6858180Z       json_out['return_val'] = hook(**hook_input['kwargs'])
2024-09-07T08:58:15.6858280Z                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-07T08:58:15.6858810Z     File "/opt/homebrew/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
2024-09-07T08:58:15.6858920Z       return hook(config_settings)
2024-09-07T08:58:15.6858990Z              ^^^^^^^^^^^^^^^^^^^^^
2024-09-07T08:58:15.6859610Z     File "/private/tmp/pip-build-env-swhtgmy7/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 332, in get_requires_for_build_wheel
2024-09-07T08:58:15.6859800Z       return self._get_build_requires(config_settings, requirements=[])
2024-09-07T08:58:15.6859900Z              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-09-07T08:58:15.6860430Z     File "/private/tmp/pip-build-env-swhtgmy7/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 302, in _get_build_requires
2024-09-07T08:58:15.6860490Z       self.run_setup()
2024-09-07T08:58:15.6860970Z     File "/private/tmp/pip-build-env-swhtgmy7/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 318, in run_setup
2024-09-07T08:58:15.6861050Z       exec(code, locals())
2024-09-07T08:58:15.6861140Z     File "<string>", line 23, in <module>
2024-09-07T08:58:15.6861610Z     File "/private/tmp/trezor-agent--python-daemon-20240907-19592-152l4x/python-daemon-3.0.1/version.py", line 39, in <module>
2024-09-07T08:58:15.6861730Z       import setuptools.extern.packaging.version
2024-09-07T08:58:15.6861920Z   ModuleNotFoundError: No module named 'setuptools.extern'
2024-09-07T08:58:15.6862030Z   error: subprocess-exited-with-error
2024-09-07T08:58:15.6862090Z   
2024-09-07T08:58:15.6862290Z   × Getting requirements to build wheel did not run successfully.
2024-09-07T08:58:15.6862380Z   │ exit code: 1
2024-09-07T08:58:15.6862480Z   ╰─> See above for output.
2024-09-07T08:58:15.6862540Z   
2024-09-07T08:58:15.6862780Z   note: This error originates from a subprocess, and is likely not a problem with pip.
2024-09-07T08:58:15.6863630Z   full command: /opt/homebrew/Cellar/trezor-agent/0.12.0_6/libexec/bin/python /opt/homebrew/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py get_requires_for_build_wheel /private/tmp/tmpl_vx4xly
2024-09-07T08:58:15.6863960Z   cwd: /private/tmp/trezor-agent--python-daemon-20240907-19592-152l4x/python-daemon-3.0.1
2024-09-07T08:58:15.6864170Z   Getting requirements to build wheel: finished with status 'error'
2024-09-07T08:58:15.6864320Z error: subprocess-exited-with-error
2024-09-07T08:58:15.6864320Z 
2024-09-07T08:58:15.6864520Z × Getting requirements to build wheel did not run successfully.
2024-09-07T08:58:15.6864600Z │ exit code: 1
2024-09-07T08:58:15.6864700Z ╰─> See above for output.

@romanz
Copy link
Contributor Author

romanz commented Sep 8, 2024

Seems to be related to #178205 (comment) -> https://pagure.io/python-daemon/issue/94.

@cho-m
Copy link
Member

cho-m commented Sep 9, 2024

You can use a similar workaround:

venv = virtualenv_install_with_resources without: "python-daemon"
# Workaround breaking change in `setuptools`: https://pagure.io/python-daemon/issue/94
resource("python-daemon").stage do
inreplace "version.py", "import setuptools.extern.packaging.version", ""
inreplace "version.py", "self.validate_version(version)", ""
venv.pip_install Pathname.pwd
end


On an unrelated note, I've wondered if we should just combine these formulae as we are installing everything into trezor-agent due to extra_packages:

"trezor-agent": {
"exclude_packages": ["certifi", "cryptography", "pillow"],
"extra_packages": ["ledger-agent", "keepkey-agent"]

Just that the bins are not exposed yet.

EDIT: Though versioning is different unless we use libagent versions.

@github-actions github-actions bot added the autosquash Automatically squash pull request commits according to Homebrew style. label Sep 10, 2024
@romanz
Copy link
Contributor Author

romanz commented Sep 10, 2024

@cho-m Thanks for the suggestion, but unfortunately I am not familiar enough with Homebrew API...
Could you please help us to update the trezor dependency to 0.13.9?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosquash Automatically squash pull request commits according to Homebrew style. build failure CI fails while building the software python Python use is a significant feature of the PR or issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants