Closed hoffman closed 12 years ago
I think that installing numexpr separately isn't a huge deal. The goal is not write a package manager here. easy_install tables
should install numexpr, if it is not installed already.
setuptools should do this for us. I thought that PyTables used setuptools, but upon closer inspection of setup.py this is only if the FORCE_SETUPTOOLS
environment variable is set. Do you know why it is done this way instead of using a try: ... except ImportError: ... block?
Probably it is because using the environment variable allows to use standard distutils as default. See also:
http://groups.google.com/group/cython-users/browse_thread/thread/d6483338005ad91d
This comment in setup.py seems to indicate that there is a workaround such that it should work even if setuptools is being used:
# For some reason, setup in setuptools does not compile
# Cython files (!) Do that manually...
Yes, the get_cython_extfiles function tries to cythonize pyx files if the corresponding .c file doesn't exist or if the .c file is older than the pyx file (this should never happen if one uses the original tarball).
IMHO there are tho scenarios:
In both cases IMHO the behavior is correct.
Of course it would be nice to have a setuptools based setup script properly working.
setuptools has traditionally be a PITA for me (IMO, and contrarily to what its blurb says, it does create more problems than it solves, at least from a developer point of view). Feel free to improve this support and good luck in the endeavour!
+1 to Francesc. setuptools definitely creates more problems than it solves.
It is a bit of a mess. easy_install makes it much easier for people (such as myself) to create other packages that rely on PyTables, so I hope that support will continue.
My research group also deals with this issue. For projects with many packages, we use setuptools to verify a hard-coded list of packages, falling back to distutils if setuptools is not present. (distutils just ignores 'install_requires'.) See, e.g., https://github.com/commonsense/simplenlp/blob/master/setup.py#L9
For projects with Cython extensions, our try-building-with-cython looks like https://github.com/commonsense/divisi2/blob/master/setup.py#L60. Theoretically we should be able to just use http://docs.cython.org/src/quickstart/build.html#building-a-cython-module-using-distutils but we haven't tried it.
OK, there seems to be a general consensus on leaving setuptools out of our setup.py and use the standard Distutils. The user manual seems to be clear enough on how to install PyTables from sources, I will just a a note regarding installation from a git checkout.
Can we consider the issue closed?
@avalentino, I think we can. Closing.
Did python setup.py build earlier. I don't have Numexpr installed and running python setup.py install doesn't seem to install it, although I think it should.