Commit f8c45dc1 authored by James Browning's avatar James Browning
Browse files

wscript, CI, doc: Eliminate need for python{,2,3}-dev{,el}

parent c5d154e3
Pipeline #187057998 failed with stages
in 8 minutes and 35 seconds
FROM alpine
RUN apk update
RUN apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev asciidoctor findutils gzip
RUN apk add gcc bison musl-dev openssl-dev libcap-dev python3 asciidoctor findutils gzip
FROM alpine
RUN apk update
RUN apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev libseccomp-dev
RUN apk add gcc bison musl-dev openssl-dev libcap-dev python3 libseccomp-dev
FROM debian:testing-slim
RUN apt-get update
RUN apt-get install -y netbase bison libssl-dev libcap-dev pps-tools python-dev clang
RUN apt-get install -y netbase bison libssl-dev libcap-dev pps-tools python clang
FROM debian:stable-slim
RUN apt-get update
RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python-dev libavahi-compat-libdnssd-dev
RUN apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python libavahi-compat-libdnssd-dev
FROM registry.fedoraproject.org/fedora:rawhide
RUN dnf -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel python3-gpsd
RUN dnf -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3 python3-gpsd
FROM opensuse/leap
RUN zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python3-devel python3-curses
RUN zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python3 python3-curses
FROM opensuse/tumbleweed
RUN zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python3-devel python3-curses
RUN zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python3 python3-curses
......@@ -64,7 +64,7 @@ AsciiDoc-3-Fedora:
<<: *job_definition
image: fedora
script:
- yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel wget unzip libxslt docbook-style-xsl
- yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3 wget unzip libxslt docbook-style-xsl
- wget https://asciidoc3.org/asciidoc3-3.1.0.zip
- unzip asciidoc3-3.1.0.zip -d asciidoc3
- ln -sv a2x3.py asciidoc3/a2x3
......@@ -76,14 +76,14 @@ AsciiDoc-classic2-Alpine:
<<: *job_definition
image: alpine
script:
- apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python2-dev asciidoc
- apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python2 asciidoc
- python ./waf configure --enable-doc --enable-manpage build
AsciiDoc-classic3-Alpine:
<<: *job_definition
image: alpine
script:
- apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3-dev asciidoc
- apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python3 asciidoc
- python3 ./waf configure --enable-doc --enable-manpage build
AsciiDoc-no:
......@@ -98,7 +98,7 @@ AsciiDoc-py3-Ubuntu:
image: ubuntu:devel
script:
- apt-get update
- DEBIAN_FRONTEND="noninteractive" apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3-dev asciidoc-base
- DEBIAN_FRONTEND="noninteractive" apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python3 asciidoc-base
- python3 ./waf configure --enable-doc --enable-manpage build
debian-oldstable-basic:
......@@ -272,7 +272,7 @@ python3-rc:
python-coverage:
<<: *job_definition
script:
- apt-get update -qq && apt-get install -y -qq netbase bison python-dev python-coverage
- apt-get update -qq && apt-get install -y -qq netbase bison python python-coverage
- python ./waf configure --disable-doc --disable-manpage build
- for i in build/main/tests/pylib/test_*; do python-coverage run -a --source build/main/pylib "$i"; done
- python-coverage report
......
......@@ -12,43 +12,43 @@ alpine-edge-options-tester:
<<: *option_tester
image: alpine:edge
script:
- apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python2-dev python3-dev asciidoc libseccomp-dev bash
- apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python2 python3 asciidoc libseccomp-dev bash
alpine-options-tester:
<<: *option_tester
image: alpine
script:
- apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python2-dev python3-dev asciidoc libseccomp-dev bash
- apk update && apk add gcc bison musl-dev openssl-dev libcap-dev python2 python3 asciidoc libseccomp-dev bash
centos-options-tester:
<<: *option_tester
image: centos:latest
script:
- dnf -y --enablerepo=PowerTools install bison gcc openssl-devel libcap-devel python3-devel python2-devel pps-tools-devel libseccomp-devel bash
- dnf -y --enablerepo=PowerTools install bison gcc openssl-devel libcap-devel python3 python2 pps-tools-devel libseccomp-devel bash
fedora-latest-options-tester:
image: fedora:latest
script:
- yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel python2-devel libseccomp-devel bash
- yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3 python2 libseccomp-devel bash
<<: *option_tester
fedora-rawhide-options-tester:
image: registry.fedoraproject.org/fedora:rawhide
script:
- yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3-devel python2-devel libseccomp-devel bash
- yum -y install bison gcc openssl-devel libcap-devel pps-tools-devel python3 python2 libseccomp-devel bash
<<: *option_tester
opensuse-leap-options-tester:
<<: *option_tester
image: opensuse/leap
script:
- zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python-devel python-curses libseccomp-devel python3-devel python3-curses bash
- zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python python-curses libseccomp-devel python3 python3-curses bash
opensuse-tumbleweed-options-tester:
<<: *option_tester
image: opensuse/tumbleweed
script:
- zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python-devel python-curses libseccomp-devel python3-devel python3-curses bash
- zypper -n install bison gcc libopenssl-devel libcap-devel pps-tools-devel python python-curses libseccomp-devel python3 python3-curses bash
gentoo-options-tester:
<<: *option_tester
......@@ -98,7 +98,7 @@ fbsd-12-options-tester:
stage: test
script:
- apt-get update
- DEBIAN_FRONTEND=noninteractive apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python2-dev python2-minimal libseccomp-dev bash pkg-config python3-dev python3-minimal
- DEBIAN_FRONTEND=noninteractive apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python2 python2-minimal libseccomp-dev bash pkg-config python3 python3-minimal
- PYTHON=python2 bash tests/option-tester.sh
- PYTHON=python3 bash tests/option-tester.sh
tags:
......@@ -110,7 +110,7 @@ fbsd-12-options-tester:
stage: test
script:
- apt-get update
- apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python-dev python-minimal libseccomp-dev bash pkg-config python3-dev python3-minimal
- apt-get install -y netbase bison gcc libssl-dev libcap-dev pps-tools python python-minimal libseccomp-dev bash pkg-config python3 python3-minimal
- PYTHON=python bash tests/option-tester.sh
- PYTHON=python3 bash tests/option-tester.sh
tags:
......
......@@ -49,10 +49,7 @@ different packages depending on whether your base Python version is
Python 2.x, x >= 6, or Python 3.x, x >= 3::
Required to build, and for various scripts such as ntpviz (but see
the guidance for packagers in devel/packaging.adoc). Our Python code
has been written polyglot to also run with production versions of
Python 3. Note that you will need both the ordinary Python
installation and Python dev tools, if your OS makes such a
distinction.
has been written polyglot to run with either Python 2 or Python 3.
Some OS distros won't find our installed python libraries.
More info in README-PYTHON.
......
......@@ -50,7 +50,7 @@ EOF
esac
done
# Some Python 2 packages (e.g python-devel, python-psutils) conventionally have
# Some Python 2 packages (e.g python, python-psutils) conventionally have
# Python 3 equivalents with a python3 prefix. Compute the correct value for the
# infix based on system Python. This eill start to be significant after Python 2
# EOLs at the beginning of 2020.
......@@ -165,7 +165,7 @@ daemon () {
case $installer in
apk)
$install build-base python # basic tools
$install bison python${PYVERS}-dev linux-headers
$install bison python${PYVERS} linux-headers
$install openssl-dev libcap-dev libseccomp-dev
# probably needs more, but this builds
# can't find timepps.h: gpsd and chrony have their own ??
......@@ -243,11 +243,8 @@ daemon () {
tools () {
# Prerequisites for the client Python tools: python extensions
case $installer in
apt)
$install python${PYVERS}-dev
;;
yum|dnf|yast|zypper)
$install python${PYVERS}-devel
apt|yum|dnf|yast|zypper)
$install python${PYVERS}
;;
esac
}
......
......@@ -9,7 +9,6 @@ def configure(conf):
conf.load('python')
if not conf.env.ENABLE_CROSS:
conf.check_python_version((2, 6, 0))
conf.check_python_headers(features='pyext') # Extension-only, no embedded
try:
conf.check_python_module('curses')
conf.env['PYTHON_CURSES'] = True
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment