Change in osmo-gsm-manuals[master]: Drop python2 and pychart dependencies

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

osmith gerrit-no-reply at lists.osmocom.org
Fri Dec 6 13:19:19 UTC 2019


osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16504 )

Change subject: Drop python2 and pychart dependencies
......................................................................

Drop python2 and pychart dependencies

Python 2 is EOL at the end of 2019, so don't depend on it anymore.
Remove pychart support, because upstream is dead and there is no python3
version. We were only using it for one graph, and that has been
replaced in osmo-bsc I36b721f895caee9766528e14d854b6aa2a2fac85.

Depends: osmo-bsc I36b721f895caee9766528e14d854b6aa2a2fac85
Related: OS#2819
Change-Id: I57522e57e39682d6d123af4584785d327361e5a3
---
M INSTALL.txt
M build/Makefile.asciidoc.inc
M build/filter-wrapper.py
D build/python2-filter.conf
M build/unix-time-to-fmt.py
M check-depends.sh
M debian/control
7 files changed, 4 insertions(+), 41 deletions(-)

Approvals:
  Jenkins Builder: Verified
  pespin: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved



diff --git a/INSTALL.txt b/INSTALL.txt
index 3f4ef9f..d241fd2 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -9,7 +9,6 @@
   docbook5-xml \
   mscgen \
   graphviz \
-  python-pychart \
   python3-nwdiag
 
 (Note that asciidoc-dblatex is required from debian 9 on and did not exist before.)
diff --git a/build/Makefile.asciidoc.inc b/build/Makefile.asciidoc.inc
index 7cb660f..54969fc 100644
--- a/build/Makefile.asciidoc.inc
+++ b/build/Makefile.asciidoc.inc
@@ -37,7 +37,7 @@
 CLEAN_FILES += $(ASCIIDOC_PDF) $(ASCIIDOC_NAME:%=%.html)
 UPLOAD_FILES += $(ASCIIDOC_PDF)
 
-ASCIIDOC_OPTS := -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf -f $(BUILDDIR)/docinfo-releaseinfo.conf -f $(BUILDDIR)/python2-filter.conf -a srcdir='$(srcdir)' -a commondir='$(COMMONDIR)'
+ASCIIDOC_OPTS := -f $(BUILDDIR)/mscgen-filter.conf -f $(BUILDDIR)/diag-filter.conf -f $(BUILDDIR)/docinfo-releaseinfo.conf -a srcdir='$(srcdir)' -a commondir='$(COMMONDIR)'
 DBLATEX_OPTS := -s $(ASCIIDOCSTYLE) -P draft.mode=yes -P draft.watermark=0
 
 ifeq (,$(BUILD_RELEASE))
diff --git a/build/filter-wrapper.py b/build/filter-wrapper.py
index 82fec1b..83db291 100755
--- a/build/filter-wrapper.py
+++ b/build/filter-wrapper.py
@@ -1,4 +1,4 @@
-#!  /usr/bin/env python
+#!/usr/bin/env python3
 """Simple wrapper for filter programs which ensures that a blank
 is returned as output.  The purpose is to silence the
 AsciiDoc warning "no output from filter".
diff --git a/build/python2-filter.conf b/build/python2-filter.conf
deleted file mode 100644
index 812c7c2..0000000
--- a/build/python2-filter.conf
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# AsciiDoc mscgen filter configuration file.
-# ${OSMO_GSM_MANUALS}/build is symlinked to ./build when building.
-#
-
-[python2-filter-style]
-python2-style=template="python2-block",subs=(),posattrs=("style","target"),filter='./build/filter-wrapper.py python2 - --output="{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}"'
-
-[blockdef-listing]
-template::[python2-filter-style]
-
-[paradef-default]
-template::[python2-filter-style]
-
-[python2-block]
-template::[filter-image-pngsvg-blockmacro]
-
-[filter-image-pngsvg-blockmacro]
-{target%}{counter2:target-number}
-{target%}{set2:target:{docname}__{target-number}.{format={basebackend-docbook!png}{basebackend-docbook?png}}}
-|
-template::[image-blockmacro]
diff --git a/build/unix-time-to-fmt.py b/build/unix-time-to-fmt.py
index 72ece26..9e5e141 100755
--- a/build/unix-time-to-fmt.py
+++ b/build/unix-time-to-fmt.py
@@ -1,11 +1,11 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 """
 Usage:
 
   unix-time-to-fmt.py 1234567 [%Y-%m-%d[...]]
 
 Convert unix timestamp to a string of the given format in UTC, according to
-  https://docs.python.org/2/library/time.html
+  https://docs.python.org/3/library/time.html
 Default is '%Y-%b-%d' --> 2016-Jan-01
 """
 
diff --git a/check-depends.sh b/check-depends.sh
index d640abf..c841086 100755
--- a/check-depends.sh
+++ b/check-depends.sh
@@ -8,14 +8,6 @@
 	fi
 }
 
-# $1: module name, $2: package name
-check_dep_python2_module() {
-	if ! echo "import $1" | python2 - >/dev/null 2>&1; then
-		echo "Failed to import '$1' module, please install $2."
-		exit 1
-	fi
-}
-
 check_dep_bin mscgen mscgen
 check_dep_bin xsltproc libxslt
 check_dep_bin a2x asciidoc
@@ -23,7 +15,5 @@
 check_dep_bin dblatex dblatex
 check_dep_bin packetdiag3 python3-nwdiag
 check_dep_bin dot graphviz
-check_dep_bin python2 python2
-check_dep_python2_module pychart python2-pychart
 
 echo "All dependencies installed!"
diff --git a/debian/control b/debian/control
index afd09a3..fa44525 100644
--- a/debian/control
+++ b/debian/control
@@ -14,9 +14,7 @@
                graphviz,
                libxml2-utils,
                mscgen,
-               python,
                python3-nwdiag,
-               python-pychart,
                xsltproc
 Standards-Version: 3.9.8
 Homepage: https://git.osmocom.org/osmo-gsm-manuals/
@@ -31,9 +29,7 @@
          graphviz,
          libxml2-utils,
          mscgen,
-         python,
          python3-nwdiag,
-         python-pychart,
          xsltproc
 Description: Osmocom manuals shared code
  All Osomocom repositories require this package to build their manuals.

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/16504
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I57522e57e39682d6d123af4584785d327361e5a3
Gerrit-Change-Number: 16504
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191206/2a23d06c/attachment.htm>


More information about the gerrit-log mailing list