Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
macros: Sync with boulder-rs
Browse files Browse the repository at this point in the history
Signed-off-by: Ikey Doherty <ikey@serpentos.com>
  • Loading branch information
ikeycode committed Mar 10, 2024
1 parent 0c72478 commit 5294f46
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion data/macros/actions/python.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
actions:

# Perform python setup and build with the default options
- python:
- python_setup:
command: |
test -e ./setup.py || ( echo "%%python: The ./setup.py script could not be found" ; exit 1 )
python3 setup.py build
Expand Down Expand Up @@ -31,3 +31,20 @@ actions:
dependencies:
- python
- python-installer

# Compile .pyc bytecode files from any miscellaneous .py files in the install directory.
# TODO: Investigate whether providing additional -opt1.pyc and -opt2.pyc from increasing
# the optimization level is worth it. Python itself has to be invoked with -O/-OO
# in order to use opt1/opt2 .pyc files.
- python_compile:
command: |
function python_compile() {
if [ -z "$1" ]; then
python -m compileall -q %(installroot) || exit 1
else
python -m compileall -q $* || exit 1
fi
}
python_compile
dependencies:
- python

0 comments on commit 5294f46

Please sign in to comment.