Permalink
Browse files

Create a new build/dev.sh script that does all the dev build steps.

- install development packages (e.g. for Ubuntu)
- generate {osh,oil}_help.py
- build pylibc
  • Loading branch information...
Andy Chu
Andy Chu committed Jul 28, 2017
1 parent c39d9b2 commit 82aa68f48c4051dd565d2cd6ca1dc207c667b761
Showing with 64 additions and 60 deletions.
  1. +64 −0 build/dev.sh
  2. +0 −38 build/pylibc.sh
  3. +0 −22 deps.sh
View
@@ -0,0 +1,64 @@
#!/usr/bin/env bash
#
# Set up a development build of Oil on CPython.
# This is in constrast to the release build, which bundles Oil with "OVM" (a
# slight fork of CPython).
# Build Python extension modules. We use symlinks instead of installing them
# globally (or using virtualenv).
#
# Usage:
# ./pybuild.sh <function name>
set -o nounset
set -o pipefail
set -o errexit
ubuntu-deps() {
# python-dev: for pylibc
# gawk: used by spec-runner.sh for the special match() function.
# time: used to collect the exit code and timing of a test
# libreadline-dev: needed for the build/prepare.sh Python build.
sudo apt-get install python-dev gawk time libreadline-dev
test/spec.sh install-shells
}
# These produce _devbuild/{osh,oil}_help.py
gen-help() {
build/doc.sh osh-quick-ref
build/doc.sh oil-quick-ref
}
pylibc() {
mkdir -p _devbuild/pylibc
local arch=$(uname -m)
build/setup.py build --build-lib _devbuild/pylibc/$arch
# Wildcard to match any Python 3 version.
shopt -s failglob
local so=$(echo _devbuild/pylibc/$arch/libc.so)
ln -s -f -v $so libc.so
file libc.so
}
# Also done by unit.sh.
test-pylibc() {
export PYTHONPATH=.
pylibc
native/libc_test.py
}
clean-pylibc() {
rm -f --verbose libc.so
rm -r -f --verbose _devbuild/pylibc
}
all() {
gen-help
pylibc
test-pylibc
}
"$@"
View

This file was deleted.

Oops, something went wrong.
View
22 deps.sh

This file was deleted.

Oops, something went wrong.

0 comments on commit 82aa68f

Please sign in to comment.