ido50 / morgan

PyPI Mirror for Restricted/Offline Environments
Apache License 2.0
105 stars 7 forks source link

windows files? #7

Open chaddupuis opened 1 year ago

chaddupuis commented 1 year ago

Hello,

First, thanks for the work on this - we are trying to get it going into a closed off PHI environment. I have it working from the linux side of things, but I was trying to both install and test the ability of windows machines to use the mirror as well (not sure if this is possible, but it seemed so).

I tried the following ini: [env.Windows] os_name = nt sys_platform = windows (also tried "win32") platform_machine = AMD64 (also tried "win_amd64") platform_system = Windows ... then all the same as linux python_version = 3.10, etc.

I then tried to pull down a package on linux (since I don't have a good way to test this from windows locally) using:

pip3 install pandas --platform win32 --only-binary=:all: --trusted-host 0.0.0.0 --target=./windows

I always get a no matching distribution could be found. Whereas pointing this to pypi: pip3 install pandas --platform win32 --only-binary=:all: --target=./windows works fine.

Any obvious things I am missing to get the windows side of this working?

ido50 commented 1 year ago

Hey there. First of all, it's preferable to execute morgan generate_env on the target environment (i.e. on your Windows machine) to generate the correct environment block .

Second of all, I haven't yet actually tried mirroring for Windows, I was waiting for someone to complain that it doesn't work :-) I'll give it a try tomorrow and see if I find the issue. I'll let you know.

Thanks for reporting.

bzbrosch commented 1 month ago

I have had the same issue, and did a fix. It is available in bzbrosch/morgan repo, and created a pull request. I would appreciate if you could test it, and confirm it works for you too.