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.pyto change the version. - Edit
source/3rdparty/python/BUILDwith the corresponding version. - Run the command
python3.7 setup.py bdist_wheelin theairflowdirectory to build the wheel. It will be written toairflow/dist. - Clean out the pex cache:
rm -rf ~/.pex ~/.cache/pants. - Run
ps aux | grep pantsdto find the pid of the pantsd process. - Run
kill $pidwhere$pidis the the pid just observed. - From the
sourcedirectory, run./pants clean-all. - Now here are the hacky parts. The
run-local.shandrun-aurora.shall 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.