]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Fix python bindings installation in case of empty DESTDIR 1138/head
authorDmitry Kalinkin <dmitry.kalinkin@gmail.com>
Thu, 21 Oct 2021 23:34:08 +0000 (19:34 -0400)
committerDmitry Kalinkin <dmitry.kalinkin@gmail.com>
Fri, 22 Oct 2021 15:42:16 +0000 (11:42 -0400)
The current behaviour is to install the extension to ./usr/local (if
prefix is /usr/local), so it ends up in the temporary build directory
instead of the intended absolute prefix.

The slash after $(DESTDIR) is needed to make empty DESTDIR mean
installation to / instead of making the prefix to mean a relative
path. We make it triple slash as POSIX reserves double slashes to
possibly have a special treatment by the OS.

The change for travis is needed as "make install" is run as root, and
once the python extension is actually installed, it leaves a
root-owned .egg-info file.

.travis.yml
bindings/Makefile.am
bindings/Makefile.in

index f5f0f314d450cec4ef3d0537248399273cdb9e55..0e4ddfa8f43eabe7083beb871635502d11ead59f 100644 (file)
@@ -32,7 +32,7 @@ script:
   - podchecker doc/*.pod
   - sudo make install
   - cd bindings/perl-shared && make test
-  - cd ../python && python setup.py test
+  - cd ../python && sudo chown -R travis rrdtool.egg-info && python setup.py test
   - /opt/rrdtool-master/bin/rrdtool
   - /opt/rrdtool-master/share/rrdtool/examples/4charts.pl
   - cd ../..
index 1c32a4ae85e15f8ca99c4df1f0c5e3bfa334d70d..d32a0305e3a88b1f07e57a88b4cb61600c3a4829 100644 (file)
@@ -42,7 +42,7 @@ install-data-local:
            && ( cd ${builddir}/python \
                 && env BUILDLIBDIR=${abs_top_builddir}/src/.libs \
                   $(PYTHON) ${abs_srcdir}/python/setup.py install \
-                     --skip-build --root=$(DESTDIR) --prefix=$(prefix) \
+                     --skip-build --root=$(DESTDIR)/// --prefix=$(prefix) \
                      --exec-prefix=$(exec_prefix)) \
            || true
 
index 729b57952b7ab8a90096e8111a0120d54c1990ce..13aabcb0ed6f4c4ff0f625503822a7d317710a9e 100644 (file)
@@ -738,7 +738,7 @@ install-data-local:
            && ( cd ${builddir}/python \
                 && env BUILDLIBDIR=${abs_top_builddir}/src/.libs \
                   $(PYTHON) ${abs_srcdir}/python/setup.py install \
-                     --skip-build --root=$(DESTDIR) --prefix=$(prefix) \
+                     --skip-build --root=$(DESTDIR)/// --prefix=$(prefix) \
                      --exec-prefix=$(exec_prefix)) \
            || true