Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python setup.py create empty directory on installation

I'm trying to create an empty directory when distributing my python package on Ubuntu machines.

What I did so far is to add the following line to setup object under setup.py:

data_files=[('opt/my_project', [])

Which is not working. I thought it's because there are no files in it so I tried this:

data_files=[('opt/my_project', ['empty.txt'])

Unfortunately nothing happens in opt directory during installation. Also - there are no error messages.

What is the proper way to create an empty directory?

like image 537
Eli Avatar asked Mar 07 '26 15:03

Eli


1 Answers

You are missing a "/" at the beginning of your path...

like image 76
hanetz Avatar answered Mar 09 '26 18:03

hanetz