1. Michał Górny
  2. python-exec

Commits

Michał Górny  committed 9f8607d

Respect exec_prefix for scriptroot.

  • Participants
  • Parent commits 284e547
  • Branches master

Comments (0)

Files changed (3)

File Makefile.am

View file
  • Ignore whitespace
 check_SCRIPTS = tests/python-exec
 
 python_exec2_c_SOURCES = src/python-exec-c.c
+python_exec2_c_CPPFLAGS = -DPYTHON_SCRIPTROOT=\"${scriptrootdir}\"
 
 tests_python_exec2_c_SOURCES = tests/python-exec-c.c
-tests_python_exec2_c_CPPFLAGS = -DTEST_SCRIPTROOT=\"tests\"
+tests_python_exec2_c_CPPFLAGS = -DPYTHON_SCRIPTROOT=\"tests\"
 
 tests_print_bufsiz_SOURCES = src/print-bufsiz.c
 

File configure.ac

View file
  • Ignore whitespace
 
 AC_ARG_WITH([python-scriptroot],
 	[AS_HELP_STRING([--with-python-scriptroot=PATH],
-		[Root directory for wrapped python scripts (default: /usr/lib/python-exec)])],,
+		[Root directory for wrapped python scripts (default: \${exec_prefix}/lib/python-exec)])],,
 	[
-		with_python_scriptroot=/usr/lib/python-exec
+		with_python_scriptroot=\${exec_prefix}/lib/python-exec
 	])
-AC_DEFINE_UNQUOTED([PYTHON_SCRIPTROOT], ["$with_python_scriptroot"],
-	[Set to the root directory where wrapped Python scripts are stored])
 AC_SUBST([scriptrootdir], [$with_python_scriptroot])
 
 AM_INIT_AUTOMAKE([1.11 foreign dist-bzip2 subdir-objects parallel-tests])

File src/python-exec-c.c

View file
  • Ignore whitespace
 #	define BUFFER_SIZE BUFSIZ
 #endif
 
-#ifdef TEST_SCRIPTROOT /* override for tests */
-#	undef PYTHON_SCRIPTROOT
-#	define PYTHON_SCRIPTROOT TEST_SCRIPTROOT
-#endif
-
 /* Python script root directory */
 const char python_scriptroot[] = PYTHON_SCRIPTROOT "/";
 /* All possible EPYTHON values, provided to the configure script. */