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
This commit is contained in:
Oliver Smith 2019-12-05 15:25:22 +01:00
parent 33d3786e1c
commit 0999d41794
7 changed files with 4 additions and 41 deletions

View File

@ -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.)

View File

@ -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))

View File

@ -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".

View File

@ -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]

View File

@ -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
"""

View File

@ -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!"

4
debian/control vendored
View File

@ -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.