-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Windows support #5067
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
Windows support #5067
Conversation
|
I'll come back to this a little bit tomorrow. Glad it runs but now it's just stuck at loading the Jinja2 templates nothing I do gets it to run beyond that point. |
Thank you for your commitment, but unfortunately, I have to inform you MS-Windows is not in the scope of this project The SearXNG project is based on the concepts of open source and user privacy. Microsoft's recent and past history has been characterized by its efforts to combat these very concepts.
But even if we ignore these aspects, once we support MS Windows, we face several problems that do not exist in the Linux/Unix world, including porting the developer environment and quality assurance. We might consider taking on these efforts (some of which are already evident in this PR), but we would only encourage people to stick with their decision to use MS Windows ...
Let's be clear: MS Windows is anything but a server operating system. Ultimately, however, it is everyone's own decision as to which operating system they choose... and even for MS Windows, a solution is available with the Docker image. |
| mp_fork = multiprocessing.get_context("fork") | ||
|
|
||
| # XXX: WINDOWS CAN'T FORK!!! | ||
|
|
||
|
|
||
| mp_fork = multiprocessing.get_context("fork" if sys.platform != "win32" else "spawn") |
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.
Here we can see what I mean by:
But even if we ignore these aspects, once we support MS Windows, we face several problems that do not exist in the Linux/Unix world ..
and here's a paper listing the problems with fork() and suggesting it should be removed from other OSs.
https://www.microsoft.com/en-us/research/uploads/prod/2019/04/fork-hotos19.pdf
Needless to point out this Paper is from MS and these problems only exist on Windows because MS (no longer) implements fork(). And MS's logical suggestion is that all other operating systems should also abandon fork... just like any other POSIX standard that MS cannot or will not implement.
What does this PR do?
This pull request will add support for windows operating systems which has been one of searxing's weakspots for as long as I can remember. I desire to hopefully put an end to this since I am one of the main maintainers behind winloop which has been used to overcome some os barriers that uvloop has.
Why is this change important?
This change will allow windows users to host searxng servers of their own locally my goal is to hopefully refactor searx a bit while I go about adding support to windows. I'll be editing things if I notice anything that my pyright extension doesn't like.
How to test this PR locally?
To get caught up with my changes here's what you can do.
Step 1. Get a windows operating system of your choice for me I am using windows 10 and I refuse to move to 11 even after EOL.
Step 2. I'm using
uvfor the sake of simplicity and saving as much diskspace as I can since I make & maintain multiple libraries including contributing to many different parts of aiohttp to name a few of the places I've been.Step 3. activate the VM
Step 4. Install everything needed to run the server.
Step 5. To run, performing the following will get you to where I am currently stuck which is sqlite3 issues (I am using 3.10.18 for backwards compatability so that I can attempt to support all versions of python that still get security updates)
Author's checklist
sys.platform != 'win32' or sys.platform == 'win32'check.Related issues
Feel free to list the issues that we can close and I will edit and put them all in here, sorry If I'm a bit on the lazy side. I've had a long day.