summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2015-02-26 23:40:18 +0100
committermathieui <mathieui@mathieui.net>2015-02-26 23:43:43 +0100
commitc732487f6db7b20e77961a9c6d81d9fe2d1d2454 (patch)
treea0c32d99c49ab80fc20d56036a968e3cef5d328a /setup.py
parent190987bcffa05f542b5f67b405e045c630d3e9a5 (diff)
downloadpoezio-c732487f6db7b20e77961a9c6d81d9fe2d1d2454.tar.gz
poezio-c732487f6db7b20e77961a9c6d81d9fe2d1d2454.tar.bz2
poezio-c732487f6db7b20e77961a9c6d81d9fe2d1d2454.tar.xz
poezio-c732487f6db7b20e77961a9c6d81d9fe2d1d2454.zip
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
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 0334c1e9..5ea97cdc 100755
--- a/setup.py
+++ b/setup.py
@@ -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'))