The task is simple: I have a file with extension other than py, which needs to be distributed with the package. For the purpose of this example, let's call it .config.json.
I tried putting it in MANIFEST.in as include .config.json - this had no effect.
I tried package_data={'': ['.config.json']} - this has no effect either.
I also tried data_files=[('', '.config.json')] - this breaks with unrelated error: error: can't copy '.': doesn't exist or not a regular file
Short of just writing a build command myself, I cannot find anything I could do to make this work. And, yes, I've seen tons of similar questions on SO, on GitHub in bug trackers, etc. I know that both setuptools and distutils are essentially hopelessly broken, but maybe there is some sensible way to make this work? I cannot believe that something this simple hadn't been solved yet...
As requested, setup.py:
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from setuptools import setup, find_packages setup( name='project_name', version='0.1.0', description='Project Name in Caps', author='My Company', author_email=','.join( '{}@domain.com'.format(name) for name in list_of_names ), url='https://somewhere', packages=find_packages(), # package_data={ # '': ['.config.json'], # }, # data_files=[('', '.config.json')], install_requires=[ 'pytest >= 3.4.2', ... ], )
site-packages/orsite-packages/mypackage/?site-packages/package-version.eggsetup.py?