Tom
Tom

Reputation: 22841

Packaging Non-Python Files in a Python Library

I'm trying to build a Python package for this project that includes the .json files in /fixtures and the *.html files in /templates. When I run the packaging script based off my setup.py, it says it should include those folders in the MANIFEST it generates, but the output just says it's hard-linking them and when I try to install via pip, it dies on the following:

Downloading/unpacking bluetrain
  Running setup.py egg_info for package bluetrain
    error: package directory 'bluetrain/fixtures' does not exist
    Complete output from command python setup.py egg_info:
    running egg_info

writing pip-egg-info/bluetrain.egg-info/PKG-INFO
writing top-level names to pip-egg-info/bluetrain.egg-info/top_level.txt
writing dependency_links to pip-egg-info/bluetrain.egg-info/dependency_links.txt
warning: manifest_maker: standard file '-c' not found
error: package directory 'bluetrain/fixtures' does not exist

EDIT: It looks like this was an issue with legacy crud that built up in the virtualenv I was installing succeeding versions of the package into. Trying a clean virtualenv fixed the issue.

Upvotes: 3

Views: 207

Answers (1)

Tom
Tom

Reputation: 22841

Fixed this issue by creating a clean virtualenv and trying to build from there. It appears the constant build/ rebuild cycle in the original environment left legacy files behind that were stopping things from working as intended.

Upvotes: 1

Related Questions