Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #93625 > unrolled thread
| Started by | <c.buhtz@posteo.jp> |
|---|---|
| First post | 2015-07-10 03:11 +0200 |
| Last post | 2015-07-10 03:11 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
[setuptools] install data-file in users home-dir <c.buhtz@posteo.jp> - 2015-07-10 03:11 +0200
| From | <c.buhtz@posteo.jp> |
|---|---|
| Date | 2015-07-10 03:11 +0200 |
| Subject | [setuptools] install data-file in users home-dir |
| Message-ID | <mailman.384.1436512184.3674.python-list@python.org> |
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 top | Article view | comp.lang.python
csiph-web