jaberg/scikit-data — Issue #35: setup.py does not copy data/ into site-packages/skdata when installing
Author: poilvert
Created: 2012-01-31 18:38:02+00:00
State: open

Just a quick *bug report* on a (minor) issue when one installs scikit-data (other than a ``develop`` install).

More particularly, it seems that during install the directory ``data/`` containing the small datasets does not
get copied over to the default ``site-packages/skdata`` directory.

steps:

1. ``virtualenv test_scikit_data_install``
2. ``cd test_scikit_data_install``
3. ``source bin/activate``
4. ``git clone git://github.com/jaberg/scikit-data.git``
5. ``cd scikit-data``
6. ``pip install .``
7. ``python``
8. ``>>>from skdata import toy``
9. ``>>>a = toy.Digits()``
and the error looks like :
``Traceback (most recent call last):
File "", line 1, in
File "/home/poilvert/venv/test_scikit_data_install/lib/python2.7/site-packages/skdata/toy.py", line 20, in __init__
meta, descr, meta_const = self.build_all()
File "/home/poilvert/venv/test_scikit_data_install/lib/python2.7/site-packages/skdata/toy.py", line 95, in build_all
delimiter=',')
File "/usr/lib/python2.7/site-packages/numpy/lib/npyio.py", line 685, in loadtxt
fh = iter(seek_gzip_factory(fname))
File "/usr/lib/python2.7/site-packages/numpy/lib/npyio.py", line 62, in seek_gzip_factory
f = GzipFile(f)
File "/usr/lib/python2.7/gzip.py", line 89, in __init__
fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb')
IOError: [Errno 2] No such file or directory: '/home/poilvert/venv/test_scikit_data_install/lib/python2.7/site-packages/skdata/data/digits.csv.gz'``

If on the other hand one installs scikit-data in develop mode (where only a symbolic link is created) then
the above commands work.