Only remove src/default_config.cfg after build if we are in a develop copy

In order to not pollute src/; without this change a script doing on a
sdist-built archive:

    ./setup.py build
    ./setup.py install

would fail because src/default_config.cfg was removed after setup(), and
data/default_config.cfg does not exist
This commit is contained in:
mathieui 2015-02-26 23:40:18 +01:00
parent 190987bcff
commit c732487f6d
No known key found for this signature in database
GPG key ID: C59F84CEEFD616E3

View file

@ -106,6 +106,8 @@ setup(name="poezio",
'Screen autoaway plugin': 'pyinotify==0.9.4'})
# Remove the link afterwards
if exists(join(current_dir, 'src', 'default_config.cfg')):
if (exists(join(current_dir, 'src', 'default_config.cfg')) and
exists(join(current_dir, 'data', 'default_config.cfg'))):
unlink(join(current_dir, 'src', 'default_config.cfg'))