Here are some steps to develop this dependency locally and interact with source, interpreted from https://confluence.twitter.biz/display/ENG/Overview%3A+Python+3rdparty+in+Source
- Create a git branch for this change.
- Edit
airflow/version.py
to change the version. - Edit
source/3rdparty/python/BUILD
with the corresponding version. - Run the command
python3.7 setup.py bdist_wheel
in theairflow
directory to build the wheel. It will be written toairflow/dist
. - Clean out the pex cache:
rm -rf ~/.pex ~/.cache/pants
. - Run
ps aux | grep pantsd
to find the pid of the pantsd process. - Run
kill $pid
where$pid
is the the pid just observed. - From the
source
directory, run./pants clean-all
. - Now here are the hacky parts. The
run-local.sh
andrun-aurora.sh
all run pants commands without the option--python-repos-repos
. You can either edit these to include this option, or run a pants command that includes it, which will cache the local artifact you need, e.g../pants test airflow:: --python-repos-repos="['file:///path/to/airflow/dist/', 'https://science-binaries.local.twitter.com/home/third_party/source/python/wheels/', 'https://science-binaries.local.twitter.com/home/third_party/source/python/bootstrap/','https://science-binaries.local.twitter.com/home/third_party/source/python/sources/']"
- Now you can start up airflow instances as usual with the newly built wheel!
- See the above link for
Adding Dependencies to science-libraries
.