build: switch to python3

Refs: #5095
Change-Id: I7e7a3a5cd49d69c6e389060ccf8fe30599ebd876
This commit is contained in:
Davide Pesavento committed 2020-03-29 01:04:31 -04:00
1 parent 4ab5eed35d
commit a1a9d704ba
8 files changed
+52 -49

No files matched your search

+3 -1
View File
@@ -1,9 +1,11 @@
#!/usr/bin/env bash
set -e
export WAF_JOBS=${WAF_JOBS:-1}
nanos() {
# Cannot use date(1) because macOS does not support %N format specifier
python -c 'import time; print(int(time.time() * 1e9))'
python3 -c 'import time; print(int(time.time() * 1e9))'
}
for file in .jenkins.d/*; do
+23 -17
View File
@@ -8,31 +8,37 @@ set -x
if has OSX $NODE_LABELS; then
FORMULAE=(boost openssl pkg-config)
brew update
if [[ -n $TRAVIS ]]; then
# Travis images come with a large number of brew packages
# pre-installed, don't waste time upgrading all of them
for FORMULA in "${FORMULAE[@]}"; do
brew outdated $FORMULA || brew upgrade $FORMULA
done
else
brew upgrade
if has OSX-10.13 $NODE_LABELS || has OSX-10.14 $NODE_LABELS; then
FORMULAE+=(python)
fi
brew install "${FORMULAE[@]}"
brew cleanup
fi
if has Ubuntu $NODE_LABELS; then
if [[ -n $TRAVIS ]]; then
# Travis images come with a large number of pre-installed
# brew packages, don't waste time upgrading all of them
brew list --versions "${FORMULAE[@]}" || brew update
for FORMULA in "${FORMULAE[@]}"; do
brew list --versions "$FORMULA" || brew install "$FORMULA"
done
# Ensure /usr/local/opt/openssl exists
brew reinstall openssl
else
brew update
brew upgrade
brew install "${FORMULAE[@]}"
brew cleanup
fi
elif has Ubuntu $NODE_LABELS; then
sudo apt-get -qq update
sudo apt-get -qy install build-essential pkg-config libboost-all-dev \
libsqlite3-dev libssl-dev libpcap-dev
sudo apt-get -qy install g++ pkg-config python3-minimal \
libboost-all-dev libssl-dev libsqlite3-dev \
libpcap-dev
if [[ $JOB_NAME == *"code-coverage" ]]; then
sudo apt-get -qy install gcovr lcov libgd-perl
fi
fi
if has CentOS-7 $NODE_LABELS; then
elif has CentOS-7 $NODE_LABELS; then
sudo yum -y install yum-utils pkgconfig \
openssl-devel libtranslit-icu \
python-devel sqlite-devel \
+1 -1
View File
@@ -43,7 +43,7 @@ sudo rm -f /usr/local/lib{,64}/pkgconfig/libndn-cxx.pc
pushd ndn-cxx >/dev/null
./waf --color=yes configure --disable-static --enable-shared --without-osx-keychain
./waf --color=yes build -j${WAF_JOBS:-1}
./waf --color=yes build -j$WAF_JOBS
sudo_preserve_env PATH -- ./waf --color=yes install
popd >/dev/null
+8 -8
View File
@@ -6,34 +6,34 @@ source "$JDIR"/util.sh
set -x
git submodule sync
git submodule update --init
if [[ $JOB_NAME == *"code-coverage" ]]; then
COVERAGE="--with-coverage"
elif [[ -z $DISABLE_ASAN ]]; then
ASAN="--with-sanitizer=address"
fi
# Cleanup
sudo_preserve_env PATH -- ./waf --color=yes distclean
if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then
# Build in release mode with tests
./waf --color=yes configure --with-tests
./waf --color=yes build -j${WAF_JOBS:-1}
./waf --color=yes build -j$WAF_JOBS
# Cleanup
sudo_preserve_env PATH -- ./waf --color=yes distclean
./waf --color=yes distclean
# Build in release mode without tests
./waf --color=yes configure
./waf --color=yes build -j${WAF_JOBS:-1}
./waf --color=yes build -j$WAF_JOBS
# Cleanup
sudo_preserve_env PATH -- ./waf --color=yes distclean
./waf --color=yes distclean
fi
# Build in debug mode with tests
./waf --color=yes configure --debug --with-tests $ASAN $COVERAGE
./waf --color=yes build -j${WAF_JOBS:-1}
./waf --color=yes build -j$WAF_JOBS
# (tests will be run against the debug version)
+8 -7
View File
@@ -7,9 +7,9 @@ source "$JDIR"/util.sh
set -x
# Prepare environment
rm -Rf ~/.ndn
rm -rf ~/.ndn
BOOST_VERSION=$(python -c "import sys; sys.path.append('build/c4che'); import _cache; print(_cache.BOOST_VERSION_NUMBER);")
BOOST_VERSION=$(python3 -c "import sys; sys.path.append('build/c4che'); import _cache; print(_cache.BOOST_VERSION_NUMBER);")
ut_log_args() {
if (( BOOST_VERSION >= 106200 )); then
@@ -24,13 +24,14 @@ ut_log_args() {
fi
}
# https://github.com/google/sanitizers/wiki/AddressSanitizerFlags
ASAN_OPTIONS="color=always"
ASAN_OPTIONS+=":detect_stack_use_after_return=true"
ASAN_OPTIONS+=":check_initialization_order=true"
ASAN_OPTIONS+=":strict_init_order=true"
ASAN_OPTIONS+=":check_initialization_order=1"
ASAN_OPTIONS+=":detect_stack_use_after_return=1"
ASAN_OPTIONS+=":strict_init_order=1"
ASAN_OPTIONS+=":strict_string_checks=1"
ASAN_OPTIONS+=":detect_invalid_pointer_pairs=1"
ASAN_OPTIONS+=":detect_container_overflow=false"
ASAN_OPTIONS+=":strict_string_checks=true"
ASAN_OPTIONS+=":detect_container_overflow=0"
ASAN_OPTIONS+=":strip_path_prefix=${PWD}/"
export ASAN_OPTIONS
-6
View File
@@ -92,12 +92,6 @@ before_script:
export DISABLE_ASAN=yes
;;
esac
if [[ ${TRAVIS_OS_NAME} == osx ]]; then
# Do not waste time upgrading useless packages
brew pin cgal gdal postgis sfcgal || true
# Ensure /usr/local/opt/openssl exists
brew reinstall openssl || true
fi
- ${CXX:-c++} --version
script:
+8 -8
View File
@@ -20,7 +20,7 @@
# -- Project information -----------------------------------------------------
project = u'NDN Essential Tools'
copyright = u'Copyright © 2014-2019 Named Data Networking Project.'
copyright = u'Copyright © 2014-2020 Named Data Networking Project.'
author = u'Named Data Networking Project'
# The short X.Y version
@@ -57,13 +57,13 @@ master_doc = 'index'
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('ndnpeek', 'ndnpeek', 'simple consumer to send one Interest and expect one Data', [], 1),
('ndnpoke', 'ndnpoke', 'simple producer to publish one Data', [], 1),
('ndnping', 'ndnping', 'reachability testing client', [], 1),
('ndnpingserver', 'ndnpingserver', 'reachability testing server', [], 1),
('ndnputchunks', 'ndnputchunks', 'producer program with content segmentation', [], 1),
('ndndump', 'ndndump', 'traffic analysis tool', [], 8),
('ndn-dissect', 'ndn-dissect', 'NDN packet format inspector', [], 1),
('ndnpeek', 'ndnpeek', 'simple consumer to send one Interest and receive one Data', [], 1),
('ndnpoke', 'ndnpoke', 'simple producer to publish one Data', [], 1),
('ndnping', 'ndnping', 'reachability testing client', [], 1),
('ndnpingserver', 'ndnpingserver', 'reachability testing server', [], 1),
('ndnputchunks', 'ndnputchunks', 'producer program with content segmentation', [], 1),
('ndndump', 'ndndump', 'traffic analysis tool', [], 8),
('ndn-dissect', 'ndn-dissect', 'NDN packet format inspector', [], 1),
]
# If true, show URL addresses after external links.
Vendored
+1 -1
View File
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3
# encoding: latin-1
# Thomas Nagy, 2005-2018
#