'setup.py access files at installation-time

TL;DR

I'm looking for a way to read a file content in setup.py that is not part of the package during installation time

Description

I have a project that looks like this:

my_project
|--- src
      |--- my_package
               |--- ...
|--- resources
         |--- ...
|--- setup.py

The resources dir containing a list of toml files that need to be copied to the home directory during installation in order to make my code work.

Moreover, I don't want those files to be saved as part of the package in order to avoid my package from being too large.

Is including this directory in MANIFEST.ini and read it in setup.py is enough, or other actions are needed?

Any help would be much appriciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source