0

I'm creating a pip package that must include credentials as a json file. My folder structure is like this:

.gitignore  
Dockerfile  
Jenkinsfile 
MANIFEST.in 
Makefile    
README.md   
VERSION 
credentials.json    
setup.py
bin
    __init__.py  
    config.py       
    credentials.json     
    infraestructure.py   
    main.py

I've tried adding them in the MANIFEST like this:

include VERSION
recursive-include bin/*
recursive-include bin/*.json

Also tried in the setup.py package_data with include_package_data=True as Hans pointed in this answer Including non-Python files with setup.py, to no avail, when installing the pip always return the "credentials.json not found" error. I'm don't know how to proceed that way and starting to think that the problem may be somewhere else, like when passing command to the linux terminal. Thanks in advance!

  • Seems to me like you must have had the right combination at some point but it might have not shown because an older `*.egg-info` directory stand in the way. It's very important to remove this directory between attempts. In case it helps: https://sinoroc.gitlab.io/kb/python/package_data.html – sinoroc May 07 '20 at 12:00
  • Didn't know about *.egg-info! I tried to find it but doesn't show anywhere. Can I just add it to .gitignore? –  May 07 '20 at 12:08
  • There should be an `egg-info` directory somewhere, it's built when _setuptools_ runs the `egg_info` command which is part of `sdist`, `bdist`, `install`, `develop`, etc. So I would be surprised if it weren't there. Would you mind showing a full console ouput log containing the error message, including the command that you executed? – sinoroc May 07 '20 at 12:23

0 Answers0