{"action":"created","issue":{"url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/857","labels_url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/857/labels{/name}","comments_url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/857/comments","events_url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/857/events","html_url":"https://github.com/rtfd/readthedocs.org/issues/857","id":37801899,"number":857,"title":"Support conda for builds","user":{"login":"mrocklin","id":306380,"avatar_url":"https://avatars.githubusercontent.com/u/306380?v=3","gravatar_id":"","url":"https://api.github.com/users/mrocklin","html_url":"https://github.com/mrocklin","followers_url":"https://api.github.com/users/mrocklin/followers","following_url":"https://api.github.com/users/mrocklin/following{/other_user}","gists_url":"https://api.github.com/users/mrocklin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrocklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrocklin/subscriptions","organizations_url":"https://api.github.com/users/mrocklin/orgs","repos_url":"https://api.github.com/users/mrocklin/repos","events_url":"https://api.github.com/users/mrocklin/events{/privacy}","received_events_url":"https://api.github.com/users/mrocklin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rtfd/readthedocs.org/labels/Enhancement","name":"Enhancement","color":"02d7e1"},{"url":"https://api.github.com/repos/rtfd/readthedocs.org/labels/Feature%20Overview","name":"Feature Overview","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":92,"created_at":"2014-07-14T16:21:16Z","updated_at":"2016-01-12T20:51:06Z","closed_at":null,"body":"Read the Docs Conda Support\r\n===========================\r\n\r\nThis will add the ability to generate documentation with conda environments on Read the Docs. This is mainly useful for libraries with large C dependencies, including many packages in the Scentific Python ecosystem.\r\n\r\nTask List\r\n------------\r\n\r\n- [x] Add Project option to use conda\r\n- [x] Abstract the \"environment path\" in the builders to respect conda & virtualenv\r\n- [x] Ensure cleanup of conda environment in wiping & other env delete scenarios \r\n- [x] Ensure Python 2 & 3 support\r\n- [x] Write tests for proper conda environment setup\r\n- [x] Document conda support\r\n- [ ] Write a topical guide for Choosing a Build Environment\r\n- [ ] Optional: Investigate [pruning](https://github.com/conda/conda-env/pull/195)\r\n\r\n\r\nAbilities\r\n---------\r\n\r\nYou will be able to specify a conda environment.yml file,\r\nand Read the Docs will install these dependencies in your build environment.\r\n\r\nConsiderations\r\n--------------\r\n\r\nRead the Docs will keep seperate virtualenv & conda directories:\r\n\r\n* /user_builds/<slug>/env for pip\r\n* /user_builds/<slug>/conda for conda\r\n\r\nUsers will be able to define a way to install packages for a project:\r\n\r\n* None\r\n* Pip\r\n* Conda\r\n\r\nRead the Docs will need to change it's build code so that we don't hard-code virtualenv paths. We'll need to vary our environment creation, as well as bin path's for executables, based on the backend environment. \r\n\r\nThe other main thing is that we'll also need to install Sphinx & other build dependencies into the conda environment. We will continue to use pip for this, and it should be transparent, other than using the pip executable in the conda environment instead of the virtualenv.\r\n\r\nIt should also be noted that `miniconda` has a different install process from Python 2 and 3 -- also they recommend installing it from their bash scripts instead of pip. I hope that we will be able to use pip, as it will simplify our installation, and won't require an update to a bash script on version upgrades. We will have to see if we hit issues in testing. \r\n\r\nCleanup\r\n-------\r\n\r\nRead the Docs will manage conda environment deletion on the removal of a project or version.\r\n\r\nDocumentation\r\n-------------\r\n\r\nWe will need to add information about conda support to our documentation. We might want to add a topic guide around installing requirements, along with adding a specific reference for how to use & enable conda support.\r\n\r\nSponsorship\r\n------------\r\n\r\nThis work is being funded by [Clinical Graphics](https://www.clinicalgraphics.com/) -- many thanks for their support of Open Source."},"comment":{"url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/comments/171050516","html_url":"https://github.com/rtfd/readthedocs.org/issues/857#issuecomment-171050516","issue_url":"https://api.github.com/repos/rtfd/readthedocs.org/issues/857","id":171050516,"user":{"login":"ericholscher","id":25510,"avatar_url":"https://avatars.githubusercontent.com/u/25510?v=3","gravatar_id":"","url":"https://api.github.com/users/ericholscher","html_url":"https://github.com/ericholscher","followers_url":"https://api.github.com/users/ericholscher/followers","following_url":"https://api.github.com/users/ericholscher/following{/other_user}","gists_url":"https://api.github.com/users/ericholscher/gists{/gist_id}","starred_url":"https://api.github.com/users/ericholscher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericholscher/subscriptions","organizations_url":"https://api.github.com/users/ericholscher/orgs","repos_url":"https://api.github.com/users/ericholscher/repos","events_url":"https://api.github.com/users/ericholscher/events{/privacy}","received_events_url":"https://api.github.com/users/ericholscher/received_events","type":"User","site_admin":false},"created_at":"2016-01-12T20:51:06Z","updated_at":"2016-01-12T20:51:06Z","body":"We aren't running conda in an interactive session, so I'm not sure how we could \"call\" activate. If there are environment variables that should be supported, we could set them, but we're running these commands independently, so the variables set in the activate script wouldn't apply.\r\n\r\nThe code is here: https://github.com/rtfd/readthedocs.org/blob/master/readthedocs/doc_builder/python_environments.py#L163"}}