Skip to content
This repository has been archived by the owner on Sep 1, 2023. It is now read-only.

package_data is missing for linux wheels #1736

Closed
rhyolight opened this issue Jan 8, 2015 · 6 comments · Fixed by #1737
Closed

package_data is missing for linux wheels #1736

rhyolight opened this issue Jan 8, 2015 · 6 comments · Fixed by #1737

Comments

@rhyolight
Copy link
Member

You can see this on our regression tests:

IOError: [Errno 2] No such file or directory: '/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/nupic/swarming/jsonschema/jobParamsSchema.json'

The missing json file is declared in package_data, but not included in the wheel. Wheels built on OS X seem to have all the package_data files.

The script that creates the wheel and uploads it to S3 is here. The wheel command being used to package is pip wheel --wheel-dir=dist/wheels ..

@rhyolight
Copy link
Member Author

After investigating on Ubuntu, I've found that wheels I'm creating are missing the following package_data:

    package_data = {
      "nupic.support.resources.images": ["*.png", "*.gif",
                                         "*.ico", "*.graffle"],
      "nupic.swarming.jsonschema": ["*.json"]
    },

Strangely, the rest of the package_data is included in the wheel.

@rhyolight
Copy link
Member Author

@oxtopus Can you think of any reason why some package_data would be missing on one platform and not another?

@rhyolight
Copy link
Member Author

@oxtopus Never mind. I figured it out. It works if I add an empty nupic/swarming/jsonschema/__init__.py.

@vitaly-krugl
Copy link
Member

@rhyolight, was it possibly missing from MANIFEST.in? We shouldn't have to add __init__.py files in data directories. Also see #2621

@oxtopus
Copy link
Contributor

oxtopus commented Sep 30, 2015

On the subject of MANIFEST.in and superfluous package_data, according to https://docs.python.org/3.4/distutils/sourcedist.html#specifying-the-files-to-distribute:

If you do supply your own MANIFEST, you must specify everything: the default set of files described above does not apply in this case.

I interpret that to mean that if you use MANIFEST.in (which we do), then it doesn't matter what is in package_data. The files need to be added in MANIFEST.in. In which case, we can remove package_data from setup.py.

@rhyolight
Copy link
Member Author

I find it all immensely confusing. 😕

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants