+2024-04-07 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Locate configure.ac correctly when --dir is given.
+ * pygnulib/GLConfig.py (GLConfig.setAutoconfFile): Don't combine the
+ given file name argument with destdir.
+ * pygnulib/main.py (main): Use os.path.join() instead of joinpath() when
+ constructing the path to the configure.ac file. The latter normalizes
+ paths which causes the test suite to fail when printed in files.
+
2024-04-06 Bruno Haible <bruno@clisp.org>
expm1l: Work around a NetBSD 10.0/i386 bug.
'''Specify path of autoconf file relative to destdir.'''
if type(configure_ac) is str:
if configure_ac:
- self.table['configure_ac'] = \
- os.path.join(self.table['destdir'], configure_ac)
+ self.table['configure_ac'] = configure_ac
else: # if type of configure_ac is not str
raise TypeError('configure_ac must be a string, not %s'
% type(configure_ac).__name__)
config.setDestDir(destdir)
# Prefer configure.ac but also look for configure.in.
- if isfile(joinpath(destdir, 'configure.ac')):
- configure_ac = joinpath(destdir, 'configure.ac')
- elif isfile(joinpath(destdir, 'configure.in')):
- configure_ac = joinpath(destdir, 'configure.in')
+ # NOTE: Use os.path.join so the leading './' is not removed. This
+ # is to make the gnulib-tool test suite happy.
+ if isfile(os.path.join(destdir, 'configure.ac')):
+ configure_ac = os.path.join(destdir, 'configure.ac')
+ elif isfile(os.path.join(destdir, 'configure.in')):
+ configure_ac = os.path.join(destdir, 'configure.in')
else:
- raise GLError(3, joinpath(destdir, 'configure.ac'))
+ raise GLError(3, os.path.join(destdir, 'configure.ac'))
# Save the Autoconf file path for the rest of the import.
config.setAutoconfFile(configure_ac)