Merge branch 'master' into 2449-keep-write-blocks
[arvados.git] / sdk / python / build.sh
1 #!/bin/sh
2 #
3 # Apparently the only reliable way to distribute Python packages with pypi and
4 # install them via pip is as source packages (sdist).
5 #
6 # That means that setup.py is run on the system the package is being installed on,
7 # outside of the Arvados git tree.
8 #
9 # In turn, this means that we can not build the minor_version on the fly when
10 # setup.py is being executed. Instead, we use this script to generate a 'static'
11 # version of setup.py which will can be distributed via pypi.
12
13 minor_version=`git log --format=format:%ct.%h -n1 .`
14
15 sed "s|%%MINOR_VERSION%%|$minor_version|" < setup.py.src > setup.py
16