-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
Add support for conda envs on windows #52
Conversation
Thank you for the pull request! The code looks good. What is not clear to me though is if you want to use conda's base interpreter or the one in the currently activated environment, and if you want to support building for multiple python versions (and if so, do we need to filter duplicates?). For comparison, here's what
On a side note, I've discovered The CI failure is because of clippy. You can run clippy locally with
Note that you currently have to use clippy on nightly because clippy on stable has some false positives. |
Hey @konstin, Thanks for the feedback.
For my use case, using the interpreter in the active env is sufficient, but I can see the value in building for all envs. For instance, you can easily create a few temp envs in order to build wheels for all the Python versions you need. I could see this really being useful for someone that maintains a package on pypi (which I do not). I don't think that using the base interpreter is as useful. For instance, I install miniconda only to build envs. I never actually use the base interpreter.
Yes, this is an oversight, I'll fix it when I get a chance along with the clippy issues. |
Hey @konstin, I addressed your previous comments, please take another look when you get a chance. Let me know how you feel about building for the active env vs all (I favor all, but obviously your call)? |
I finally got to install conda on windows and play around with it. It'd like to have the output of
I like the current solution! One thing we need is an automated way of testing this, either alongside the other tests or as a standalone script. it should create at least 3 environments, with two having the same version and one a different version, and then check the two versions are picked up correctly, and ideally jsut do nothing if conda is no installed. |
Hey @konstin, I updated to use CI was the next step, just wanted to get the functionality in place before I start messing with that :). Do you want to merge this first or should I keep working on CI on this branch? |
Thank you, this is one great doc comment! The Ci for windows, appveyor, only builds the code and creates binaries for releases. The integration tests always failed for mysterious reasons I couldn't reproduce, so I had to deactivate them. That's why CI for windows isn't important as long as the tests can be run locally.
I'd like to merge after we have a test. |
Oh, and the current travis ci failure seems to be because clippy is broken on nightly rust, which should be fixed by a new rust nightly in the next days. |
Ok, sounds good, thanks very much. |
Hey @konstin, I'm a little stuck on this... My plan is to create a few I think I know how to download Also, which test should I update or replicate for the conda testing? Thanks |
I'd recommend solving this without appveyor first. For that you can assume that conda is installed and in path. Then just run conda commands as you've said, check that For the existing interpreters, afaik you can override
Once you have a script, you can try to replicate tests/test_integration.rs if you want. |
As always, thanks @konstin. |
Sorry for the lack of activity on this, I plan to get back to it soon. |
@konstin, I'm just testing but AppVeyor did not trigger even though I made a change to |
I've reactivated appveyor; It should build on the next push. The code looks good, I'll try testing it tomorrow. |
Ok, sounds good, thanks. Still a WIP but just wanted to how it fairs with CI. |
The tests look good, but need one addition: We need to check the selected interpreters are actually the conda environments, e.g. by checking that I've tried to get the windows tests working on appveyor in #67, but had only moderate success. I think the best is to merge once we have the additional and leave figuring out appveyor for later. |
Thank you! |
Hey @konstin,
I have support for building with
conda
on windows working. I just tested this locally by runningpyo3-pack build
for theget_fourtytwo
example.I'm assuming that supporting
conda
on other systems would be pretty much the same but I'm not able to test this.I'll take a look at updating CI to test this in another PR.