dadadel / pyment

Format and convert Python docstrings and generates patches
GNU General Public License v3.0
905 stars 62 forks source link

Fails on installation using python 3.6.2 #50

Closed humitos closed 7 years ago

humitos commented 7 years ago

Something is broken when installing in Python 3.6.2

In python 2.7.14 it works...

[humitos@julia:~]$ pyenv virtualenv 2.7.14 test
New python executable in /home/humitos/.pyenv/versions/2.7.14/envs/test/bin/python2.7
Also creating executable in /home/humitos/.pyenv/versions/2.7.14/envs/test/bin/python
Installing setuptools, pip, wheel...done.
Requirement already satisfied: setuptools in /home/humitos/.pyenv/versions/2.7.14/envs/test/lib/python2.7/site-packages
Requirement already satisfied: pip in /home/humitos/.pyenv/versions/2.7.14/envs/test/lib/python2.7/site-packages
(test) [humitos@julia:~]$ pip install pyment
Collecting pyment
  Could not find a version that satisfies the requirement pyment (from versions: )
No matching distribution found for pyment
(test) [humitos@julia:~]$ pip install git+https://github.com/dadadel/pyment.git#egg=pyment
Collecting pyment from git+https://github.com/dadadel/pyment.git#egg=pyment
  Cloning https://github.com/dadadel/pyment.git to /tmp/pip-build-MOA7T_/pyment
Installing collected packages: pyment
  Running setup.py install for pyment ... done
Successfully installed pyment-0.3.2.dev4
(test) [humitos@julia:~]$ 

but in python 3.6.2 I got this error:

[humitos@julia:~]$ pyenv virtualenv 3.6.2 test
Requirement already satisfied: setuptools in /home/humitos/.pyenv/versions/3.6.2/envs/test/lib/python3.6/site-packages
Requirement already satisfied: pip in /home/humitos/.pyenv/versions/3.6.2/envs/test/lib/python3.6/site-packages
(test) [humitos@julia:~]$ pip install git+https://github.com/dadadel/pyment.git#egg=pyment
Collecting pyment from git+https://github.com/dadadel/pyment.git#egg=pyment
  Cloning https://github.com/dadadel/pyment.git to /tmp/pip-build-sorkrbkd/pyment
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-sorkrbkd/pyment/setup.py", line 5, in <module>
        import pyment
      File "/tmp/pip-build-sorkrbkd/pyment/pyment/__init__.py", line 1, in <module>
        from .pyment import PyComment, __version__, __copyright__, __author__, __licence__
      File "/tmp/pip-build-sorkrbkd/pyment/pyment/pyment.py", line 8, in <module>
        from docstring import DocString
    ModuleNotFoundError: No module named 'docstring'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-sorkrbkd/pyment/
(test) [humitos@julia:~]$ python

Thanks!

dadadel commented 7 years ago

Hi @humitos Thanks for your report. The bug is related to relative import that I removed thinking it was working on Python3 but it's not. I don't know what should be the right way, so I just fixed back to old state. Thus, The commit 93c6869 fix this issue.

humitos commented 7 years ago

Thanks! It's working on when installing from master. I'm closing this issue.