Cython check seems to break install via pip #8

Closed
swernerx opened this Issue Feb 6, 2012 · 7 comments

Comments

Projects
None yet
2 participants
@swernerx

swernerx commented Feb 6, 2012

This check in setup.py seems to break installation using pip. The install_requires is never reached because of this. Not sure why this section is needed at all because when installing via pip it should normally take care of this missing library and will auto install it.

try:
from Cython.Distutils import build_ext
except ImportError:
print('Cython is not installed. Please install Cython first.')
sys.exit()

@FSX

This comment has been minimized.

Show comment
Hide comment
@FSX

FSX Feb 6, 2012

Owner

I did this because cmdclass = {'build_ext': build_ext} (line 21) needs Cython and pip doesn't install it before that. I agree it's not an optimal solution. There must be something better.

I'll look for it. And fix it for 1.0.1.

Owner

FSX commented Feb 6, 2012

I did this because cmdclass = {'build_ext': build_ext} (line 21) needs Cython and pip doesn't install it before that. I agree it's not an optimal solution. There must be something better.

I'll look for it. And fix it for 1.0.1.

@FSX

This comment has been minimized.

Show comment
Hide comment
@FSX

FSX Feb 6, 2012

Owner

I've searched for solutions and I've found the following:

  • install_requires installs the dependencies after the module is installed. With python setup.py install atleast. Not very usefull is you ask me. setup_requires downloads the package, but doesn't install it. Maybe it does with pip. (1)
  • Include the C file generated by Cython and call Cython compiler with an extra argument.

I've applied the 2nd solution in 02678b5.

Owner

FSX commented Feb 6, 2012

I've searched for solutions and I've found the following:

  • install_requires installs the dependencies after the module is installed. With python setup.py install atleast. Not very usefull is you ask me. setup_requires downloads the package, but doesn't install it. Maybe it does with pip. (1)
  • Include the C file generated by Cython and call Cython compiler with an extra argument.

I've applied the 2nd solution in 02678b5.

@swernerx

This comment has been minimized.

Show comment
Hide comment
@swernerx

swernerx Feb 6, 2012

PIP in fact does installing dependencies before executing the real setup.py script.

swernerx commented Feb 6, 2012

PIP in fact does installing dependencies before executing the real setup.py script.

@swernerx

This comment has been minimized.

Show comment
Hide comment
@swernerx

swernerx Feb 6, 2012

I do this for Jasy with quite a few dependencies and it works fine.

swernerx commented Feb 6, 2012

I do this for Jasy with quite a few dependencies and it works fine.

@FSX

This comment has been minimized.

Show comment
Hide comment
@FSX

FSX Feb 7, 2012

Owner

I think I'll go with this solution, because it also solves #6. And it makes Cython an optional dependency.

Owner

FSX commented Feb 7, 2012

I think I'll go with this solution, because it also solves #6. And it makes Cython an optional dependency.

@swernerx

This comment has been minimized.

Show comment
Hide comment
@swernerx

swernerx Feb 7, 2012

That's okay. Will you build a new version in the next few days? A 1.0.1 would be appreciated!

swernerx commented Feb 7, 2012

That's okay. Will you build a new version in the next few days? A 1.0.1 would be appreciated!

@FSX

This comment has been minimized.

Show comment
Hide comment
@FSX

FSX Feb 7, 2012

Owner

I'll have to look into one issue, update docs and changelog and I'll release 1.0.1.

Owner

FSX commented Feb 7, 2012

I'll have to look into one issue, update docs and changelog and I'll release 1.0.1.

@FSX FSX closed this Feb 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment