adafruit / Adafruit_CircuitPython_Waveform

CircuitPython library to generate single wavelength waveforms.
MIT License
7 stars 13 forks source link

Not installing properly on regular computers (non-circuitpython devices) #23

Closed duckythescientist closed 2 years ago

duckythescientist commented 2 years ago

As far as I can tell, the actual Python files for this library aren't being installed anywhere on the system when doing a pip install. I've tried this on two separate Linux desktops and in a venv. I get an adafruit_circuitpython_waveform-***.dist-info folder in my site-packages but there's no corresponding adafruit_waveform folder with any source/pyc.

duck@alura:~/test$ mkdir project-name && cd project-name
duck@alura:~/test/project-name$ python3 -m venv .venv
duck@alura:~/test/project-name$ source .venv/bin/activate
[.venv]duck@alura:~/test/project-name$ pip3 install adafruit-circuitpython-waveform
Collecting adafruit-circuitpython-waveform
  Using cached adafruit_circuitpython_waveform-1.3.16-py3-none-any.whl (3.4 kB)
Installing collected packages: adafruit-circuitpython-waveform
Successfully installed adafruit-circuitpython-waveform-1.3.16
[.venv]duck@alura:~/test/project-name$ python3
Python 3.8.10 (default, Jun 22 2022, 20:18:18) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from adafruit_waveform import sine
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'adafruit_waveform'
tekktrik commented 2 years ago

Hi @duckythescientist, looks like the problem is in the pyproject.toml file, so the contents on PyPI won't install correctly. PR #24 fixes this, but if you want the fix in the meantime, you can download the source code and make this change. You can then use pip install . in the root repository folder to install the library.

Of course, once the PR is merged and uploaded to PyPI, you can use pip install --upgrade adafruit-circuitpython-waveform to update to the latest :)

tekktrik commented 2 years ago

@duckythescientist You're good to upgrade!