eblot / pyspiflash

SPI data flash device drivers (pure Python)
MIT License
39 stars 30 forks source link

Installation failure #11

Closed ahogen closed 5 years ago

ahogen commented 6 years ago

I was attempting to install this in Python 3.6 (Windows 7 x64) with the following command.

python -m pip install pyspiflash

This resulted in an installation failure.

Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-i4aiebiz/pyspiflash/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpp1oz4q8cpip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/spiflash
  copying ./spiflash/__init__.py -> build/lib/spiflash
  copying ./spiflash/serialflash.py -> build/lib/spiflash
  copying ./spiflash/README.rst -> build/lib/spiflash
  installing to build/bdist.linux-x86_64/wheel
  running install
  running install_lib
  creating build/bdist.linux-x86_64
  creating build/bdist.linux-x86_64/wheel
  creating build/bdist.linux-x86_64/wheel/spiflash
  copying build/lib/spiflash/README.rst -> build/bdist.linux-x86_64/wheel/spiflash
  copying build/lib/spiflash/__init__.py -> build/bdist.linux-x86_64/wheel/spiflash
  copying build/lib/spiflash/serialflash.py -> build/bdist.linux-x86_64/wheel/spiflash
  running install_egg_info
  running egg_info
  writing pyspiflash.egg-info/PKG-INFO
  writing dependency_links to pyspiflash.egg-info/dependency_links.txt
  writing requirements to pyspiflash.egg-info/requires.txt
  writing top-level names to pyspiflash.egg-info/top_level.txt
  reading manifest file 'pyspiflash.egg-info/SOURCES.txt'
  writing manifest file 'pyspiflash.egg-info/SOURCES.txt'
  Copying pyspiflash.egg-info to build/bdist.linux-x86_64/wheel/pyspiflash-0.5.2-py3.6.egg-info
  running install_scripts
  error: [Errno 2] No such file or directory: 'spiflash/LICENSE'

  ----------------------------------------
  Failed building wheel for pyspiflash
  Running setup.py clean for pyspiflash

Could this be because of the switch from egg to wheel?

eblot commented 6 years ago

No it's an error I've already fixed with PyFtdi and I forgot to port back to PySpiFlash.

eblot commented 6 years ago

I wonder why I can't reproduce it, because there is indeed a reference to a non-existing file...

eblot@glencoe:~
$ python3 -m venv ~/Python/PySpiFlash

eblot@glencoe:~
$ . ~/Python/PySpiFlash/bin/activate

(PySpiFlash) eblot@glencoe:~
$ pip3 install -U pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 9.0.3
    Uninstalling pip-9.0.3:
      Successfully uninstalled pip-9.0.3
Successfully installed pip-18.0

(PySpiFlash)eblot@glencoe:~
$ pip3 install pyspiflash
Collecting pyspiflash
  Using cached https://files.pythonhosted.org/packages/62/71/3e1f784d52944a77cefea984e83912fb61ed58187cb6c7ffbc127cdc9f95/pyspiflash-0.5.2.tar.gz
Collecting pyftdi>=0.22.0 (from pyspiflash)
  Using cached https://files.pythonhosted.org/packages/c1/5d/cbea286c5e774128180c14db9a9fce3cf3d2bbbc8afcc29a764344a41ee7/pyftdi-0.29.2.tar.gz
Collecting pyusb>=1.0.0 (from pyftdi>=0.22.0->pyspiflash)
  Using cached https://files.pythonhosted.org/packages/5f/34/2095e821c01225377dda4ebdbd53d8316d6abb243c9bee43d3888fa91dd6/pyusb-1.0.2.tar.gz
Collecting pyserial>=3.0 (from pyftdi>=0.22.0->pyspiflash)
  Using cached https://files.pythonhosted.org/packages/0d/e4/2a744dd9e3be04a0c0907414e2a01a7c88bb3915cbe3c8cc06e209f59c30/pyserial-3.4-py2.py3-none-any.whl
Installing collected packages: pyusb, pyserial, pyftdi, pyspiflash
  Running setup.py install for pyusb ... done
  Running setup.py install for pyftdi ... done
  Running setup.py install for pyspiflash ... done
Successfully installed pyftdi-0.29.2 pyserial-3.4 pyspiflash-0.5.2 pyusb-1.0.2

(PySpiFlash) eblot@glencoe:~
eblot commented 6 years ago

Actually the file exists where it is supposed to be... I hate the setuptools. It's an endless nightmare.

eblot commented 6 years ago

I'm still unable to reproduce this issue. I can remove LICENSE reference from the setup.cfg file, but I do not understand how to reproduce this issue. On PyFtdi, the file had actually been moved, but this is not the case in this project.