0

I have a flask app which looks like

my-app 
│   └── src
│       └── python
│             └── config
│             └── app
│── MANIFEST.in
└── setup.py

The config folder is full of *.yaml files, I want to add all the static config files into my python egg after using

python setup.py install

My setup.py looks like

import os
from setuptools import setup, find_packages
path = os.path.dirname(os.path.abspath(__file__))
setup(
    name="app",
    version="1.0.0",
    author="Anna",
    description="",
    keywords=[],
    packages=find_packages(path + '/src/python'),
    package_dir={'': path + '/src/python'},
    include_package_data=True
)

I am trying the use the MANIFEST.in to add the config file However, it always give error

error: Error: setup script specifies an absolute path:

/Users/Anna/Desktop/my-app/src/python/app

setup() arguments must *always* be /-separated paths relative to the
setup.py directory, *never* absolute paths.

I have not used any absolute paths in my code, I've seen other posts trying to bypass this error, by removing

include_package_data=True

However, in my case, if i do this to avoid this error, all my yamls won't be added.

I was wondering if there are ways to fix this problem. Thanks

Suicide Bunny
  • 894
  • 1
  • 10
  • 23

0 Answers0