summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
author Andrew Clemons2022-10-31 13:22:36 +0100
committer Willy Sudiarto Raharjo2022-11-05 15:15:16 +0100
commitde55c77bbfef9859bf6ff2b88d0537a7ecec1f61 (patch)
tree07d709a53228f0543b56d5cef14f59a8ed753205 /python
parent2a74ab6a367b87e8eb2ebfc53bb82b8a73ebafd4 (diff)
downloadslackbuilds-de55c77bbfef9859bf6ff2b88d0537a7ecec1f61.tar.gz
python/python2-automat: Fix offline build.
If fixed this in 9c7bc63003 by adding python-m2r as a dependency. This is correct since upstream's `setup_requires` declares m2r as a dependency: https://github.com/glyph/automat/blob/v20.2.0/setup.py#L27 If m2r is not installed, the build will try to download it. If this fails, the build fails. This means the package cannot be built without internet at the moment. ``` distutils.errors.DistutilsError: Command '['/usr/bin/python2', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/SBo/build_python2-automat/tmpN8eQGt', '--quiet', 'm2r']' returned non-zero exit status 1 ``` In 5f580e046a, a change was made to make m2r optional, but this does not work since it is still declared in setup.py. It should be optional, since it is only used for formatting the contents of README.md for use as long_description in setup and that is wrapped in a try / except and will use the raw, unformatted text of README.md if it is not found. So for this change, I have patched out the declaration of m2r in setup.py and you can now build the package without downloading things as root during the build. Signed-off-by: Andrew Clemons <andrew.clemons@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'python')
-rw-r--r--python/python2-automat/optional_m2r.diff11
-rw-r--r--python/python2-automat/python2-automat.SlackBuild3
2 files changed, 13 insertions, 1 deletions
diff --git a/python/python2-automat/optional_m2r.diff b/python/python2-automat/optional_m2r.diff
new file mode 100644
index 0000000000..87e0ddc6bd
--- /dev/null
+++ b/python/python2-automat/optional_m2r.diff
@@ -0,0 +1,11 @@
+diff -Naur Automat-20.2.0.orig/setup.py Automat-20.2.0/setup.py
+--- Automat-20.2.0.orig/setup.py 2020-02-17 04:33:10.000000000 +0900
++++ Automat-20.2.0/setup.py 2022-10-31 21:14:14.926665030 +0900
+@@ -24,7 +24,6 @@
+ package_dir={'automat': 'automat'},
+ setup_requires=[
+ 'setuptools-scm',
+- 'm2r',
+ ],
+ install_requires=[
+ "attrs>=19.2.0",
diff --git a/python/python2-automat/python2-automat.SlackBuild b/python/python2-automat/python2-automat.SlackBuild
index 61aa580355..fabf7719d7 100644
--- a/python/python2-automat/python2-automat.SlackBuild
+++ b/python/python2-automat/python2-automat.SlackBuild
@@ -28,7 +28,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=python2-automat
SRCNAM=Automat
VERSION=${VERSION:-20.2.0}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -74,6 +74,7 @@ cd $TMP
rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
+cat $CWD/optional_m2r.diff | patch -p1
chown -R root:root .
find -L . \