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
Fix the Windows build #7
Comments
FYI @PiotrZierhoffer -- I could use some help here |
I tried to run it locally, and it takes a very long time to finish. I believe it's a plain timeout on lack of output, but I don't know how to force travis to accept this |
@xobs - This is one of the issues I could use Window users help with... |
|
I think the settings we want are for conda to be as self contained as possible. I think this means we want;
|
The issue seems to be some interaction between |
There seems to be some issue with
|
if you are doing something like It appears to work the same for the mingw64 git bash prompt, but I would certainly recommend WSL, instead. you could also use |
I was running the commands using the console which comes with git (git-bash I think?) |
does |
I tried running
|
So at least |
It looks like I have to give
Looks like it might be working... |
It is also unclear to me what I need to do in the Makefile here;
|
I'm confused. Is the issue that the Conda installer is popping up a prompt that is never getting acknowledged due to it running in CI? I thought Conda generally used You might try looking into Powershell, if you bump up against the limitations of what |
I would certainly encourage the use of batch files (or powershell) to make things more clear - and more importantly, to be able to use quotes for potentially embedded space paths as well as handle multiple Windows commands more gracefully. for the example, above:
there are several issues. for one, Windows expects backslashes I'd consider putting the command(s) you want to call from MINGW64 or WSL in a batch file:
to start a new process from DOS in a different window, it would be called like this:
or like this from MINGW64 or WSL to spawn a new process (no output) then exit:
or like this to run the batch file in the current process, send everything to the screen, and return
that specific Miniconda line, if you really wanted to keep it with no batch files:
the should instead be something like:
Note that probably the only purpose of
Note that simple dos commands can be used like this: or for your
does this help? edit: a couple of other thoughts: you can call WSL from DOS like this: I think all the confusion that came about is the fact that |
That is what I was trying to debug but I only have limited windows computer access.
The goal here is to have conda installed through make dependencies on Windows in a similar manner to Linux + Mac OS X.
Is powershell always available in Windows? |
The goal is to have all this run as part of the Makefile. The Makefile already disallows spaces in the install path for deliberate reason :-)
Actually the point of |
Running cmd.exe inside MINGW64 just seems to start
|
It very much seems like arguments are not getting passed from the MINGW64 shell to the windows programs? |
Well, I'm further along now - the makefile runs to the end but for some reason the downloaded Miniconda3 file is always newer than the python.exe file
The suggestion of
|
I'm not familiar with this build process, but what exactly do you need to do? |
I think many of your problems will go away if you decide to use Powershell, which is always available. Additionally, you can prototype some things by installing Powershell Core for Linux. For example, the command to create a new file (if that's what you're using New-Item -ItemType File newfile.txt Or if you're using (Get-ChildItem newfile.txt).LastWriteTime = Get-Date Additionally, |
@gojimmypi - Make depends on the datetime of the files, hence I need to update the datetime of a file after updating it. On Linux you use the touch command to do that. |
Here's a powershell function that reimplements function touch($fn) {
if (Test-Path $fn) {
(Get-ChildItem $fn).LastWriteTime = Get-Date
} else {
New-Item -Path $fn -ItemType File
}
} |
curious, as mingw32 there does not seem to be a windows touch command, but in ming32, there is. is the makefile running in Windows? |
@xobs - How do I replace touch.cmd here -> https://github.com/SymbiFlow/conda-env-make/blob/1062560d3cf0c01244715991cf1c1e83a742ee99/touch.cmd with the powershell equivalent?
|
@xobs - I came up with https://github.com/mithro/conda-env-make/blob/master/touch.ps1 but I need to call it with
|
@mithro Are you calling param (
[string]$filename
)
if (Test-Path $filename) {
(Get-ChildItem $filename).LastWriteTime = Get-Date
} else {
New-Item -Path $filename -ItemType File | Out-Null
} If that doesn't work, you may need to rename |
No, it does seem as though Hmm... |
you have ming32 installed? how about: |
Can you avoid using |
btw - powershell is invoked with |
@gojimmypi - I'm trying to do this only with stuff installed by default in Windows. |
Once conda is installed, I have the full power of Python to do anything, until then I'm trying to have no dependencies. |
how about |
@gojimmypi - @xobs suggested that. I tried putting it into a |
I have resorted to just calling it with powershell in-front of it.... |
If you set the shell to Let me take a look at it and see what I get... |
call it with |
@xobs - You mean in the |
Current version which seems to mostly work is at https://github.com/mithro/conda-env-make/blob/master/conda.mk
|
OS detection stuff is at https://github.com/mithro/conda-env-make/blob/master/os.mk
|
if you have this in
call it like this:
|
I can confirm that you need to change As of right now, it currently seems to work:
I have a few questions:
|
@xobs - Did you change the Makefile to use
|
I'm just testing the latest solution.
So I think that your current approach -- replace calls to commands with calls to shims that explicitly call |
It seems to work for me, and with that PR it no longer creates registry entries. However it still creates Start Menu icons, and it shouldn't do that. |
It looks like it's been an issue for at least two years: ContinuumIO/anaconda-issues#9729 |
https://travis-ci.com/github/mithro/conda-env-make/jobs/350275256
The text was updated successfully, but these errors were encountered: