Reputation: 45
I am trying to create a setup.py that will build rpm/deb packages and I want it to create a blank directory with 777 permissions. I have it creating the directory via data_files
data_files=[
( '/var/spool/my_dir', [] )
}
But it creates the directory with 755 permissions. How do i get setup.py to create this directory with 777 permissions??
Upvotes: 1
Views: 2107
Reputation: 28858
There is a way to do this. You will need to override the install
method. See my answer here:
set file permissions in setup.py file
Upvotes: 1
Reputation: 6017
I don't think there's a way to specify file permissions in the call to setup
.
You could always import os
and do something like os.chmod('/var/spool/my_dir', 0777)
after the setup
call. To be honest though, I wonder if you really need those permissions.
Upvotes: 0