jiptool / jip

Java dependency management for Jython
http://pypi.python.org/pypi/jip/
Other
59 stars 15 forks source link

setup.py install fails on Ubuntu vivid: SyntaxError: mismatched input 'as' expecting COLON #26

Closed jayvdb closed 8 years ago

jayvdb commented 9 years ago

After installing jython 2.5.3-3 on Ubuntu 15.04:

jip-0.9.4$ jython setup.py install
"my" variable $jythonHome masks earlier declaration in same scope at /usr/bin/jython line 15.
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar 
Traceback (most recent call last):
  File "setup.py", line 29, in <module>
    from jip import JIP_VERSION as version
  File ".../jip-0.9.4/jip/__init__.py", line 33, in <module>
    from jip.repository import repos_manager
  File ".../jip/repository.py", line 43, in <module>
    from jip.util import DownloadException, download, download_string, get_virtual_home
  File ".../jip-0.9.4/jip/util.py", line 65
    except requests.exceptions.RequestException as e:
                                               ^
SyntaxError: mismatched input 'as' expecting COLON

This feels like it might be an upstream problem with jython, but I am very green at jython. Also as I am following the typical newbie approach of install jython and then jip, this might be useful to add a helpful error message.

sunng87 commented 9 years ago

Seems the as keyword is not supported by python 2.5: http://stackoverflow.com/questions/11285313/try-except-as-error-in-python-2-5-python-3-x

sunng87 commented 9 years ago

Please update to jip 0.9.5 and test again. jip isn't well tested under python 2.5 so I suggest you to upgrade your jython to latest 2.7.

jayvdb commented 9 years ago

With 0.9.5:

$ jython setup.py install
"my" variable $jythonHome masks earlier declaration in same scope at /usr/bin/jython line 15.
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar 
/usr/share/jython/Lib/distutils/dist.py:263: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
/usr/share/jython/Lib/distutils/dist.py:263: UserWarning: Unknown distribution option: 'entry_points'
  warnings.warn(msg)
running install
running build
running build_py
creating build
creating build/lib
creating build/lib/jip
copying jip/embed.py -> build/lib/jip
copying jip/search.py -> build/lib/jip
copying jip/index.py -> build/lib/jip
copying jip/dist.py -> build/lib/jip
copying jip/repository.py -> build/lib/jip
copying jip/commands.py -> build/lib/jip
copying jip/cache.py -> build/lib/jip
copying jip/main.py -> build/lib/jip
copying jip/maven.py -> build/lib/jip
copying jip/util.py -> build/lib/jip
copying jip/__init__.py -> build/lib/jip
running build_scripts
creating build/scripts-2.5
copying scripts/jython-all -> build/scripts-2.5
error: build/scripts-2.5/jython-all: Unknown error: 20000

I'm happy to test changes from git so you dont need to do a release. If you're interested in jip working with the Ubuntu distributed jython, it would be a good idea to add 2.5 to .travis.yml

baztian commented 9 years ago

Supporting python 2.5 would make it harder to implement python 3 support.

sunng87 commented 9 years ago

Just googled and find this: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752357

It's a bug of jython on Debian/Ubuntu.

wikier commented 8 years ago

Closing... Old issue.