[Slackbuilds-users] pyPdf SlackBuild or can't upgrade sofastats

Duncan Roe duncan_roe at optusnet.com.au
Sun Sep 3 07:57:04 UTC 2017


On Sun, Aug 27, 2017 at 10:01:01AM +0200, 414N wrote:
> Hello Duncan,
> thanks for your reply and sorry for the HTML-only message, I???ll make
> sure to send plaintext versions too. ;-)
> While the suggestion of mentioning the usage of |pip2tgz| to obtain
> pyPdf in the README of sofastats can indeed work as a quite good
> workaround to the issue at hand, I think there are some drawbacks to it:
>
>   * people who use automated tools to install packages (i.e. |sbopkg|)
>     will build a package that won???t work at runtime, even if all the
>     other hard-dependencies specified in the |REQUIRES| line are installed
>   * dependencies specified in the README should only be optional or
>     recommended ones, not mandatory ones (at least, this is what I
>     grasped here on SBo)
>
> I guess the second one clashes with the guidelines here on SBo, but I
> don???t know for sure.
> If someone knows better, please correct me if I???m wrong
>
> Cheers
>
> ???
>
> Alan Alberghini
>
> SBo clone: GitHub <https://github.com/414n/slackbuilds.org>
>
Hi Alan,

Sorry for the delay in replying - have had network problems this last week.

If pyPdf is only a *runtime* dependency, I believe you don't absolutely *have*
to have it as a requirement.

But really, the existing package should be renamed. This is not entirely
trivial: as well as renaming the directory the maintainer would also have to
rename a couple of files therein and edit the SlackBuild, info and slack-desc.

The required patches are below. I've cc'd the maintainer (Hi Brent!) in the
hope he can submit the new SB and withdraw the old one,

Cheers ... Duncan.

> On 20/08/2017 05:29, Duncan Roe wrote:
> > On Sat, Aug 19, 2017 at 06:06:47PM +0200, 414N wrote:
> >
> >> I'm working on an updated sofastats SlackBuild but I stumbled upon a
> >> dependency issue...
> >> It seems like the sofastats package depends since some time on the `pyPdf`
> >> python library for managing PDF exports (see the official documentation at
> >> http://www.sofastatistics.com/wiki/doku.php?id=help:linux_installation#packages_required_dependencies,
> >> although they only report distro-specific package names...). Problem is,
> >> that the pyPdf package on SBo is not the original library required for the
> >> build, but instead is a ~2011 fork based on that library that has since gone
> >> separate ways and was renamed `PyPDF2`. This is also reflected on the module
> >> name, as it is installed as PyPDF2 inside
> >> /usr/lib64/python2.7/site-packages/PyPDF2/.
> >> The full story of the forking is available on the official site of PyPDF2 at
> >> https://mstamy2.github.io/PyPDF2/, while the original library is still
> >> available at http://pybrary.net/pyPdf/.
> >> What I'd like to propose is:
> >>
> >> - to rename the current pyPdf package to the more proper `PyPDF2` name
> >>
> >> - to submit (I've already created a SlackBuild) the original unmaintained
> >> library as `pyPdf`, so the dependency can be set inside the updated
> >> sofastats.info
> >> --
> >> Alan Alberghini
> > Hi Alan,
> >
> > Please try to avoid sending HTML-only messages to the list in future.
> >
> > pyPdf is indexed by PyPI - the Python Package Index
> > (https://pypi.python.org/pypi),  so pip2tgz will build it. The package ends up
> > as pyPdf-1.13-x86_64-1_pip2_SBo.tgz. (PyPDF2 is also listed on PyPI BTW).
> >
> > Unfortunately you can't put a pip2tgz-built package as a dependency in
> > sofastats.info. You would have to mention it in the README as being required.
> > That would enable you to get the main SB out the door.
> >
> > I certainly agree that the existing pyPdf SB should be renamed,
> >
> > Cheers ... Duncan.

---------------------------------

17:46:36$ diffdir -u /usr/src/slackbuilds/python/pyPdf .
Only in .: PyPDF2.SlackBuild
Only in .: PyPDF2.info
Only in /usr/src/slackbuilds/python/pyPdf: pyPdf.SlackBuild
Only in /usr/src/slackbuilds/python/pyPdf: pyPdf.info
diff -u /usr/src/slackbuilds/python/pyPdf/slack-desc ./slack-desc
--- /usr/src/slackbuilds/python/pyPdf/slack-desc        2017-04-08 09:57:55.000000000 +1000
+++ ./slack-desc        2017-09-03 17:42:07.000000000 +1000
@@ -5,15 +5,15 @@
 # You must make exactly 11 lines for the formatting to be correct.  It's also
 # customary to leave one space after the ':' except on otherwise blank lines.

-     |-----handy-ruler------------------------------------------------------|
-pyPdf: pyPdf (Python PDF toolkit)
-pyPdf:
-pyPdf: A Pure-Python library built as a PDF toolkit.
-pyPdf:
-pyPdf:
-pyPdf:
-pyPdf:
-pyPdf:
-pyPdf:
-pyPdf:
-pyPdf:
+      |-----handy-ruler------------------------------------------------------|
+PyPDF2: PyPDF2 (Python PDF toolkit)
+PyPDF2:
+PyPDF2: A Pure-Python library built as a PDF toolkit.
+PyPDF2:
+PyPDF2: This is a fork of pyPdf, available separately
+PyPDF2:
+PyPDF2:
+PyPDF2:
+PyPDF2:
+PyPDF2:
+PyPDF2:


17:46:38$ diff -u /usr/src/slackbuilds/python/pyPdf/pyPdf.SlackBuild PyPDF2.SlackBuild
--- /usr/src/slackbuilds/python/pyPdf/pyPdf.SlackBuild  2017-04-08 09:57:55.000000000 +1000
+++ PyPDF2.SlackBuild   2017-09-03 17:35:11.000000000 +1000
@@ -1,6 +1,6 @@
 #!/bin/sh

-# Slackware build script for pyPdf.
+# Slackware build script for PyPDF2.

 # Copyright 2009-2011 Marco Bonetti <sid77 at slackware.it>
 # Copyright 2015-2017 Brenton Earl <brent at exitstatusone.com>
@@ -23,8 +23,7 @@
 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

-PRGNAM=pyPdf
-SRCNAM=PyPDF2
+PRGNAM=PyPDF2
 VERSION=${VERSION:-1.26.0}
 BUILD=${BUILD:-1}
 TAG=${TAG:-_SBo}
@@ -64,9 +63,9 @@
 rm -rf $PKG
 mkdir -p $TMP $PKG $OUTPUT
 cd $TMP
-rm -rf $SRCNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
-cd $SRCNAM-$VERSION
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
 chown -R root:root .
 find -L . \
  \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \


17:50:36$ diff -u /usr/src/slackbuilds/python/pyPdf/pyPdf.info PyPDF2.info
--- /usr/src/slackbuilds/python/pyPdf/pyPdf.info        2017-04-08 09:57:55.000000000 +1000
+++ PyPDF2.info 2017-09-03 17:32:36.000000000 +1000
@@ -1,4 +1,4 @@
-PRGNAM="pyPdf"
+PRGNAM="PyPDF2"
 VERSION="1.26.0"
 HOMEPAGE="https://mstamy2.github.io/PyPDF2/"
 DOWNLOAD="https://github.com/mstamy2/PyPDF2/archive/1.26.0/PyPDF2-1.26.0.tar.gz"


More information about the SlackBuilds-users mailing list