logcat-color icon indicating copy to clipboard operation
logcat-color copied to clipboard

Support python3.5

Open GabLeRoux opened this issue 8 years ago • 7 comments

Hi,
Thanks for this nice tool. Leaving a note here that it doesn't work on python3.5

deactivate
mkvirtualenv -p $(which python3) logcat-color
workon logcat-color
pip install logcat-color
Collecting logcat-color
  Downloading logcat-color-0.6.0.tar.gz
    Complete output from command python setup.py egg_info:
    running egg_info
    /Users/gableroux/.virtualenvs/logcat-color/lib/python3.5/site-packages/setuptools/dist.py:343: UserWarning: The version specified (b'0.6.0') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
      "details." % self.metadata.version
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/44/1h74hkj534j6b5cwsbkcsm200000gn/T/pip-build-5r_tbmiw/logcat-color/setup.py", line 14, in <module>
        setup(**setup_data)
      File "/usr/local/Cellar/python35/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/local/Cellar/python35/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/local/Cellar/python35/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/dist.py", line 973, in run_command
        cmd_obj.ensure_finalized()
      File "/usr/local/Cellar/python35/3.5.2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/distutils/cmd.py", line 107, in ensure_finalized
        self.finalize_options()
      File "/Users/gableroux/.virtualenvs/logcat-color/lib/python3.5/site-packages/setuptools/command/egg_info.py", line 172, in finalize_options
        self.egg_name = safe_name(self.distribution.get_name())
      File "/Users/gableroux/.virtualenvs/logcat-color/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1378, in safe_name
        return re.sub('[^A-Za-z0-9.]+', '-', name)
      File "/Users/gableroux/.virtualenvs/logcat-color/lib/python3.5/re.py", line 182, in sub
        return _compile(pattern, flags).sub(repl, string, count)
    TypeError: cannot use a string pattern on a bytes-like object

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/44/1h74hkj534j6b5cwsbkcsm200000gn/T/pip-build-5r_tbmiw/logcat-color/
python --version
Python 3.5.2

But it works on python2.7 👍

deactivate
rmvirtualenv logcat-color
mkvirtualenv -p $(which python2.7) logcat-color
workong logcat-color
pip install logcat-color
Collecting logcat-color
  Using cached logcat-color-0.6.0.tar.gz
Collecting colorama (from logcat-color)
  Using cached colorama-0.3.7-py2.py3-none-any.whl
Building wheels for collected packages: logcat-color
  Running setup.py bdist_wheel for logcat-color ... done
  Stored in directory: /Users/gableroux/Library/Caches/pip/wheels/e0/0d/b8/8a97953450fdae828ce74af1a9072dea36b1d3a9c2da6569d2
Successfully built logcat-color
Installing collected packages: colorama, logcat-color
Successfully installed colorama-0.3.7 logcat-color-0.6.0
python --version
Python 2.7.13

GabLeRoux avatar Mar 31 '17 23:03 GabLeRoux

I'm also experiencing this on both python 3.5.3 and 3.6.1.

quezak avatar Sep 14 '17 10:09 quezak

Experiencing this issue on Python 3.7.0, Windows 10 Home.

ericswpark avatar Aug 01 '18 06:08 ericswpark

+1

static-electron avatar Nov 10 '18 23:11 static-electron

I created a fork with Python 3 support: https://github.com/yan12125/logcat-color3/releases/tag/v0.8.0

yan12125 avatar Apr 08 '19 10:04 yan12125

I confirm your fork works on python 3.6.3. @ yan12125 You should send a PR so it gets published as the new base.

pip install git+https://github.com/yan12125/logcat-color3\#egg\=logcat-color3

👍

GabLeRoux avatar Apr 08 '19 12:04 GabLeRoux

Thanks for an example command for installing my fork!

You should send a PR so it gets published as the new base.

Well, I did that almost 3 years ago (https://github.com/marshall/logcat-color/pull/24). Without any comment, I assume the original maintainer is not interested in it, thus the fork.

yan12125 avatar Apr 08 '19 12:04 yan12125

I've uploaded 0.9.0 to PyPI, so you can install my fork without bothering git :)

pip install logcat-color3

yan12125 avatar Apr 11 '19 15:04 yan12125