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

Package doesn't declare dependencies #26

Closed
tilusnet opened this issue May 10, 2022 · 4 comments · Fixed by #32
Closed

Package doesn't declare dependencies #26

tilusnet opened this issue May 10, 2022 · 4 comments · Fixed by #32
Assignees
Labels
bug Something isn't working

Comments

@tilusnet
Copy link

This package should declare all library dependencies. I don't think it does.
Eg: spidev, numpy, etc. won't get installed if someone installs this library.

@cpietsch
Copy link

In https://github.com/pimoroni/pirate-audio there is an entry for that. Missing here though.

sudo apt-get update
sudo apt-get install python-rpi.gpio python-spidev python-pip python-pil python-numpy

@johnbchron
Copy link

Not sure if this is necessary but the explicitly python3 version of that is

sudo apt-get install python3-rpi.gpio python3-spidev python3-pip python3-pil python3-numpy

@ageeandakeyboard ageeandakeyboard added the documentation Improvements or additions to documentation label Jan 20, 2023
@darac
Copy link

darac commented Jun 16, 2024

Is there a reason that these requirements are "hidden" in the documentation, rather than being declared in a machine readable manner?

It is usually expected that, the following would work:

❯ python -m venv .venv
❯ . .venv/bin/activate
❯ pip install st7789
Collecting st7789
  Downloading st7789-1.0.0-py3-none-any.whl.metadata (5.6 kB)
Collecting gpiod (from st7789)
  Downloading gpiod-2.1.3.tar.gz (53 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.1/53.1 kB 776.5 kB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting gpiodevice>=0.0.4 (from st7789)
  Downloading gpiodevice-0.0.5-py3-none-any.whl.metadata (4.0 kB)
Downloading st7789-1.0.0-py3-none-any.whl (10 kB)
Downloading gpiodevice-0.0.5-py3-none-any.whl (9.2 kB)
Building wheels for collected packages: gpiod
  Building wheel for gpiod (pyproject.toml) ... done
  Created wheel for gpiod: filename=gpiod-2.1.3-cp311-cp311-linux_x86_64.whl size=93452 sha256=c63c1a4b3af6628e7b160ff7c50e8afb785b56ed06d3a8baaa9abe1f9c7e22c2
  Stored in directory: /home/ipa/darac/.cache/pip/wheels/81/1c/ec/7b8a80a113b96dd990c7f4e41af5d2e2cb1e99a67c2a4bb110
Successfully built gpiod
Installing collected packages: gpiod, gpiodevice, st7789
Successfully installed gpiod-2.1.3 gpiodevice-0.0.5 st7789-1.0.0
❯ python
Python 3.11.9 (main, Apr 10 2024, 13:16:36) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import st7789
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/tmp/test/.venv/lib/python3.11/site-packages/st7789/__init__.py", line 26, in <module>
    import numpy
ModuleNotFoundError: No module named 'numpy'
>>> 

@Gadgetoid
Copy link
Member

Is there a reason that these requirements are "hidden" in the documentation, rather than being declared in a machine readable manner?

historically yes

now? Not so much!

small stuff-up on my part

@Gadgetoid Gadgetoid self-assigned this Jun 16, 2024
@Gadgetoid Gadgetoid added bug Something isn't working and removed documentation Improvements or additions to documentation labels Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants