-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
python3Packages.pyside6-qtads: init at 4.3.1.1 #370105
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
f4b669e
python3Packages.cmake-build-extension: init at 0.6.1
spencerpogo 5c38860
python3Packages.pyside6-qtads: init at 4.3.1.1
spencerpogo b60b02b
python313Packages.cmake-build-extension: refactor
fabaff 3216030
python313Packages.pyside6-qtads: 4.3.1.1 -> 4.3.1.4
fabaff 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
48 changes: 48 additions & 0 deletions
48
pkgs/development/python-modules/cmake-build-extension/default.nix
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,48 @@ | ||
| { | ||
| lib, | ||
| buildPythonPackage, | ||
| cmake, | ||
| fetchFromGitHub, | ||
| gitpython, | ||
| ninja, | ||
| setuptools, | ||
| setuptools-scm, | ||
| }: | ||
|
|
||
| buildPythonPackage rec { | ||
| pname = "cmake-build-extension"; | ||
| version = "0.6.1"; | ||
| pyproject = true; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "diegoferigo"; | ||
| repo = "cmake-build-extension"; | ||
| tag = "v${version}"; | ||
| hash = "sha256-taAwxa7Sv+xc8xJRnNM6V7WPcL+TWZOkngwuqjAslzc="; | ||
| }; | ||
|
|
||
| build-system = [ | ||
| setuptools | ||
| setuptools-scm | ||
| ]; | ||
|
|
||
| dependencies = [ | ||
| cmake | ||
| ninja | ||
| gitpython | ||
| ]; | ||
|
|
||
| dontUseCmakeConfigure = true; | ||
|
|
||
| pythonImportsCheck = [ "cmake_build_extension" ]; | ||
|
|
||
| doPythonRuntimeDepsCheck = false; | ||
|
|
||
| meta = { | ||
| description = "Setuptools extension to build and package CMake projects"; | ||
| homepage = "https://github.com/diegoferigo/cmake-build-extension"; | ||
| changelog = "https://github.com/diegoferigo/cmake-build-extension/releases/tag/v${version}"; | ||
| license = lib.licenses.mit; | ||
| maintainers = with lib.maintainers; [ scoder12 ]; | ||
| }; | ||
| } |
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,80 @@ | ||
| { | ||
| lib, | ||
| buildPythonPackage, | ||
| cmake-build-extension, | ||
| fetchFromGitHub, | ||
| pythonRelaxDepsHook, | ||
| pyside6, | ||
| qt6, | ||
| setuptools, | ||
| setuptools-scm, | ||
| shiboken6, | ||
| }: | ||
|
|
||
| buildPythonPackage rec { | ||
| pname = "pyside6-qtads"; | ||
| version = "4.3.1.4"; | ||
| pyproject = true; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "mborgerson"; | ||
| repo = "pyside6_qtads"; | ||
| tag = "v${version}"; | ||
| hash = "sha256-02YUeD9PfcaYkvz9JX5FucsbG9Idk7OH24U+RXXEmvo="; | ||
| fetchSubmodules = true; | ||
| }; | ||
|
|
||
| # bypass the broken parts of their bespoke python script cmake plugin | ||
| patches = [ ./find-nix-deps.patch ]; | ||
|
|
||
| postPatch = '' | ||
| substituteInPlace setup.py \ | ||
| --replace-fail @shiboken6@ ${shiboken6} \ | ||
| --replace-fail @pyside6@ ${pyside6} | ||
|
|
||
| # can't use pythonRelaxDepsHook because it runs postBuild but the dependency check | ||
| # happens during build. | ||
| # -Essentials is a smaller version of PySide6, but the name mismatch breaks build | ||
| # _generator is also a virtual package with the same issue | ||
| substituteInPlace pyproject.toml \ | ||
| --replace-warn 'PySide6-Essentials' "" \ | ||
| --replace-warn 'shiboken6_generator' "" \ | ||
| --replace-quiet '"",' "" \ | ||
| --replace-quiet '""' "" | ||
| ''; | ||
|
|
||
| buildInputs = [ | ||
| qt6.qtbase | ||
| qt6.qtquick3d | ||
| ]; | ||
|
|
||
| build-system = [ | ||
| cmake-build-extension | ||
| setuptools | ||
| setuptools-scm | ||
| ]; | ||
|
|
||
| dependencies = [ | ||
| pyside6 | ||
| shiboken6 | ||
| ]; | ||
|
|
||
| nativeBuildInputs = [ pythonRelaxDepsHook ]; | ||
|
|
||
| # cmake-build-extension will configure | ||
| dontUseCmakeConfigure = true; | ||
|
|
||
| dontWrapQtApps = true; | ||
| # runtime deps check fails on the pyside6-essentials virtual package | ||
| dontCheckRuntimeDeps = true; | ||
|
|
||
| pythonImportsCheck = [ "PySide6QtAds" ]; | ||
|
|
||
| meta = { | ||
| description = "Python bindings to Qt Advanced Docking System for PySide6"; | ||
| homepage = "https://github.com/mborgerson/pyside6_qtads"; | ||
| changelog = "https://github.com/mborgerson/pyside6_qtads/releases/tag/"; | ||
| license = lib.licenses.mit; | ||
| maintainers = with lib.maintainers; [ scoder12 ]; | ||
| }; | ||
| } | ||
43 changes: 43 additions & 0 deletions
43
pkgs/development/python-modules/pyside6-qtads/find-nix-deps.patch
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,43 @@ | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index 0c0568a..f12d50e 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -105,15 +105,17 @@ macro(pyside_config option output_var) | ||
| endmacro() | ||
|
|
||
| # Query for the shiboken generator path, Python path, include paths and linker flags. | ||
| +find_package(Shiboken6 REQUIRED) | ||
| +find_package(PySide6 REQUIRED) | ||
| pyside_config(--shiboken-module-path shiboken_module_path) | ||
| -pyside_config(--shiboken-generator-path shiboken_generator_path) | ||
| -pyside_config(--pyside-path pyside_path) | ||
| -pyside_config(--pyside-include-path pyside_include_dir 1) | ||
| +set(shiboken_generator_path "" CACHE PATH "Path where shiboken6 executable can be found") | ||
| +set(pyside_path "" CACHE PATH "pyside share path, where typesystems dir can be found") | ||
| +get_target_property(pyside_include_dir PySide6::pyside6 INTERFACE_INCLUDE_DIRECTORIES) | ||
| pyside_config(--python-include-path python_include_dir) | ||
| -pyside_config(--shiboken-generator-include-path shiboken_include_dir 1) | ||
| -pyside_config(--shiboken-module-shared-libraries-cmake shiboken_shared_libraries 0) | ||
| +get_target_property(shiboken_include_dir Shiboken6::libshiboken INTERFACE_INCLUDE_DIRECTORIES) | ||
| +get_target_property(shiboken_shared_libraries Shiboken6::libshiboken IMPORTED_LOCATION_RELEASE) | ||
| pyside_config(--python-link-flags-cmake python_linking_data 0) | ||
| -pyside_config(--pyside-shared-libraries-cmake pyside_shared_libraries 0) | ||
| +get_target_property(pyside_shared_libraries PySide6::pyside6 IMPORTED_LOCATION_RELEASE) | ||
|
|
||
| set(shiboken_path "${shiboken_generator_path}/shiboken6${CMAKE_EXECUTABLE_SUFFIX}") | ||
| if(NOT EXISTS ${shiboken_path}) | ||
| diff --git a/setup.py b/setup.py | ||
| index 802821b..f522818 100644 | ||
| --- a/setup.py | ||
| +++ b/setup.py | ||
| @@ -88,7 +88,9 @@ setuptools.setup( | ||
| "-DBUILD_STATIC:BOOL=ON", | ||
| "-DADS_VERSION=4.3.0", | ||
| f"-DPython3_ROOT_DIR={Path(sys.prefix)}", | ||
| - f"-DPython_EXECUTABLE={Path(sys.executable)}" | ||
| + f"-DPython_EXECUTABLE={Path(sys.executable)}", | ||
| + "-Dshiboken_generator_path=@shiboken6@/bin", | ||
| + "-Dpyside_path=@pyside6@/share/PySide6" | ||
| ], | ||
| py_limited_api=True | ||
| ), |
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
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.
add changelog