1
0
mirror of https://github.com/facebook/proxygen.git synced 2025-08-05 19:55:47 +03:00

9 Commits

Author SHA1 Message Date
Zeyi (Rice) Fan
8939972728 CMake: remove Python search path configuration
Reviewed By: genevievehelsel

Differential Revision: D77164618

fbshipit-source-id: ee36919d63c672613a5ce375b280f55e00b37c2b
2025-06-30 13:26:04 -07:00
Zeyi (Rice) Fan
6c039a848e python: disable Python 3.9 temporarily
Reviewed By: genevievehelsel

Differential Revision: D37204497

fbshipit-source-id: e9ca9f36863e1b5753d23c9b7421d6e91a0f94ad
2022-06-16 04:56:07 -07:00
Xavier Deguillard
29be20c06c win_main: add search path for fb-python
Summary:
Python may also be found at these paths, let's thus make sure that getdeps
built Python binaries are searching for python.dll in these paths.

Reviewed By: ikriv

Differential Revision: D37043501

fbshipit-source-id: 3de396f64b59256c1ce31c3b3da6b49e3f1f8838
2022-06-09 18:04:54 -07:00
Shashank Chaudhry
72e642be7d Enable CLANGFORMAT
Reviewed By: zertosh

Differential Revision: D31753624

fbshipit-source-id: cebadddc83af19739a0ada00cb4bbfde0d640213
2021-10-19 14:35:29 -07:00
Zeyi (Rice) Fan
29244950fe return returncode correctly
Reviewed By: xavierd

Differential Revision: D23434438

fbshipit-source-id: 813f987cf62e72c0b6704b31e6e9168006735b6f
2020-08-31 16:08:49 -07:00
Zeyi (Rice) Fan
a72a5032ce avoid using relative path in fb_py_win_main
Summary:
After some experimenting, it is a little awkward if we want to specify a relative path based on the executable location. We'd need to add a bunch of path calculations to make it right, and I don't think the added complexity is really worth the effort.

As a result, let's just remove the use of relative path, and if we ever want to ship a copy of Python distribution, we can place it under the same directory as the binary.

Reviewed By: chadaustin

Differential Revision: D22394180

fbshipit-source-id: 86d27f6d16a03fe08826b5e5eafcef2a1c77997f
2020-07-06 15:39:05 -07:00
Zeyi (Rice) Fan
30193884fa make fb_py_win_main to dynamically find Python3.dll
Summary:
In EdenFS's latest Windows package. We are seeing DLL import errors coming from `asyncio` as it requires a system native module `_overlapped.pyd`.

The underlying cause is because when we build EdenFS CLI on Sandcastle, we are linking with Python 3.6.2. The Python36.dll shipped with the EdenFS package is also coming from that version.

However, on Windows laptop. We have Python 3.6.3. Since we are not shipping the Python system libraries with us. It uses the libraries installed in the system, and it attempts to import the `_overlapped.pyd` located at `C:\Pythone36\DLLs\`. This version is compiled against Python 3.6.3, which is incompatible with the Python36.dll we are using.

----

To resolve this, we need either ship an embedded copy of Python along with EdenFS, or teach EdenFS to use the Python distribution installed in the system. This commit tweaks the executable we prepend to the archive created with zipapp to locate `Python3.dll` dynamically. This allows us to use the Python installed in the system so we can avoid the version mismatch issue.

With this setup, we can also be shipping an embedded Python version along with EdenFS, and the Python loader can look for that path. This is demonstrated with the relative DLL loading `..\python`.

In theory, we can have a package structure like this:

```
.
├── python
│   ├── ....
│   └── python3.dll
└── bin
    ├── ...
    ├── edenfsctl.exe
    └── edenfs.exe
```

Reviewed By: xavierd

Differential Revision: D22325210

fbshipit-source-id: 96a3f9503e7865a5f9d95710ff13f019afcf04f1
2020-07-01 13:18:09 -07:00
Wez Furlong
ac9ed30d40 fb_py_win_main.c: fix File Not Found errors on windows
Summary:
This commit resolves an issue with our zipapp executables
on Windows that meant that the only reliable way to start them was
to use the fully path to the executable.

The root cause is that the __wargv array is produced by parsing the
process command line into an array, and if you ran `watchman-wait -h`
__wargv[0] would have `watchman-wait` rather than the fully qualified
path to the executable that the zipapp plumbing requires.

The fix is to ask the system for the fully qualified path and ensure that
that gets set as both argv[0] AND argv[1].

Reviewed By: xavierd

Differential Revision: D21190350

fbshipit-source-id: eeb95084592d30a028a93b2b03877f8cc6c72729
2020-04-29 14:40:52 -07:00
Adam Simpkins
833efc0ead getdeps: update FBPythonBinary.cmake to generate executable files on Windows
Summary:
On Windows, compile a small C executable to prepend to the zip file, to allow
the resulting executable files to be run directly on Windows, without needing
to explicitly invoke the Python interpreter to run the output file.

Reviewed By: wez

Differential Revision: D17733616

fbshipit-source-id: 989a93851412d0bbe1e7857aa9111db082f67a4c
2019-11-18 18:40:32 -08:00