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

Add setuptools dependency for pipx to work #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

v217
Copy link

@v217 v217 commented Jan 3, 2024

If you add setuptools as a dependency, then you can use pipx install dpt-rp1-py, probably the most convenient way to install dpt-rp1-py, if you don't use dpt-rp1-py as a library. Otherwise, you have to run additionally pipx inject dpt-rp1-py setuptools.

…dpt-rp1-py, probably the most convenient way to install dpt-rp1-py, if you don't use it as a library. Otherwise, you have to run additionally pipx inject dpt-rp1-py setuptools
@v217
Copy link
Author

v217 commented Jan 4, 2024

Here is the log on Fedora Silverblue 39:

v@acer ~> pipx install dpt-rp1-py
  installed package dpt-rp1-py 0.1.16, installed using Python 3.12.1
  These apps are now globally available
    - dptmount
    - dptrp1
done! ✨ 🌟 ✨
v@acer ~> dptrp1 --help
Traceback (most recent call last):
  File "/home/v/.local/bin/dptrp1", line 5, in <module>
    from dptrp1.cli.dptrp1 import main
  File "/var/home/v/.local/share/pipx/venvs/dpt-rp1-py/lib64/python3.12/site-packages/dptrp1/cli/dptrp1.py", line 12, in <module>
    from dptrp1.dptrp1 import DigitalPaper, find_auth_files, get_default_auth_files
  File "/var/home/v/.local/share/pipx/venvs/dpt-rp1-py/lib64/python3.12/site-packages/dptrp1/dptrp1.py", line 7, in <module>
    import httpsig
  File "/var/home/v/.local/share/pipx/venvs/dpt-rp1-py/lib64/python3.12/site-packages/httpsig/__init__.py", line 1, in <module>
    from pkg_resources import get_distribution, DistributionNotFound
ModuleNotFoundError: No module named 'pkg_resources'
v@acer ~> pipx inject dpt-rp1-py setuptools
  injected package setuptools into venv dpt-rp1-py
done! ✨ 🌟 ✨

Now dptrp1 works:

v@acer ~> dptrp1 --help
usage: dptrp1 [-h] [--client-id CLIENT_ID] [--key KEY] [--addr ADDR] [--serial SERIAL] [--yes] [--quiet]
              {copy-document,delete,delete-folder,delete-template,display-document,document-info,download,get-configuration,help,list-documents,list-folders,list-templates,move-document,new-folder,register,screenshot,set-configuration,sync,update-firmware,upload,upload-template,wifi,wifi-add,wifi-del,wifi-disable,wifi-enable,wifi-list,wifi-scan}
              [command_args ...]

Remote control for Sony DPT-RP1

positional arguments:
  {copy-document,delete,delete-folder,delete-template,display-document,document-info,download,get-configuration,help,list-documents,list-folders,list-templates,move-document,new-folder,register,screenshot,set-configuration,sync,update-firmware,upload,upload-template,wifi,wifi-add,wifi-del,wifi-disable,wifi-enable,wifi-list,wifi-scan}
                        Command to run
  command_args          Arguments for the command

options:
  -h, --help            show this help message and exit
  --client-id CLIENT_ID
                        File containing the device's client id
  --key KEY             File containing the device's private key
  --addr ADDR           Hostname or IP address of the device. Disables auto discovery.
  --serial SERIAL       Device serial number for auto discovery. Auto discovery only works for some minutes after the Digital Paper's
                        Wi-Fi setting is switched on.
  --yes, -y             Automatically answer yes to confirmation prompts, for running non-interactively.
  --quiet, -q           Suppress informative messages.

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

Successfully merging this pull request may close these issues.

1 participant