forked from conda-forge/pywinpty-feedstock
-
Notifications
You must be signed in to change notification settings - Fork 0
PKG-11149 - Bumping pywinpty-feedstock to version 3.0.2 #16
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
Open
anaconda-recipe-editor
wants to merge
64
commits into
master
Choose a base branch
from
recipe-bumper_AnacondaRecipes_pywinpty-feedstock_3.0.2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+113
−14
Open
Changes from all commits
Commits
Show all changes
64 commits
Select commit
Hold shift + click to select a range
3503e43
PKG-11149 - Bumping pywinpty-feedstock to version 3.0.2
anaconda-recipe-editor 5131af6
update URLs
TS-ANC a8666aa
add version check
TS-ANC 1edaaeb
remove pip check
TS-ANC e600a35
try simplified build script
TS-ANC 0565003
test build correctness
TS-ANC 4f03fd3
restore build script
TS-ANC 8f5729a
add build script prefix
TS-ANC 2ea5a12
debugging
TS-ANC ae58b80
more debugging
TS-ANC 47becf1
try using maturin
TS-ANC 53c56ea
verbose output
TS-ANC 5d52bc4
Initiate build
TS-ANC 3f36028
try using pip wheel
TS-ANC 1f8ff8c
try to use existing winpty in build
TS-ANC 6e78ffb
restore previous state and try to use existing winpty
TS-ANC 0f14461
avoid silent build failure
TS-ANC fc5a396
try another approach
TS-ANC 4f23e25
another attempt
TS-ANC a014cd5
diagnose winpty for winpty-agent
TS-ANC d0211bc
try using custom cargo config
TS-ANC 3d5056e
bypass escape character issue
TS-ANC 434de2d
try alternative approach
TS-ANC cc18a53
try with Cargo override instead
TS-ANC fdc5034
try another approach
TS-ANC 8e0a638
another approach
TS-ANC b436700
patch out pywinpty's nuget requirement
TS-ANC 70ef88b
update winpty patch
TS-ANC f16144f
use native Win SDK for ConPTY functionality
TS-ANC fe0bf78
skip ConPTY backend altogether
TS-ANC 85fa7b2
disable ConPTY in winpty-rs
TS-ANC 988e806
skip conpty nuget
TS-ANC 9469855
enable conpty_local
TS-ANC 639a19e
comment out conpty feature
TS-ANC c0456cd
fix patcher
TS-ANC ec65b0b
add patcher debug prints
TS-ANC 9cd16cb
more debug printing
TS-ANC 9b19f62
verbose debug prints
TS-ANC 1f29783
try with a prebuilt binary
TS-ANC a968783
use prebuilt conpty binaries (vendored)
TS-ANC 1502f95
debugging prints
TS-ANC 5a7ec5c
change url
TS-ANC 9680360
more verbose printing
TS-ANC a5ee5bc
add powershell to build
TS-ANC 3bcecc8
use tar instead
TS-ANC f47ac46
more logging
TS-ANC 5e1e403
copy binaries to where build scripts looks for them
TS-ANC 005632c
use patching for winpty build
TS-ANC e3cf462
update patcher
TS-ANC 5723b3f
patch continuously
TS-ANC 381b2a5
vendor winpty-rs
TS-ANC ea855c9
add sha256 to winpty-rs
TS-ANC 4a59ea1
fix local winpty-rs path
TS-ANC 2bf6f09
update license path
TS-ANC 27d3da6
minor cleanup
TS-ANC 49b855c
enable winpty import
TS-ANC 27b82a7
enable upstream tests
TS-ANC 5e01a9d
add flaky test dependency
TS-ANC 958050e
disable conpty tests
TS-ANC 56cff2b
deselect test_read
TS-ANC 3517023
disable tests
TS-ANC 688e36a
cleanup
TS-ANC 4c338c8
skip patch
TS-ANC a66830d
clarify usage
TS-ANC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| @echo on | ||
|
|
||
| REM Build | ||
| cd pywinpty-src | ||
| %PYTHON% -m pip install . -vv --no-deps --no-build-isolation | ||
| if errorlevel 1 exit 1 | ||
|
|
||
| REM Generate license | ||
| cargo-bundle-licenses --format yaml --output "%SRC_DIR%\THIRDPARTY.yml" | ||
| if errorlevel 1 exit 1 | ||
|
|
||
| echo Build completed successfully |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| diff --git a/build.rs b/build.rs | ||
| index 41105ea..ef43987 100644 | ||
| --- a/build.rs | ||
| +++ b/build.rs | ||
| @@ -177,15 +177,9 @@ fn main() { | ||
| // let kernel32 = kernel32_res.unwrap(); | ||
|
|
||
| // let conpty = unsafe { GetProcAddress(kernel32, "CreatePseudoConsole".into_pcstr()) }; | ||
| - match major_version >= 10 && build_version >= 2004 { | ||
| - true => { | ||
| - conpty_enabled = "1"; | ||
| - println!("cargo:rustc-cfg=feature=\"conpty\"") | ||
| - } | ||
| - false => { | ||
| - conpty_enabled = "0"; | ||
| - } | ||
| - } | ||
| + | ||
| + // Skip ConPTY - use WinPTY backend only | ||
| + conpty_enabled = "0"; | ||
|
|
||
| println!("ConPTY enabled: {}", conpty_enabled); | ||
| println!("Output path: {}", get_output_path().to_str().unwrap()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| diff --git a/winpty/tests/test_pty.py b/winpty/tests/test_pty.py | ||
| index 52fb4c1..25ca478 100644 | ||
| --- a/winpty/tests/test_pty.py | ||
| +++ b/winpty/tests/test_pty.py | ||
| @@ -38,7 +38,7 @@ conpty_provider = pty_factory(Backend.ConPTY) | ||
| winpty_provider = pty_factory(Backend.WinPTY) | ||
|
|
||
|
|
||
| -@pytest.fixture(scope='module', params=['WinPTY', 'ConPTY']) | ||
| +@pytest.fixture(scope='module', params=['WinPTY']) | ||
| def pty_fixture(request): | ||
| backend = request.param | ||
| if os.environ.get('CI_RUNNING', None) == '1': | ||
| diff --git a/winpty/tests/test_ptyprocess.py b/winpty/tests/test_ptyprocess.py | ||
| index 1d7662d..aad70ed 100644 | ||
| --- a/winpty/tests/test_ptyprocess.py | ||
| +++ b/winpty/tests/test_ptyprocess.py | ||
| @@ -19,7 +19,7 @@ from winpty.ptyprocess import PtyProcess, which | ||
|
|
||
|
|
||
|
|
||
| -@pytest.fixture(scope='module', params=['WinPTY', 'ConPTY']) | ||
| +@pytest.fixture(scope='module', params=['WinPTY']) | ||
| def pty_fixture(request): | ||
| backend = request.param | ||
| if os.environ.get('CI_RUNNING', None) == '1': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| diff --git a/build.rs b/build.rs | ||
| index 0e509b5..daf1541 100644 | ||
| --- a/build.rs | ||
| +++ b/build.rs | ||
| @@ -27,7 +27,11 @@ fn main() { | ||
| let nuget_found = command_ok(nuget.arg("help")); | ||
|
|
||
| if !nuget_found { | ||
| - panic!("NuGet is required to build pywinpty"); | ||
| + // Skip NuGet - use conda-provided winpty | ||
| + println!("cargo:warning=Skipping NuGet check, using system-provided winpty"); | ||
| + println!("cargo:rustc-link-search=native={}", env::var("LIBRARY_LIB").unwrap_or_default()); | ||
| + println!("cargo:rustc-link-lib=winpty"); | ||
| + return; | ||
| } | ||
|
|
||
| if command_ok( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| diff --git a/Cargo.toml b/Cargo.toml | ||
| index 53c075f..3022765 100644 | ||
| --- a/Cargo.toml | ||
| +++ b/Cargo.toml | ||
| @@ -17,7 +17,8 @@ crate-type = ["cdylib"] | ||
| glob = "0.3.2" | ||
|
|
||
| [dependencies] | ||
| -winpty-rs = "1.0.4" | ||
| +# We'll use a local version of winpty-rs (vendored) | ||
| +winpty-rs = { path = "../winpty-rs-src" } | ||
|
|
||
| [dependencies.pyo3] | ||
| version = "0.26.0" |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is there a reason as to not extract it as a seperate package?
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.
The winpty-rs code is statically linked into pywinpty (.pyd), no dynamic library. Only dynamically linked are the winpty/conpty backends (although conpty backend not supported for this release).
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.
Does pywinpty 3.0.2 fail without adding winpty-rs as a local (vendored) dependency? Or is it because you need to patch
winpty-rsnot to use conpty? Is it possible to patch only https://github.com/andfoy/pywinpty/blob/v3.0.2/build.rs#L20-L47?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.
winpty-rs needs to be patched.
Patching needs to be done on both levels (pywindpty, and winpty-rs), as each will attempts to use NuGet to fetch ConPTY backend. In previous version this was not an issue, as only WinPTY backend was supported (ConPTY is the one with NuGet).
For this release, ConPTY backend has disabled.