aboutsummaryrefslogtreecommitdiff
path: root/rpkid/setup.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2011-05-03 18:15:46 +0000
committerRob Austein <sra@hactrn.net>2011-05-03 18:15:46 +0000
commit522379bee8cd42ef202e4e5aa88f941dbf2b61e3 (patch)
treef3b7a76739dc179eb992a47e8830d39f8513dc35 /rpkid/setup.py
parent27a51791549cb47df730ca07419a15bd7e7f3e28 (diff)
Sanity-check data_files values before handing them to setup, to avoid
embarassing errors in "make deinstall". svn path=/rpkid/setup.py; revision=3799
Diffstat (limited to 'rpkid/setup.py')
-rw-r--r--rpkid/setup.py25
1 files changed, 18 insertions, 7 deletions
diff --git a/rpkid/setup.py b/rpkid/setup.py
index e938b4de..679c7e7f 100644
--- a/rpkid/setup.py
+++ b/rpkid/setup.py
@@ -41,6 +41,23 @@ pow = Extension("rpki.POW._POW", ["ext/POW.c"],
extra_compile_args = ac_cflags,
extra_link_args = ac_ldflags + ac_libs)
+# Be careful constructing data_files, empty file lists here appear to
+# confuse setup into putting dangerous nonsense into the list of
+# installed files.
+#
+# bdist_rpm seems to get confused by relative names for scripts, so we
+# have to prefix source names here with the build directory name.
+
+data_files = []
+if ac_sbindir and ac_scripts:
+ data_files.append((ac_sbindir,
+ ["%s/%s" % (ac_abs_builddir, f) for f in ac_scripts]))
+if ac_libexecdir and ac_aux_scripts:
+ data_files.append((ac_libexecdir,
+ ["%s/%s" % (ac_abs_builddir, f) for f in ac_aux_scripts]))
+if not data_files:
+ data_files = None
+
setup(name = "rpkitoolkit",
version = "1.0",
description = "RPKI Toolkit",
@@ -49,10 +66,4 @@ setup(name = "rpkitoolkit",
packages = ["rpki", "rpki.POW", "rpki.gui", "rpki.gui.app" ],
ext_modules = [pow],
package_data = { 'rpki.gui.app' : ['templates/*.html', 'templates/*/*.html'] },
-
- # bdist_rpm seems to get confused by relative names for scripts,
- # so we have to prefix the source name of anything here with the
- # build directory name.
-
- data_files = [(ac_sbindir, ["%s/%s" % (ac_abs_builddir, f) for f in ac_scripts]),
- (ac_libexecdir, ["%s/%s" % (ac_abs_builddir, f) for f in ac_aux_scripts])])
+ data_files = data_files)