Permalink
Browse files
Show the bytecode-*.zip filename in oil --version.
Also, update line counts.
- Loading branch information...
Showing
with
30 additions
and
9 deletions.
-
+5
−0
bin/oil.py
-
+14
−0
build/actions.sh
-
+7
−8
build/compile.sh
-
+2
−0
portable-rules.mk
-
+2
−1
scripts/count.sh
|
|
@@ -161,6 +161,10 @@ def _ShowVersion(): |
|
|
finally:
|
|
|
f.close()
|
|
|
|
|
|
f = loader.open('pyc-version.txt')
|
|
|
pyc_version = f.readline().strip()
|
|
|
f.close()
|
|
|
|
|
|
# What C functions do these come from?
|
|
|
print('Oil version %s' % version)
|
|
|
print('Release Date: %s' % release_date)
|
|
|
@@ -170,6 +174,7 @@ def _ShowVersion(): |
|
|
print('Compiler: %s' % platform.python_compiler())
|
|
|
print('Interpreter: %s' % platform.python_implementation())
|
|
|
print('Interpreter version: %s' % platform.python_version())
|
|
|
print('Bytecode: %s' % pyc_version)
|
|
|
|
|
|
|
|
|
def OshMain(argv, login_shell):
|
|
|
|
|
|
@@ -95,6 +95,20 @@ quick-ref-manifest() { |
|
|
done
|
|
|
}
|
|
|
|
|
|
pyc-version-manifest() {
|
|
|
local zip_path=${1:-_build/oil/bytecode-opy.zip} # For example
|
|
|
|
|
|
# Just show a string like "bytecode-opy.zip" for now. There is no OPy
|
|
|
# version yet.
|
|
|
local user_str=$(basename $zip_path)
|
|
|
local dir=$(dirname $zip_path)
|
|
|
|
|
|
echo $user_str > $dir/pyc-version.txt
|
|
|
|
|
|
# Put it at the root, like release-date and oil-version.txt.
|
|
|
echo $dir/pyc-version.txt pyc-version.txt
|
|
|
}
|
|
|
|
|
|
# Make .d file
|
|
|
make-dotd() {
|
|
|
local app_name=${1:-hello}
|
|
|
|
|
|
@@ -313,19 +313,18 @@ make-tar() { |
|
|
|
|
|
echo "Creating $app_name version $version"
|
|
|
|
|
|
# compile.sh is for the command line
|
|
|
# actions.sh for concatenation
|
|
|
#
|
|
|
# NOTE: We include the intermediate file c-module-srcs.txt, so we don't have
|
|
|
# to ship app_deps.py. We don't want the build to depend on Python.
|
|
|
|
|
|
local c_module_srcs=_build/$app_name/c-module-srcs.txt
|
|
|
|
|
|
# Add oil-0.0.0/ to the beginning of every path.
|
|
|
local sed_expr="s,^,${app_name}-${version}/,"
|
|
|
|
|
|
# TODO: Remove portable-rules.mk from Makefile. Or maybe conditionally
|
|
|
# detect it?
|
|
|
# Differences between tarball and repo:
|
|
|
#
|
|
|
# - portable-rules.mk is intentionally not included in the release tarball.
|
|
|
# The Makefile can and should operate without it.
|
|
|
#
|
|
|
# - We include intermediate files like c-module-srcs.txt, so we don't have to
|
|
|
# ship tools app_deps.py. The end-user build shouldn't depend on Python.
|
|
|
|
|
|
tar --create --transform "$sed_expr" --file $out \
|
|
|
LICENSE.txt \
|
|
|
|
|
|
@@ -150,6 +150,7 @@ _build/oil/bytecode-cpython.zip: $(OIL_BYTECODE_DEPS) \ |
|
|
_build/oil/app-deps-cpython.txt \
|
|
|
_build/runpy-deps-cpython.txt; \
|
|
|
$(ACTIONS_SH) quick-ref-manifest _devbuild/osh-quick-ref; \
|
|
|
$(ACTIONS_SH) pyc-version-manifest $@; \
|
|
|
} | build/make_zip.py $@
|
|
|
|
|
|
# NOTE: runpy deps are included in opy-app-deps.txt.
|
|
|
@@ -161,6 +162,7 @@ _build/oil/bytecode-opy.zip: $(OIL_BYTECODE_DEPS) \ |
|
|
cat build/oil-manifest.txt \
|
|
|
_build/oil/opy-app-deps.txt; \
|
|
|
$(ACTIONS_SH) quick-ref-manifest _devbuild/osh-quick-ref; \
|
|
|
$(ACTIONS_SH) pyc-version-manifest $@; \
|
|
|
} | build/make_zip.py $@
|
|
|
|
|
|
#
|
|
|
|
|
|
@@ -59,7 +59,8 @@ oil-osh-cloc() { |
|
|
# everything into an array. An hash table of arrays would be useful here.
|
|
|
all() {
|
|
|
echo 'BUILD AUTOMATION'
|
|
|
wc -l build/*.{sh,py} Makefile configure install | filter-py | sort --numeric
|
|
|
wc -l build/*.{sh,py} Makefile *.mk configure install |
|
|
|
filter-py | sort --numeric
|
|
|
echo
|
|
|
|
|
|
echo 'TEST AUTOMATION'
|
|
|
|
0 comments on commit
4dbb64d