I have a Python project where I am using the maskrcnn_benchmark
project from facebook research.
In my continuous integration script, I create a virtual environment where I install this project with thee following steps:
- git clone https://github.com/facebookresearch/maskrcnn-benchmark.git
- cd maskrcnn-benchmark
- git reset --hard 5ec0b91cc85163ac3b58265b3f9b39bb327d0ba6
- python setup.py build develop
This works fine and installs everything in the virtual environment as it needs to be.
Now I have a setup.py
for my project for packaging and deploying my app. How can I do the same in this setup.py
file i.e. pull and build this repository from the particular commit hash?
Thanks to the answer below and the comments, I have the setup.py as follows now:
install_requires=[
'5ec0b91cc85163ac3b58265b3f9b39bb327d0ba6-0.1',
'ninja',
'yacs',
'matplotlib',
'cython==0.28.5',
'pymongo==3.7.1',
'scipy==1.1.0',
'torch==1.0.0',
'torchvision==0.2.1',
'opencv_python==3.4.2.17',
'numpy==1.15.1',
'gputil==1.3.0',
'scikit_learn==0.19.2',
'scikit_image==0.14.0',
'sk_video==1.1.10'
],
dependency_links=[
'http://github.com/facebookresearch/maskrcnn-benchmark/tarball/master#egg=5ec0b91cc85163ac3b58265b3f9b39bb327d0ba6-0.1'
],
No matter where I put the '5ec0b91cc85163ac3b58265b3f9b39bb327d0ba6-0.1'
, the maskrcnn-benchmark
project gets compiled first. How can I do it that the dependency and this package is installed last?