Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Convert TkAgg utilities to pybind11#26992

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
oscargus merged 2 commits intomatplotlib:mainfromQuLogic:tk-pybind11
Nov 20, 2023

Conversation

QuLogic
Copy link
Member

PR summary

Another step towards finishing#23846. Once again, this depends on the Meson port.

I moved the array handling parts into pybind11 code instead of Python, which seemed to fix some kind of reference counting bug across the callback boundaries.

PR checklist

@oscargus
Copy link
Member

Blitting on Windows seems to have broken (which you have/will realize).

@ksunden
Copy link
Member

Hmmm... that test has been flaky at times, but failing 4 times in a pr related to tk is suspicious

@QuLogic
Copy link
MemberAuthor

Ah, that's because that test is using the internal TkAgg API, which I simplified using the pybind11 array API, but I missed the test and need to update it.

@QuLogicQuLogicforce-pushed thetk-pybind11 branch 2 times, most recently from0889b76 to199104dCompareOctober 4, 2023 21:19
@QuLogicQuLogic marked this pull request as ready for reviewOctober 4, 2023 21:22
@QuLogicQuLogicforce-pushed thetk-pybind11 branch 4 times, most recently fromf05289a to891989bCompareOctober 11, 2023 08:00
@story645
Copy link
Member

While making changes here, would it be possible to changeWM_DPICHANGED toWM_USERCHANGED since meson is always complaining about it?

@QuLogic
Copy link
MemberAuthor

I don't see any warnings about that; it wouldn't have anything to do with Meson anyway.

@story645
Copy link
Member

story645 commentedOct 12, 2023
edited
Loading

I don't see any warnings about that; it wouldn't have anything to do with Meson anyway.

I haven't been able to build in weeks, and I'm getting:

meson traceback
(mpl-dev) C:\Users\story\Projects\matplotlib>python -m pip install --no-build-isolation --config-settings=editable-verbose=true --editable .Obtaining file:///C:/Users/story/Projects/matplotlib  Checking if build backend supports build_editable ... done  Preparing editable metadata (pyproject.toml) ... error  error: subprocess-exited-with-error  × Preparing editable metadata (pyproject.toml) did not run successfully.  │ exit code: 1  ╰─> [88 lines of output]+ meson setup--reconfigure C:\Users\story\Projects\matplotlib C:\Users\story\Projects\matplotlib\build\cp311 -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\story\Projects\matplotlib\build\cp311\meson-python-native-file.ini      Cleaning...0 files.      The Meson build system      Version:1.2.2      Sourcedir: C:\Users\story\Projects\matplotlib      Builddir: C:\Users\story\Projects\matplotlib\build\cp311      Buildtype: native build      Project name: matplotlib      Project version:3.9.0.dev0      C compilerfor the host machine: cc (gcc7.2.0"cc (Rev1, Built by MSYS2 project) 7.2.0")      C linkerfor the host machine: cc ld.bfd2.29.1      C++ compilerfor the host machine: c++ (gcc7.2.0"c++ (Rev1, Built by MSYS2 project) 7.2.0")      C++ linkerfor the host machine: c++ ld.bfd2.29.1      Host machine cpu family: x86_64      Host machine cpu: x86_64      Program python found: YES (C:\Users\story\miniconda3\envs\mpl-dev\python.exe)      Dependency pybind11 found:YES2.11.1 (cached)      Executing subproject freetype-2.6.1      freetype-2.6.1| Project name: freetype2      freetype-2.6.1| Project version:2.6.1      freetype-2.6.1| C compilerfor the host machine: cc (gcc7.2.0"cc (Rev1, Built by MSYS2 project) 7.2.0")      freetype-2.6.1| C linkerfor the host machine: cc ld.bfd2.29.1      freetype-2.6.1| Configuring ftconfig.h using configuration      freetype-2.6.1| Configuring ftoption.h using configuration      freetype-2.6.1| Build targetsin project:3      freetype-2.6.1| Subproject freetype-2.6.1 finished.      Executing subproject qhull      qhull| Project name: qhull      qhull| Project version:8.0.2      qhull| C compilerfor the host machine: cc (gcc7.2.0"cc (Rev1, Built by MSYS2 project) 7.2.0")      qhull| C linkerfor the host machine: cc ld.bfd2.29.1      qhull| Build targetsin project:4      qhull| Subproject qhull finished.      Library dl found:NO      Library comctl32 found:YES      Library ole32 found:YES      Library psapi found:YES      Library shell32 found:YES      Library user32 found:YES      Configuring _version.py using configuration      Program C:/Users/story/Projects/matplotlib/tools/generate_matplotlibrc.py found: YES (python C:/Users/story/Projects/matplotlib/tools/generate_matplotlibrc.py)      Build targetsin project:14      matplotlib3.9.0.dev0        Subprojects          freetype-2.6.1:YES          qhull         :YES        User defined options          Native files  : C:\Users\story\Projects\matplotlib\build\cp311\meson-python-native-file.ini          buildtype     : release          b_ndebug      :if-release          b_vscrt       : md      Found ninja.EXE-1.11.1 at C:\Users\story\miniconda3\envs\mpl-dev\Library\bin\ninja.EXE+ mesoncompile      [1/7] Compiling C++object src/_tkagg.cp311-win_amd64.pyd.p/_tkagg.cpp.objFAILED: src/_tkagg.cp311-win_amd64.pyd.p/_tkagg.cpp.obj"c++""-Isrc\_tkagg.cp311-win_amd64.pyd.p""-Isrc""-I..\..\src""-I..\..\..\..\miniconda3\envs\mpl-dev\Lib\site-packages\numpy\core\include""-I..\..\extern\agg24-svn\include""-IC:\Users\story\miniconda3\envs\mpl-dev\Include""-fvisibility=hidden""-fvisibility-inlines-hidden""-flto=8""-fdiagnostics-color=always""-DNDEBUG""-D_FILE_OFFSET_BITS=64""-Wall""-Winvalid-pch""-std=c++17""-O3""-DMS_WIN64=""-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION""-D__STDC_FORMAT_MACROS=1""-DPY_ARRAY_UNIQUE_SYMBOL=MPL__tkagg_ARRAY_API"-MD-MQ src/_tkagg.cp311-win_amd64.pyd.p/_tkagg.cpp.obj-MF"src\_tkagg.cp311-win_amd64.pyd.p\_tkagg.cpp.obj.d"-o src/_tkagg.cp311-win_amd64.pyd.p/_tkagg.cpp.obj"-c" ../../src/_tkagg.cpp      ../../src/_tkagg.cpp: In function'LRESULT DpiSubclassProc(HWND, UINT, WPARAM, LPARAM, UINT_PTR, DWORD_PTR)':      ../../src/_tkagg.cpp:133:10: error:'WM_DPICHANGED' wasnot declaredin this scope           caseWM_DPICHANGED:^~~~~~~~~~~~~      ../../src/_tkagg.cpp:133:10: note: suggested alternative:'WM_USERCHANGED'           caseWM_DPICHANGED:^~~~~~~~~~~~~WM_USERCHANGED      [2/7] Compiling Cobject src/_c_internal_utils.cp311-win_amd64.pyd.p/_c_internal_utils.c.obj      [3/7] Linking target src/_ttconv.cp311-win_amd64.pyd      [4/7] Linking target src/_tri.cp311-win_amd64.pyd      [5/7] Linking target src/_image.cp311-win_amd64.pyd      ninja: build stopped: subcommand failed.INFO: autodetecting backendas ninjaINFO: calculating backend command to run: C:\Users\story\miniconda3\envs\mpl-dev\Library\bin\ninja.EXE      [end of output]  note: This error originates from a subprocess, and is likely not a problem with pip.error:metadata-generation-failed× Encountered error while generating package metadata.╰─> See above for output.note:This is an issue with the package mentioned above, not pip.hint:See above for details.

Though granted when I fix that error, I get something like_SetProcessDPIAware() not found, so maybe it's just my SDK version is too new (been trying combinations of many things)

@QuLogic
Copy link
MemberAuthor

      C compiler for the host machine: cc (gcc 7.2.0 "cc (Rev1, Built by MSYS2 project) 7.2.0")

Ah, do you really intend to use MSYS2 over MSVC? Since you were talking about SDKs, I think you've been intending to use MSVC and never updated MSYS2. You should probably updatemingw-w64-x86_64-headers if you want to keep using MSYS2, orforce the use of MSVC, or remove MSYS2 if you don't need it.

@story645
Copy link
Member

Ah, do you really intend to use MSYS2 over MSVC?

No, but I have it installed for gitbash 🤦‍♀️ will follow those instructions, thanks!

@QuLogic
Copy link
MemberAuthor

Git logs say you would need v6 of the headers, which are about 5 years old now, so probably should update your msys2 in any case.

story645 reacted with thumbs up emoji

@oscargusoscargus merged commitbfff33b intomatplotlib:mainNov 20, 2023
@QuLogicQuLogic deleted the tk-pybind11 branchNovember 21, 2023 06:31
@QuLogicQuLogic mentioned this pull requestNov 21, 2023
1 task
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ianthomas23ianthomas23ianthomas23 approved these changes

@oscargusoscargusoscargus approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
v3.9.0
Development

Successfully merging this pull request may close these issues.

5 participants
@QuLogic@oscargus@ksunden@story645@ianthomas23

[8]ページ先頭

©2009-2025 Movatter.jp