pyobjc install fails with travis ci

Issue #191 wontfix
benhylak
created an issue

Have pyobjc as a requirement in my requirements.txt file. All other requirements are installed, but pyobjc fails

$ python --version
Python 2.7.9

$ pip --version
pip 6.0.7 from /home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages (python 2.7)
0.72s$ pip install -r reference/requirements.txt

Collecting py-trello==0.9.0 (from -r reference/requirements.txt (line 1))
Downloading py-trello-0.9.0.tar.gz
Collecting pyobjc==3.2.1 (from -r reference/requirements.txt (line 2)
Downloading pyobjc-3.2.1.tar.gz
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/tmp/pip-build-qZ2F1u/pyobjc/setup.py", line 294, in <module>
        install_requires = BASE_REQUIRES + framework_requires(),
      File "/tmp/pip-build-qZ2F1u/pyobjc/setup.py", line 117, in framework_requires
        if introduced is not None and version_key(introduced) > version_key(build_platform):
      File "/tmp/pip-build-qZ2F1u/pyobjc/setup.py", line 110, in version_key
        return tuple(int(x) for x in version.split('.'))
      File "/tmp/pip-build-qZ2F1u/pyobjc/setup.py", line 110, in <genexpr>
        return tuple(int(x) for x in version.split('.'))
    ValueError: invalid literal for int() with base 10: ''
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

      File "<string>", line 20, in <module>

      File "/tmp/pip-build-qZ2F1u/pyobjc/setup.py", line 294, in <module>

        install_requires = BASE_REQUIRES + framework_requires(),

      File "/tmp/pip-build-qZ2F1u/pyobjc/setup.py", line 117, in framework_requires

        if introduced is not None and version_key(introduced) > version_key(build_platform):

      File "/tmp/pip-build-qZ2F1u/pyobjc/setup.py", line 110, in version_key

        return tuple(int(x) for x in version.split('.'))

      File "/tmp/pip-build-qZ2F1u/pyobjc/setup.py", line 110, in <genexpr>

        return tuple(int(x) for x in version.split('.'))

    ValueError: invalid literal for int() with base 10: ''

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-qZ2F1u/pyobjc

Comments (9)

  1. Shu Chow

    Hi, @Ronald Oussoren.

    I'm getting this exact same error when I try to install from PyOBJC From a Dockerfile:

    Collecting pyobjc==3.2.1 (from -r /app/new_requirements.txt (line 31))
      Downloading pyobjc-3.2.1.tar.gz
        Complete output from command python setup.py egg_info:
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-build-irqa449m/pyobjc/setup.py", line 294, in <module>
            install_requires = BASE_REQUIRES + framework_requires(),
          File "/tmp/pip-build-irqa449m/pyobjc/setup.py", line 117, in framework_requires
            if introduced is not None and version_key(introduced) > version_key(build_platform):
          File "/tmp/pip-build-irqa449m/pyobjc/setup.py", line 110, in version_key
            return tuple(int(x) for x in version.split('.'))
          File "/tmp/pip-build-irqa449m/pyobjc/setup.py", line 110, in <genexpr>
            return tuple(int(x) for x in version.split('.'))
        ValueError: invalid literal for int() with base 10: ''
    
        ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-irqa449m/pyobjc/
    

    My Dockerfile is very simple:

    FROM python:3.6.1
    
    RUN apt-get update
    
    # Move the requirements file over.
    ADD /etc/requirements.txt /app/requirements.txt
    
    RUN pip install -r /app/new_requirements.txt
    

    The Python 3.6.1 Dockerfile is built off of Debian Jessie (I think).

    Thanks, and let me know if you need any other info.

  2. Ronald Oussoren repo owner

    Thanks for confirming my guess: you get this error because you try to install PyObjC on a system that isn't macOS, and that's not supported.

    The next release of PyObjC will give a clearer error message instead of the current confusing stack trace.

    BTW. Why are you trying to install PyObjC on Linux? Are you using GNUstep?

  3. Log in to comment