Python file - setup.py at a specific location

As part of the installation process, I would like to copy the configuration file to the user's home directory, i.e. ~ / .foo.conf

What is the usual approach for this with help setup.py? Do I have to write code in setup.pyto copy the file after setup(), or is there some kind of built-in mechanism for this kind of task?

Update

I finished modifying the script to check if it exists ~/.foo.confat startup. If not, create conf conf by default. I also found this post that was helpful .

+5
source share
1 answer

, setuptools. setuptools, , , , , , - resource_stream, , , , easy_install, virtualenv , rpm.

, rpm.

+4

All Articles