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

Current version in git installer seems broken #46

Closed
fake-name opened this issue May 9, 2017 · 12 comments
Closed

Current version in git installer seems broken #46

fake-name opened this issue May 9, 2017 · 12 comments

Comments

@fake-name
Copy link

fake-name commented May 9, 2017

On a fresh install from git:


pi@testpi:~$ sudo pip3 install git+https://github.com/dbrgn/RPLCD.git
Collecting git+https://github.com/dbrgn/RPLCD.git
  Cloning https://github.com/dbrgn/RPLCD.git to /tmp/pip-vatij0r9-build
Installing collected packages: RPLCD
  Running setup.py install for RPLCD ... done
Successfully installed RPLCD-0.4.0

Traceback (most recent call last):
  File "test_20x4.py", line 7, in <module>
    from RPLCD import gpio, i2c
  File "/usr/local/lib/python3.4/dist-packages/RPLCD/__init__.py", line 5, in <module>
    from .gpio import CharLCD as GpioCharLCD
  File "/usr/local/lib/python3.4/dist-packages/RPLCD/gpio.py", line 30, in <module>
    from .lcd import BaseCharLCD
  File "/usr/local/lib/python3.4/dist-packages/RPLCD/lcd.py", line 27, in <module>
    from . import codecs
ImportError: cannot import name 'codecs'

Somehow, the codecs directory isn't getting created. I suspect that the setuptools dependency resolution isn't detecting the codecs files.

I manually cloned the repository, and the problem still occurs:

130 pi@testpi:~$ git clone https://github.com/dbrgn/RPLCD.git
Cloning into 'RPLCD'...
remote: Counting objects: 667, done.
remote: Total 667 (delta 0), reused 0 (delta 0), pack-reused 667
Receiving objects: 100% (667/667), 569.38 KiB | 967.00 KiB/s, done.
Resolving deltas: 100% (374/374), done.
Checking connectivity... done.
pi@testpi:~$ cd RPLCD/
pi@testpi:~/RPLCD$ ls
CHANGELOG.md  CONTRIBUTING.md  CONTRIBUTORS  docs  LICENSE  MANIFEST.in  photo-i2c.jpg  photo.jpg  pytest.ini  README.rst  requirements-dev.txt  RPLCD  setup.cfg  setup.py  show_charmap.py  test_16x2.py  test_20x4.py  tests
pi@testpi:~/RPLCD$ sudo python3 setup.py install
running install
running bdist_egg
running egg_info
creating RPLCD.egg-info
writing top-level names to RPLCD.egg-info/top_level.txt
writing dependency_links to RPLCD.egg-info/dependency_links.txt
writing RPLCD.egg-info/PKG-INFO
writing manifest file 'RPLCD.egg-info/SOURCES.txt'
reading manifest file 'RPLCD.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.pyc' found under directory '*'
writing manifest file 'RPLCD.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
creating build
creating build/lib
creating build/lib/RPLCD
copying RPLCD/i2c.py -> build/lib/RPLCD
copying RPLCD/lcd.py -> build/lib/RPLCD
copying RPLCD/enum.py -> build/lib/RPLCD
copying RPLCD/contextmanagers.py -> build/lib/RPLCD
copying RPLCD/compat.py -> build/lib/RPLCD
copying RPLCD/gpio.py -> build/lib/RPLCD
copying RPLCD/common.py -> build/lib/RPLCD
copying RPLCD/__init__.py -> build/lib/RPLCD
creating build/bdist.linux-armv7l
creating build/bdist.linux-armv7l/egg
creating build/bdist.linux-armv7l/egg/RPLCD
copying build/lib/RPLCD/i2c.py -> build/bdist.linux-armv7l/egg/RPLCD
copying build/lib/RPLCD/lcd.py -> build/bdist.linux-armv7l/egg/RPLCD
copying build/lib/RPLCD/enum.py -> build/bdist.linux-armv7l/egg/RPLCD
copying build/lib/RPLCD/contextmanagers.py -> build/bdist.linux-armv7l/egg/RPLCD
copying build/lib/RPLCD/compat.py -> build/bdist.linux-armv7l/egg/RPLCD
copying build/lib/RPLCD/gpio.py -> build/bdist.linux-armv7l/egg/RPLCD
copying build/lib/RPLCD/common.py -> build/bdist.linux-armv7l/egg/RPLCD
copying build/lib/RPLCD/__init__.py -> build/bdist.linux-armv7l/egg/RPLCD
byte-compiling build/bdist.linux-armv7l/egg/RPLCD/i2c.py to i2c.cpython-34.pyc
byte-compiling build/bdist.linux-armv7l/egg/RPLCD/lcd.py to lcd.cpython-34.pyc
byte-compiling build/bdist.linux-armv7l/egg/RPLCD/enum.py to enum.cpython-34.pyc
byte-compiling build/bdist.linux-armv7l/egg/RPLCD/contextmanagers.py to contextmanagers.cpython-34.pyc
byte-compiling build/bdist.linux-armv7l/egg/RPLCD/compat.py to compat.cpython-34.pyc
byte-compiling build/bdist.linux-armv7l/egg/RPLCD/gpio.py to gpio.cpython-34.pyc
byte-compiling build/bdist.linux-armv7l/egg/RPLCD/common.py to common.cpython-34.pyc
byte-compiling build/bdist.linux-armv7l/egg/RPLCD/__init__.py to __init__.cpython-34.pyc
creating build/bdist.linux-armv7l/egg/EGG-INFO
copying RPLCD.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO
copying RPLCD.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying RPLCD.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying RPLCD.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist/RPLCD-0.4.0-py3.4.egg' and adding 'build/bdist.linux-armv7l/egg' to it
removing 'build/bdist.linux-armv7l/egg' (and everything under it)
Processing RPLCD-0.4.0-py3.4.egg
Copying RPLCD-0.4.0-py3.4.egg to /usr/local/lib/python3.4/dist-packages
Adding RPLCD 0.4.0 to easy-install.pth file

Installed /usr/local/lib/python3.4/dist-packages/RPLCD-0.4.0-py3.4.egg
Processing dependencies for RPLCD==0.4.0
Finished processing dependencies for RPLCD==0.4.0


130 pi@testpi:~$ python3
Python 3.4.2 (default, Oct 19 2014, 13:31:11)
[GCC 4.9.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import RPLCD
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.4/dist-packages/RPLCD-0.4.0-py3.4.egg/RPLCD/__init__.py", line 5, in <module>
  File "/usr/local/lib/python3.4/dist-packages/RPLCD-0.4.0-py3.4.egg/RPLCD/gpio.py", line 30, in <module>
  File "/usr/local/lib/python3.4/dist-packages/RPLCD-0.4.0-py3.4.egg/RPLCD/lcd.py", line 27, in <module>
ImportError: cannot import name 'codecs'

@fake-name fake-name changed the title Install from git somehow broken Current version in git installer seems broken May 9, 2017
@fake-name
Copy link
Author

I think the breaking commit is d4dc083

@dbrgn
Copy link
Owner

dbrgn commented May 9, 2017

Ah, yeah, thanks for this issue! I think the problem is a missing MANIFEST.in entry or something like that.

I'll make a new pypi release hopefully today. If not today, then definitely tomorrow.

@fake-name
Copy link
Author

fake-name commented May 9, 2017

Coo.

For the moment, I just got lazy and vendored the whole library. It works fine from the git folder.

Having this makes my life a lot easier, thanks for releasing it!


As a side-note, the 20x4 test python file is broken:

lcd = i2c.CharLCD(int(sys.argv[2], 16), cols=16, rows=2, charmap=sys.argv[3])
lcd = gpio.CharLCD(cols=16, rows=2, charmap=sys.argv[2])

Neither of the above are 4x20, but that was easy to fix.

@dbrgn
Copy link
Owner

dbrgn commented May 9, 2017

Release 0.9.0 is out on PyPI! A simple pip install RPLCD should work now.

@dbrgn
Copy link
Owner

dbrgn commented May 9, 2017

For the moment, I just got lazy and vendored the whole library. It works fine from the git folder.

Sure, that's fine. If you want, you can now check out the v0.9.0 tag to get the stable version.

Having this makes my life a lot easier, thanks for releasing it!

Great to hear :)

As a side-note, the 20x4 test python file is broken:

Oh, thanks for letting me know. I'll fix :)

@fake-name
Copy link
Author

Wait, did you go from 0.4.0 to 0.9.0? What happened to 0.5.0 - 0.8.0?

@dbrgn
Copy link
Owner

dbrgn commented May 9, 2017

Yep, I plan to release 1.0.0 soon, and 0.9.0 is something like the "release candidate".

dbrgn added a commit that referenced this issue May 9, 2017
@fake-name
Copy link
Author

Heh, I see. I kind of guessed it was something like that.

It sure seems a hell of a lot more stable then most raspberry pi stuff I've run across.

@dbrgn
Copy link
Owner

dbrgn commented May 9, 2017

It sure seems a hell of a lot more stable then most raspberry pi stuff I've run across.

Thanks! That was one of my main goals. Most scripts for the Pi are copy-pasted from some tutorials and consist of very hacky code. I wanted something clean and pythonic, with an easy API.

@fake-name
Copy link
Author

Just installed from github, it seems to work fine.

Only complaint I have at this point is there's no .__version__, .version or similar, so it's hard to tell what version I'm actually using. That really just a nicety, though.

@dbrgn
Copy link
Owner

dbrgn commented May 11, 2017

You can check setup.py :) If it's important to you, feel free to open an issue for it.

@fake-name
Copy link
Author

fake-name commented May 11, 2017

The issue I had here was more "Ok, I /think/ it installed over my manual version, how do I verify what version I'm running".

Basically, I had a installed instance that seemed to work, but I wasn't sure if it was actually the one from pypi or one I installed manually. Once the package is installed, there doesn't seem to be an easy way to determine the version, short of finding the module location and looking in the source file/at the egg manually.

It's a minor issue, though.

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

No branches or pull requests

2 participants