[arch-commits] Commit in sip5/trunk (PKGBUILD sip5-destdir.patch)

Antonio Rojas arojas at archlinux.org
Fri Dec 13 18:33:36 UTC 2019


    Date: Friday, December 13, 2019 @ 18:33:36
  Author: arojas
Revision: 371368

Honor DESTDIR in make install

Added:
  sip5/trunk/sip5-destdir.patch
Modified:
  sip5/trunk/PKGBUILD

--------------------+
 PKGBUILD           |   13 +++++++--
 sip5-destdir.patch |   71 +++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-12-13 18:11:44 UTC (rev 371367)
+++ PKGBUILD	2019-12-13 18:33:36 UTC (rev 371368)
@@ -2,15 +2,22 @@
 
 pkgname=sip5
 pkgver=5.0.0
-pkgrel=1
+pkgrel=2
 arch=(x86_64)
 pkgdesc="A tool that makes it easy to create Python bindings for C and C++ libraries"
 url='https://www.riverbankcomputing.com/software/sip/intro'
 license=('custom:"sip"')
 depends=(python-setuptools python-toml)
-source=("https://www.riverbankcomputing.com/static/Downloads/sip/$pkgver/sip-$pkgver.tar.gz")
-sha256sums=('c034d427f52584d63277dd7df4d16d00c5df0b5cb838e0c256865b854b7e074b')
+source=("https://www.riverbankcomputing.com/static/Downloads/sip/$pkgver/sip-$pkgver.tar.gz"
+         sip5-destdir.patch)
+sha256sums=('c034d427f52584d63277dd7df4d16d00c5df0b5cb838e0c256865b854b7e074b'
+            '54beee3210a1b0b529d6158e247650df18e178e64c16dc59ddb1838988a5ffd2')
 
+prepare() {
+  cd sip-$pkgver
+  patch -p1 -i ../sip5-destdir.patch # Honor DESTDIR in make install https://www.riverbankcomputing.com/pipermail/pyqt/2019-December/042390.html
+}
+
 build() {
   cd sip-$pkgver
   python setup.py build

Added: sip5-destdir.patch
===================================================================
--- sip5-destdir.patch	                        (rev 0)
+++ sip5-destdir.patch	2019-12-13 18:33:36 UTC (rev 371368)
@@ -0,0 +1,71 @@
+--- sip-5.0.0/sipbuild/distinfo/distinfo.py.orig	2019-12-13 18:28:50.195055008 +0000
++++ sip-5.0.0/sipbuild/distinfo/distinfo.py	2019-12-13 18:30:22.169531691 +0000
+@@ -72,20 +72,20 @@
+ 
+     # Make sure we have an empty dist-info directory.  Handle exceptions as the
+     # user may be trying something silly with a system directory.
+-    if os.path.exists(distinfo_dir):
++    if os.path.exists(real_distinfo_dir):
+         try:
+-            shutil.rmtree(distinfo_dir)
++            shutil.rmtree(real_distinfo_dir)
+         except Exception as e:
+             raise UserException(
+                     "unable remove old dist-info directory '{}'".format(
+-                            distinfo_dir),
++                            real_distinfo_dir),
+                     str(e))
+ 
+     try:
+-        os.mkdir(distinfo_dir)
++        os.mkdir(real_distinfo_dir)
+     except Exception as e:
+         raise UserException(
+-                "unable create dist-info directory '{}'".format(distinfo_dir),
++                "unable create dist-info directory '{}'".format(real_distinfo_dir),
+                 str(e))
+ 
+     # Reproducable builds.
+@@ -93,7 +93,7 @@
+ 
+     if wheel_tag is None:
+         # Create the INSTALLER file.
+-        installer_fn = os.path.join(distinfo_dir, 'INSTALLER')
++        installer_fn = os.path.join(real_distinfo_dir, 'INSTALLER')
+         installed.append(installer_fn)
+ 
+         with open(prefix_dir + installer_fn, 'w') as installer_f:
+@@ -101,7 +101,7 @@
+     else:
+         # Define any entry points.
+         if console_scripts:
+-            eps_fn = os.path.join(distinfo_dir, 'entry_points.txt')
++            eps_fn = os.path.join(real_distinfo_dir, 'entry_points.txt')
+             installed.append(eps_fn)
+ 
+             with open(prefix_dir + eps_fn, 'w') as eps_f:
+@@ -116,7 +116,7 @@
+ Tag: {}
+ '''
+ 
+-        wheel_fn = os.path.join(distinfo_dir, 'WHEEL')
++        wheel_fn = os.path.join(real_distinfo_dir, 'WHEEL')
+         installed.append(wheel_fn)
+ 
+         with open(prefix_dir + wheel_fn, 'w') as wheel_f:
+@@ -125,13 +125,13 @@
+                             wheel_tag))
+ 
+     # Create the METADATA file.
+-    metadata_fn = os.path.join(distinfo_dir, 'METADATA')
++    metadata_fn = os.path.join(real_distinfo_dir, 'METADATA')
+     write_metadata(metadata, requires_dists, metadata_fn, project_root,
+             prefix_dir=prefix_dir)
+     installed.append(metadata_fn)
+ 
+     # Create the RECORD file.
+-    record_fn = os.path.join(distinfo_dir, 'RECORD')
++    record_fn = os.path.join(real_distinfo_dir, 'RECORD')
+ 
+     distinfo_path, distinfo_base = os.path.split(distinfo_dir)
+ 



More information about the arch-commits mailing list