aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2019-12-05 15:25:22 +0100
committerOliver Smith <osmith@sysmocom.de>2019-12-05 16:40:13 +0100
commit0999d4179475ce31192036a98cad4622451efb2c (patch)
tree24dc9c169c2d386afe6782b3def4900f15763f48
parent33d3786e1c3911a8f72fd20dee2a6f168e095310 (diff)
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
-rw-r--r--INSTALL.txt1
-rw-r--r--build/Makefile.asciidoc.inc2
-rwxr-xr-xbuild/filter-wrapper.py2
-rw-r--r--build/python2-filter.conf22
-rwxr-xr-xbuild/unix-time-to-fmt.py4
-rwxr-xr-xcheck-depends.sh10
-rw-r--r--debian/control4
7 files changed, 4 insertions, 41 deletions
diff --git a/INSTALL.txt b/INSTALL.txt
index 3f4ef9f..d241fd2 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -9,7 +9,6 @@ apt-get install \
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_NAME:%=%__*.png) $(ASCIIDOC_NAME:%=%__*.svg) $(ASCIIDO
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 @@ check_dep_bin() {
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 asciidoc asciidoc
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 @@ Build-Depends: autotools-dev,
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 @@ Depends: ${misc:Depends},
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.