Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 697
Tom Avatar asked Apr 14 '26 14:04

Tom


1 Answers

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.

like image 137
Tom Avatar answered Apr 17 '26 04:04

Tom



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!