-
-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use conda-build=3 #5274
Use conda-build=3 #5274
Conversation
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
@msarahan, do you know why circleci works, but not appveyor? |
Because the This comes down to this code or similar for the other CIs, which makes sure we don't build recipes in PRs that were merged into If you do merge these examples, would double check that this code keeps them from going into feedstocks. Seems like it should though. Might also be worth moving all the example recipes into one big |
I've removed the example recipe for now. example2 now depends on example3, but example2 is built first. Is this a conda-build issue or was it never meant to replace conda-build-all? |
conda-build can build more than one recipe at a time, but it currently does not do topological sorting for which should be built first. We'd like to add that eventually, but it's not high priority for us. We use conda-concourse-ci internally for this purpose. |
So I think the issue is |
Okay. I guess I can write a simple python script that uses |
I don't think that's an issue here, but feel free to push to this PR. |
Here's a script that uses import conda_build.conda_interface
import networkx as nx
import conda_build.api
from conda_concourse_ci.compute_build_graph import construct_graph
import argparse
import os
def build_all(recipes_dir, arch, variant_config_files):
index = conda_build.conda_interface.get_index(channel_urls=['conda-forge'])
conda_resolve = conda_build.conda_interface.Resolve(index)
config = conda_build.api.Config(variant_config_files=variant_config_files)
worker={'platform': get_host_platform(), 'arch': arch, 'label': get_host_platform()}
G = construct_graph(recipes_dir, worker=worker, run='build', conda_resolve=conda_resolve,
folders=os.listdir(recipes_dir), config=config)
order = list(nx.topological_sort(G))
order.reverse()
print('Building packages')
print('\n'.join(order))
for node in order:
conda_build.api.build(G.node[node]['meta'])
def get_host_platform():
from sys import platform
if platform == "linux" or platform == "linux2":
return "linux"
elif platform == "darwin":
return "osx"
elif platform == "win32":
return "win"
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('recipes_dir', default=os.getcwd(), help='Directory where the recipes are')
parser.add_argument('--arch', default='64', help='target architecture (64 or 32)')
parser.add_argument('-m','--variant-config-files', action='append', help='variant config files')
args = parser.parse_args()
build_all(args.recipes_dir, args.arch, args.variant_config_files) |
430124b
to
8c78177
Compare
.ci_support/build_all.py
Outdated
folders=os.listdir(recipes_dir), config=config) | ||
|
||
order = list(nx.topological_sort(G)) | ||
order.reverse() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the build order reversed? (wouldn't this build the bottom of the graph first?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be that I build the graph backward when adding the nodes. I have considered going back and reversing it, but haven't found time. When I have tried, it ended up exploding in my face.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends on how the edge direction is defined. reverse here gives the order that I need
recipes/example3/meta.yaml
Outdated
@@ -10,7 +10,7 @@ | |||
# `conda install openssl -c conda-forge`` | |||
|
|||
package: | |||
name: {{ name|lower }} | |||
name: simplejson2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this on purpose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but I'll be reverting the examples once I know this works.
This passes on appveyor in my fork. |
Strange errors in linux and osx. @msarahan, any suggestions? |
In both cases, it's something to do with the system compilers and the resulting binary search path: https://travis-ci.org/conda-forge/staged-recipes/builds/346956154#L302 On circle:
I don't know anything more off the top of my head. I'll try to reproduce in a docker container tomorrow. @mingwandroid might have more ideas than me. |
I can reproduce this locally on linux. It tries to test a py2.7 package on a py3.6 environment. definitely something wrong with my script
|
Tests pass. Don't merge till I restore the example folder. Can I get a review? |
What conda version are you using? You should be aware of conda/conda-build#2707. This sounds potentially related. TLDR: probably better to pin conda to 4.3.x for now. Kale is working on a fix. |
.appveyor.yml
Outdated
@@ -5,13 +5,12 @@ environment: | |||
|
|||
# Workaround for https://github.com/conda/conda-build/issues/636 | |||
PYTHONIOENCODING: "UTF-8" | |||
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to leave this as Miniconda3-x64 - that's a symlink to the current miniconda3 install on appveyor. It'll be better to keep up-to-date that way (fewer updates, potentially)
@@ -0,0 +1,597 @@ | |||
#!/usr/bin/env python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is pretty big to vendor. It's probably OK, but it would be good to re-examine this vendoring decision in a few months and see if it's still a good idea, or if it would be better to add a dependency on c3i.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer adding c3i as a dependency, but c3i is not on defaults, so I thought it was meant for internal use only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also a lot of unused stuff here. I'm not sure if you want to remove it, or just leave it in for easier diffs down the line, should there be changes to both c3i and this file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can work on getting it onto defaults. It has only seen internal use, but I wouldn't say it's only meant for internal use. It's just much more oriented towards our needs, but could grow more general if there's community use and input (PRs definitely welcome).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry to be late. What was the outcome on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This functionality will be split from c3i and make its way into conda-build. No timeline right now, but hopefully soon. I don't think it will take too much work to have it simply work. Having it go fast will take more time.
Yes.
Release conda-smithy=3 first since anything working on cb2 works with cb3, there will be no issues. Merge this PR after conda-smithy=3 is released, then recipes with cb3 features will work in both staged-recipes and feedstocks |
So this gets at my larger question. Are we generally ok with merging this as is (aside from merge conflicts and order of merges)? |
@jakirkham - yes, I think everyone I talked to yesterday at the con about his @ocefpaf @CJ-Wright @ericdill @jjhelmus etc are OK with it |
Not there, but I'm in favor of this moving ahead.... |
Hmm I resolved the conflicts but it looks like it failed... |
fail seems like a conda update related thing. Kale is no longer tolerating channels that don't have noarch. I will hack in a fix in a bit. |
.appveyor.yml
Outdated
@@ -3,7 +3,7 @@ skip_commits: | |||
|
|||
environment: | |||
|
|||
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64" | |||
CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't. conda/conda#7144
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmmm... OK. I was probably chasing a red herring with the conda exe thing. I will revert this. Thanks for posting the issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given recent issues this seems to solve, are we ok leaving Miniconda36
here short term? This may already be agreeable at this stage. Just trying to confirm.
Pulling the trigger. |
Let's release conda-smith ;-)
I'll get to it soln if no one beats me to it.
…On Wed, Apr 11, 2018, 13:02 Isuru Fernando ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In .travis_scripts/create_feedstocks
<#5274 (comment)>
:
> @@ -35,9 +35,7 @@ bash ~/miniconda.sh -b -p ~/miniconda
)
source ~/miniconda/bin/activate root
-conda install --yes --quiet git=2.12.2
-conda install -n root --yes --quiet jinja2 anaconda-client
-conda install --yes --quiet conda-build=2 conda-smithy
+conda install --yes --quiet conda-forge-ci-setup=1.* conda-smithy=3.* conda-forge-pinning git=2.12.2
This was supposed to be merged after conda-smithy=3 is released. Now
feedstock conversion is broken due to this
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5274 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA6BLynp5IR30EyW5afWBLEiPNY94SZXks5tnikrgaJpZM4SUXVP>
.
|
I agree @ocefpaf :) |
Milestone for conda-smithy=3 is not yet complete, https://github.com/conda-forge/conda-smithy/milestone/7 |
Let's change the milestone. I don't think those last two are crucial to our
workflow.
…On Wed, Apr 11, 2018, 13:20 Isuru Fernando ***@***.***> wrote:
Milestone for cs3 is not yet complete,
https://github.com/conda-forge/conda-smithy/milestone/7
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5274 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA6BLzohcN3McEEC1UBCse_1Yy3tHwRuks5tni06gaJpZM4SUXVP>
.
|
Please test before releasing. I'd urge everyone from core to rerender at least 2 of their favourite recipes and see if it works on CI |
On it. Thanks @isuruf! |
I have tried rerendering a few of the harder packages, such as cyclus, and everything works like a dream |
Thanks @scopatz. Did you also try on CI? |
Not yet. |
Please have a look at https://github.com/conda-forge/conda-smithy/wiki/Release-Notes-3.0.0.rc1 and update if you find any mistakes |
Had been playing with |
cc @conda-forge/core