NOAA-OWP / t-route

Tree based hydrologic and hydraulic routing
Other
44 stars 50 forks source link

t-route build failed in NGIAB #798

Closed benlee0423 closed 4 months ago

benlee0423 commented 4 months ago

Current behavior

In our NGIAB repo, t-route build failed following error message.

10 202.4 python3: can't open file '/ngen/t-route/src/troute-nwm/setup.py': [Errno 2] No such file or directory

10 ERROR: process "/bin/sh -c export FC=gfortran NETCDF=/usr/include && cd ${WORKDIR}/t-route && ./compiler.sh && cd ./src/troute-network && python3 setup.py --use-cython bdist_wheel && cp dist/.whl ${WORKDIR}/t-route/wheels/ && cd ../troute-routing && python3 setup.py --use-cython bdist_wheel && cp dist/.whl ${WORKDIR}/t-route/wheels/ && cd ../troute-config && python3 -m build . && cp dist/.whl ${WORKDIR}/t-route/wheels/ && cd ../troute-nwm && python3 setup.py bdist_wheel && cp dist/.whl ${WORKDIR}/t-route/wheels/" did not complete successfully: exit code: 2I

I see the NOAA-OWP/t-route@41b6983 removed src/troute-nwm/setup.py file. We are using this file to create wheel with the following command. python3 setup.py bdist_wheel

I tried to build with python3 -m build ., and it is able to build but the image getting another during run-time.

shorvath-noaa commented 4 months ago

@aaraney any thoughts on this?

aaraney commented 4 months ago

Hey @benlee0423, the installation process for troute.nwm no longer uses setup.py (changed in #784) and has been moved to the more modern pyproject.toml format.

Change:

 cd ../troute-nwm &&
 python3 setup.py bdist_wheel &&

to

 cd ../troute-nwm &&
 python3 -m build . &&
aaraney commented 4 months ago

Thanks for reporting this, @benlee0423! It seems that python -m build . fixed the first issue you reported. I opened https://github.com/NOAA-OWP/t-route/issues/799 to address your other CI failure.