Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #93625
| Date | 2015-07-10 03:11 +0200 |
|---|---|
| From | <c.buhtz@posteo.jp> |
| Subject | [setuptools] install data-file in users home-dir |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.384.1436512184.3674.python-list@python.org> (permalink) |
I am using setuptools to create a wheel file.
There is a conf-file I want to install into the users config-diretory.
e.g. /home/user/.config/appname/app.conf
setup(...,
data_files = [ ('~/.config/appname/', ['app.conf']) ]
)
I see two problems here:
1.
I don't know the users "name". So I have to use a placeholder here.
Does '~' work here in that case?
2.
To install the wheel-file with pip I need sudo-privilegs on Ubuntu
14.04.2. That means while the install script runs I can not ask for the
users name because it is "root" in that case.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
[setuptools] install data-file in users home-dir <c.buhtz@posteo.jp> - 2015-07-10 03:11 +0200
csiph-web