Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #93661

Re: [setuptools] install data-file in users home-dir

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsreader4.netcologne.de!news.netcologne.de!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To Python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.004
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:: [': 0.03; 'sysadmin': 0.05; '(b)': 0.07; 'subject:file': 0.07; 'app,': 0.09; 'deletes': 0.09; 'file?': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'package).': 0.16; 'subject:home': 0.16; 'subject:install': 0.16; 'unnecessary.': 0.16; 'wrote:': 0.16; 'app': 0.16; 'config': 0.18; 'script.': 0.18; 'runs': 0.18; 'subject:] ': 0.19; '2015': 0.20; 'to:name :python-list@python.org': 0.20; 'saying': 0.22; '(a)': 0.22; 'file.': 0.22; 'am,': 0.23; 'sat,': 0.23; 'header:In-Reply-To:1': 0.24; 'install': 0.25; '(which': 0.26; 'chris': 0.26; 'message- id:@mail.gmail.com': 0.27; 'function': 0.28; "skip:' 10": 0.28; 'itself,': 0.29; 'subject:users': 0.29; '(c)': 0.29; 'instead,': 0.33; 'correctly': 0.34; 'file': 0.34; 'received:google.com': 0.35; 'done': 0.35; 'dir': 0.35; 'necessary.': 0.35; 'quite': 0.35; 'expected': 0.35; 'should': 0.36; 'there': 0.36; 'to:addr :python-list': 0.36; 'doing': 0.38; 'someone': 0.38; 'files': 0.38; 'data': 0.39; 'subject:-': 0.39; 'to:addr:python.org': 0.40; 'still': 0.40; 'your': 0.60; 'programs': 0.62; 'back': 0.62; 'different': 0.63; 'backup': 0.66; 'home': 0.67; 'jul': 0.72; '"go': 0.84; 'chrisa': 0.84; "night's": 0.84; 'directories,': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=H+t4SFYxI//Ar0CsrsPlyIn2P4Q2CX+XrTDa0KvHi1k=; b=dubXfCFzdfg6FeY414DrGJOrpRDhL+0e0T6MNcxSSzntJ8RWxnbmXfZRy5JGAJvMJc klqZDqC2hqD2heLk3cL7gN+b63lh0Ht/NfZ4JMcx75p1RjO5bH9+Ad/NcFsJocDN/0DN T6O93szxhvamSulE1dn+eaMJp4aoCuaPWUbp5mwOAQFKGNp9L/L/CYWIybv/023WNAag Su5idOGJkb5HNZARcIFUrX6C2P36s8Rbwm0IfVoxHI4KlccG0NDhj/RTM58cbOtUpEsb 0DoptN9OQ0tpXPgWaPutqTZ5KgEYj7Y73UhPmzA25D/9IkNaLiI2Rv1GPYV8vvKAio7s BVsQ==
MIME-Version 1.0
X-Received by 10.50.87.74 with SMTP id v10mr1471821igz.37.1436575235131; Fri, 10 Jul 2015 17:40:35 -0700 (PDT)
In-Reply-To <3mSryL0jHmzFpVq@dovecot04.posteo.de>
References <3mSGXb0tfQzFpW3@dovecot04.posteo.de> <CAMw+j7+hUvj0-T4AoqG4X2RB6XUP4U0Unf=q2M8wT1_BEWKiZA@mail.gmail.com> <3mSryL0jHmzFpVq@dovecot04.posteo.de>
Date Sat, 11 Jul 2015 10:40:35 +1000
Subject Re: [setuptools] install data-file in users home-dir
From Chris Angelico <rosuav@gmail.com>
To "python-list@python.org" <Python-list@python.org>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.409.1436575243.3674.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1436575243 news.xs4all.nl 2919 [2001:888:2000:d::a6]:60731
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 4721
X-Received-Body-CRC 1255440952
Xref csiph.com comp.lang.python:93661

Show key headers only | View raw


On Sat, Jul 11, 2015 at 10:01 AM,  <c.buhtz@posteo.jp> wrote:
> On 2015-07-10 09:39 Chris Warrick <kwpolska@gmail.com> wrote:
>> And you should not create the files in your install script.  Instead,
>> install them to a different data dir (somewhere in 'share/appname', or
>> alongside your package). When someone runs your app, only then you
>> should copy this file to user’s config directory
>
> I have to check if there still is a user config file.
> When doing this with the app itself, the check would be done while each
> start - what is quite unnecessary.

Wrong. It is completely necessary. What happens if (a) the user
deletes the config file? (b) a different user runs the app? (c) a hard
drive melt-down wipes out all home directories, and the sysadmin
restores from last night's backup (which was before the app was
installed)? You MUST check for the absence of the user config file.
Most programs will be expected to function correctly after having
their configs wiped out - it's a standard way of saying "go back to
all defaults".

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: [setuptools] install data-file in users home-dir Chris Angelico <rosuav@gmail.com> - 2015-07-11 10:40 +1000

csiph-web