Skip to content

Commit

Permalink
Merge remote-tracking branch 'branchvincent/3.12'
Browse files Browse the repository at this point in the history
  • Loading branch information
romanz committed Dec 14, 2024
2 parents f1fe7b5 + b958b08 commit 01b1b21
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']

steps:
- uses: actions/checkout@v4
Expand Down
1 change: 1 addition & 0 deletions agents/fake/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
author='Roman Zeyde',
author_email='[email protected]',
url='http://github.com/romanz/trezor-agent',
python_requires='>=3.8',
scripts=['fake_device_agent.py'],
install_requires=[
'libagent>=0.9.0',
Expand Down
1 change: 1 addition & 0 deletions agents/jade/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
author='Jamie C. Driver',
author_email='[email protected]',
url='http://github.com/romanz/trezor-agent',
python_requires='>=3.8',
scripts=['jade_agent.py'],
install_requires=[
'libagent>=0.14.5',
Expand Down
1 change: 1 addition & 0 deletions agents/keepkey/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
author='Roman Zeyde',
author_email='[email protected]',
url='http://github.com/romanz/trezor-agent',
python_requires='>=3.8',
scripts=['keepkey_agent.py'],
install_requires=[
'libagent>=0.9.0',
Expand Down
1 change: 1 addition & 0 deletions agents/ledger/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
author='Roman Zeyde',
author_email='[email protected]',
url='http://github.com/romanz/trezor-agent',
python_requires='>=3.8',
scripts=['ledger_agent.py'],
install_requires=[
'libagent>=0.9.0',
Expand Down
1 change: 1 addition & 0 deletions agents/onlykey/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
author='CryptoTrust',
author_email='[email protected]',
url='http://github.com/trustcrypto/onlykey-agent',
python_requires='>=3.8',
scripts=['onlykey_agent.py'],
install_requires=[
'libagent>=0.14.2',
Expand Down
1 change: 1 addition & 0 deletions agents/trezor/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
author='Roman Zeyde',
author_email='[email protected]',
url='http://github.com/romanz/trezor-agent',
python_requires='>=3.8',
scripts=['trezor_agent.py'],
install_requires=[
'libagent>=0.14.0',
Expand Down
7 changes: 3 additions & 4 deletions libagent/age/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
import logging
import os
import sys
from importlib import metadata

import bech32
import pkg_resources
from cryptography.exceptions import InvalidTag
from cryptography.hazmat.primitives.ciphers.aead import ChaCha20Poly1305

Expand Down Expand Up @@ -150,9 +150,8 @@ def main(device_type):
p = argparse.ArgumentParser()

agent_package = device_type.package_name()
resources_map = {r.key: r for r in pkg_resources.require(agent_package)}
resources = [resources_map[agent_package], resources_map['libagent']]
versions = '\n'.join('{}={}'.format(r.key, r.version) for r in resources)
resources = [metadata.distribution(agent_package), metadata.distribution('libagent')]
versions = '\n'.join('{}={}'.format(r.metadata['Name'], r.version) for r in resources)
p.add_argument('--version', help='print the version info',
action='version', version=versions)

Expand Down
7 changes: 3 additions & 4 deletions libagent/gpg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
import stat
import subprocess
import sys
from importlib import metadata

try:
# TODO: Not supported on Windows. Use daemoniker instead?
import daemon
except ImportError:
daemon = None
import pkg_resources
import semver

from .. import device, formats, server, util
Expand Down Expand Up @@ -308,9 +308,8 @@ def main(device_type):
parser = argparse.ArgumentParser(epilog=epilog)

agent_package = device_type.package_name()
resources_map = {r.key: r for r in pkg_resources.require(agent_package)}
resources = [resources_map[agent_package], resources_map['libagent']]
versions = '\n'.join('{}={}'.format(r.key, r.version) for r in resources)
resources = [metadata.distribution(agent_package), metadata.distribution('libagent')]
versions = '\n'.join('{}={}'.format(r.metadata['Name'], r.version) for r in resources)
parser.add_argument('--version', help='print the version info',
action='version', version=versions)

Expand Down
7 changes: 3 additions & 4 deletions libagent/ssh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import sys
import tempfile
import threading
from importlib import metadata

import configargparse

Expand All @@ -21,7 +22,6 @@
import daemon
except ImportError:
daemon = None
import pkg_resources

from .. import device, formats, server, util
from . import client, protocol
Expand Down Expand Up @@ -83,9 +83,8 @@ def create_agent_parser(device_type):
p.add_argument('-v', '--verbose', default=0, action='count')

agent_package = device_type.package_name()
resources_map = {r.key: r for r in pkg_resources.require(agent_package)}
resources = [resources_map[agent_package], resources_map['libagent']]
versions = '\n'.join('{}={}'.format(r.key, r.version) for r in resources)
resources = [metadata.distribution(agent_package), metadata.distribution('libagent')]
versions = '\n'.join('{}={}'.format(r.metadata['Name'], r.version) for r in resources)
p.add_argument('--version', help='print the version info',
action='version', version=versions)

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
author='Roman Zeyde',
author_email='[email protected]',
url='http://github.com/romanz/trezor-agent',
python_requires='>=3.8',
packages=[
'libagent',
'libagent.age',
Expand Down

0 comments on commit 01b1b21

Please sign in to comment.