Before release 1.20.2, the command conda build --output conda.recipe only printed the path of the output file. Now, on all operating systems, it prints something like:
Removing old work directory
C:\Anaconda3\conda-bld\win-64\libdynd-0.7.2-0.tar.bz2
This is a pain when trying to redirect its output to another command (like anaconda upload).
For example, anaconda --token $ANACONDA_TOKEN upload $(conda build --output conda.recipe) --user dynd --channel dev (or the equivalent powershell version of that statement) is run in the libdynd CI tests.
If that was a deliberate change, what's the recommended workaround?
CC: @izaid
Yeah, we basically want to know how to get the path of the output file now. This is a serious problem, because it just broke all of DyND's CI related to conda.
Congratulations! You're the first bug in 1.20.2.
This is happening because the source is used (and thus downloaded, copied, or cloned), which is the part that is giving you this message. It should be possible to use conda render (new command) until this is fixed:
conda render --output --no-source
Thanks for the quick reply! So, we should just do conda render --output --no-source conda.recipe where we used to have conda build --output conda.recipe?
This didn't work -- conda-render: error: unrecognized arguments: --no-source
Sorry, only on my phone. Please try
conda render -h
To see options
On Fri, May 13, 2016, 13:25 Irwin Zaid [email protected] wrote:
This didn't work -- conda-render: error: unrecognized arguments:
--no-source—
You are receiving this because you commented.Reply to this email directly or view it on GitHub
https://github.com/conda/conda-build/issues/949#issuecomment-219122513
I'm getting the following with conda render
$ conda render --output conda_recipe
Removing old work directory
Traceback (most recent call last):
File "/home/jhelmus/anaconda/bin/conda-render", line 5, in <module>
sys.exit(main())
File "/home/jhelmus/anaconda/lib/python3.5/site-packages/conda_build/main_render.py", line 156, in main
print(bldpkg_path(metadata))
File "/home/jhelmus/anaconda/lib/python3.5/site-packages/conda_build/build.py", line 368, in bldpkg_path
return join(config.bldpkgs_dir, '%s.tar.bz2' % m.dist())
AttributeError: 'tuple' object has no attribute 'dist'
Thanks @jjhelmus. Our tests need work!!
Looks like the option should be --no_souce but that too is giving me an AttributeError
The render_recipe function in conda_build/render.py looks to not be expecting a tuple return from the parse_or_try_download function. Changing the line as follow results in the command working:
m, _ = parse_or_try_download(m, no_download_source=no_download_source)
Thanks @jjhelmus, will apply as soon as I can get back to my computer.
On Fri, May 13, 2016, 13:56 Jonathan J. Helmus [email protected]
wrote:
The render_recipe function in _conda_build/render_ looks to not be
expecting a tuple return from the parse_or_try_download function.
Changing the line as follow results in the command working:m, _ = parse_or_try_download(m, no_download_source=no_download_source)
—
You are receiving this because you commented.Reply to this email directly or view it on GitHub
https://github.com/conda/conda-build/issues/949#issuecomment-219130377
If anyone needs a work around for this and doesn't want to use conda build 1.20.1, grep can be used to pull out the package name from the conda build --output command. For example:
export CONDA_PACKAGE=`conda build --output conda_recipe/ | grep bz2`
conda install --yes $CONDA_PACKAGE
Similar workaround in PowerShell:
conda build --output conda.recipe | select -Last 1
proposed fix at https://github.com/conda/conda-build/pull/950 - would appreciate a review from any of the affected parties here.
The travis-ci tests fail. Is this ready for review nonetheless ?
Perhaps not. I'd appreciate your review of the new tests, to see if they adequately represent your use case.
I can confirm that the patch there fixes this issue. The test looks like it covers the right thing. I haven't gone through the code in detail yet.
And, for completeness, the workaround for the windows cmd shell:
conda build --output extruder.recipe | more +2 > to_upload.txt
WIl try to look at the code (especially the tests) tomorrow.
Tests for this issue are at:
Code is scattered in that PR - search for "verbose" - general idea is that we replace stdout/stderr with buffers to prevent output, then restore them afterwards. Same is done for subprocesses.
That PR is still failing a few tests, but it's getting close to ready.
Most helpful comment
If anyone needs a work around for this and doesn't want to use conda build 1.20.1, grep can be used to pull out the package name from the
conda build --outputcommand. For example: