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

Cython dependency #3

Closed
mrmagooey opened this issue Jul 30, 2016 · 3 comments
Closed

Cython dependency #3

mrmagooey opened this issue Jul 30, 2016 · 3 comments

Comments

@mrmagooey
Copy link

Hi,

Currently if I have a requirements.txt file like so:

Cython==0.24.1
python-afl==0.5.3

And I try to install it with pip install -r requirements.txt it will fail because there are Cython checks in the setup.py, and Cython is not available until after pip install has completed.

Any chance these Cython checks could be taken out (and maybe put elsewhere), and possibly have Cython added as a dependency in the distutils setup call?

@jwilk
Copy link
Owner

jwilk commented Jul 30, 2016

Thanks for the bug report.

The root cause is that Python packaging ecosystem is completely insane.

To declare dependencies you'd have to use setuptools, which has nasty habits of installing stuff behind your back and ruining your sys.path.
And then pip doesn't support build-dependencies: pypa/pip#1820

Anyway, I implemented work-around in b5bc99f.
I'll make a new release and upload it to PyPI later today.

@jwilk
Copy link
Owner

jwilk commented Jul 30, 2016

You will still get scary warnings about missing Cython, but the installation should ultimately succeed:

$ pip install /path/to/python-afl/
Processing /path/to/python-afl
Collecting Cython>=0.19 (from python-afl===0.5.4)
  Downloading Cython-0.24.1-cp27-cp27mu-manylinux1_x86_64.whl (5.9MB)
    100% |################################| 5.9MB 60kB/s 
Building wheels for collected packages: python-afl
  Running setup.py bdist_wheel for python-afl ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-11uhku-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp9lKgOlpip-wheel- --python-tag cp27:
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-11uhku-build/setup.py", line 80, in <module>
      raise RuntimeError('Cython >= 0.19 is required')
  RuntimeError: Cython >= 0.19 is required

  ----------------------------------------
  Failed building wheel for python-afl
  Running setup.py clean for python-afl
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-11uhku-build/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" clean --all:
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/tmp/pip-11uhku-build/setup.py", line 80, in <module>
      raise RuntimeError('Cython >= 0.19 is required')
  RuntimeError: Cython >= 0.19 is required

  ----------------------------------------
  Failed cleaning build dir for python-afl
Failed to build python-afl
Installing collected packages: Cython, python-afl
  Running setup.py install for python-afl ... done
Successfully installed Cython python-afl

@jwilk
Copy link
Owner

jwilk commented Jul 30, 2016

Fixed in python-afl 0.5.4.

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