Skip to content
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

Add pyside2ads and qtadvanceddocking recipe #19017

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
f7e8aca
Add qtadvanceddocking and pyside2ads
n-elie Mar 2, 2022
9e682b3
Update pyside2ads recipe
n-elie May 10, 2022
e9aef04
Fix missing line return in qtadvanceddocking build script
n-elie May 10, 2022
b25d8cb
Add qtmolecularnetwork and pyside2mn
n-elie May 10, 2022
5cf4fb0
Merge qtmolecularnetwork and pyside2mn
n-elie May 10, 2022
c2d82b8
Add forceatlas2, libmetgem, pyemf and metgem
n-elie May 10, 2022
7589f65
Update checksums
n-elie May 18, 2022
79e5de2
Merge branch 'main' of github.com:metgem/staged-recipes into metgem
n-elie May 18, 2022
a1ce956
Merge branch 'conda-forge:main' into metgem
n-elie May 18, 2022
d0d02e0
Merge branch 'metgem' of github.com:metgem/staged-recipes into metgem
n-elie May 18, 2022
35564e9
Update metgem version
n-elie May 18, 2022
a2d8985
Clean up recipes
n-elie May 18, 2022
081cf51
Make changes suggested by linter
n-elie May 18, 2022
b0dd6fe
Make changes suggested by linter
n-elie May 18, 2022
45a360d
Add mesa to qtadvanceddocking
n-elie May 18, 2022
dac230e
Complete build env for pyside2ads
n-elie May 18, 2022
d7938b4
Fix metgem recipe
n-elie May 18, 2022
e0f243d
Update metgem and pyside2ads recipes
n-elie May 19, 2022
021467d
Add pyside2ads recipe
n-elie May 20, 2022
6ca29c9
Add qtadvanceddocking
n-elie May 20, 2022
867ba26
Fix license for qtadvanceddocking
n-elie May 20, 2022
6522fc8
Add missing patch
n-elie May 20, 2022
ece3d08
Fix build scripts
n-elie May 20, 2022
3be24a3
try missing_dso_whitelist
n-elie May 20, 2022
a8f7b3e
put missing_dso_whitelist in build section
n-elie May 20, 2022
2b73a74
Try to fix build on Linux and Windows
n-elie May 23, 2022
5e73ce6
Try to fix build
n-elie May 23, 2022
9a3a286
Try with qt-main
n-elie May 23, 2022
34ce29f
Fix version of pyside
n-elie May 23, 2022
cbb26b1
Update pyside2ads recipe
n-elie Jun 21, 2022
b05d85b
Another attempt
n-elie Jun 24, 2022
762e0bd
Fix for NMake build
n-elie Jun 27, 2022
b6ec508
Merge branch 'pysideads' of github.com:metgem/staged-recipes into pys…
n-elie Jun 27, 2022
4f8b23f
Fix for NMake build (2)
n-elie Jun 27, 2022
efd8f5e
Merge branch 'conda-forge:main' into pysideads
n-elie Jun 27, 2022
125f004
Fix build on Linux
n-elie Jun 28, 2022
16e233d
Fix build on Windows
n-elie Jun 28, 2022
8cf2fdb
Fix recipes based on review
n-elie Jul 4, 2022
1507ae2
Fix build on Windows and Linux
n-elie Jul 5, 2022
46bebd4
Add libcxx to build requirements for pyside2ads
n-elie Jul 5, 2022
42e0f30
Add tests for headers and cmake config
n-elie Jul 23, 2022
9088f24
Add clangdev build reqs to pysideads
n-elie Jul 23, 2022
39be93e
Merge branch 'conda-forge:main' into pysideads
n-elie Jan 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions recipes/pyside2ads/0001-libcxx.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd16157..c0997b5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,6 +127,7 @@ set(shiboken_options --generator-set=shiboken --enable-parent-ctor-heuristic
--avoid-protected-hack --enable-pyside-extensions
${qt_includes} ${ads_includes}
-I${CMAKE_SOURCE_DIR}/src
+ -I$ENV{BUILD_PREFIX}/include/c++/v1/
-T${PYSIDE_TYPESYSTEMS}
--output-directory=${CMAKE_CURRENT_BINARY_DIR}
)
63 changes: 63 additions & 0 deletions recipes/pyside2ads/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{% set version = "3.8.2.1" %}
package:
name: pyside2ads
version: {{ version }}

source:
url: https://github.com/metgem/PySide2Ads/archive/v{{ version }}.tar.gz
sha256: 39b75119212dbc465590f11b5e36909949fcc34006d96b843205a4971e8c4bde
patches:
- 0001-libcxx.patch # [linux]

build:
number: 0
script: {{ PYTHON }} -m pip install . -vv
script_env:
- CMAKE_GENERATOR_PLATFORM= # [win]
- CMAKE_GENERATOR_TOOLSET= # [win]
- CMAKE_GENERATOR= # [win]

requirements:
build:
- cmake
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- clangdev
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My guess is that clangdev is only needed on macOS and it will be installed by the previous compiler requirement.
Shouldn't that be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clangdev seems to be needed on Linux, otherwise stddef.h is not found

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

stddef.h is not unique to clang it shouldn't require clangdev to be installed. Do you have a link to the spefic log output where this error occurred?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you can find the log here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@carterbox Is there anything I can do for this PR to be accepted? Another package that I maintain (qtmolecularnetwork) also use clang and clangdev and was accepted

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- {{ cdt('mesa-libgl-devel') }} # [linux]
- {{ cdt('mesa-dri-drivers') }} # [linux]
- {{ cdt('libselinux') }} # [linux]
- {{ cdt('libxdamage') }} # [linux]
- {{ cdt('libxxf86vm') }} # [linux]
- {{ cdt('libxext') }} # [linux]
- make # [not win]
- libcxx # [linux]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be automatically installed by compiler('cxx').

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make is not installed by compiler('cxx'). If I remove it, I get CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.

libcxx is needed for clang to find type_traits. Otherwise this error occurs: /include/qt/QtCore/qglobal.h:45:12: fatal error: 'type_traits' file not found.

cdt('libxxf86vm') and cdt('libxext') comes from here: https://conda-forge.org/docs/maintainer/knowledge_base.html#libgl

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang is not our default compiler toolchain for linux. This is why the compiler directive is not installing libcxx for you.

Is there a reason that this project cannot compile with gcc on linux? Your addition of clangdev is adding extra dependencies that are not being used by the build or at runtime.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not choose to use clang, it seems to be selected by default


host:
- python
- qt-main >=5.15
- qtadvanceddocking
- pyside2 >=5.15
- pip
- setuptools
- libclang
- xorg-libxfixes # [linux]

run:
- python
- qtadvanceddocking
- pyside2 >=5.15

test:
imports:
- PySide2Ads
- PySide2Ads.QtAds

about:
home: https://github.com/metgem/PySide2Ads
license: LGPL-2.1-only
license_file: LICENSE
summary: PySide2 binding for Qt-Advanced-Docking-System

extra:
recipe-maintainers:
- n-elie
6 changes: 6 additions & 0 deletions recipes/pyside2ads/yum_requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mesa-libGL
mesa-dri-drivers
libselinux
libXdamage
libXxf86vm
libXext
13 changes: 13 additions & 0 deletions recipes/qtadvanceddocking/0001-CDockContainerWidget.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/src/DockContainerWidget.h b/src/DockContainerWidget.h
index 06ea710..5f4e668 100644
--- a/src/DockContainerWidget.h
+++ b/src/DockContainerWidget.h
@@ -107,7 +107,7 @@ protected:
/**
* Adds the given dock area to this container widget
*/
- void addDockArea(CDockAreaWidget* DockAreaWidget, DockWidgetArea area = CenterDockWidgetArea);
+ void addDockArea(CDockAreaWidget* DockAreaWidget, DockWidgetArea area = ads::CenterDockWidgetArea);

/**
* Removes the given dock area from this container
15 changes: 15 additions & 0 deletions recipes/qtadvanceddocking/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
mkdir build
cd build

cmake -LAH -G"NMake Makefiles" ^
-DCMAKE_PREFIX_PATH="%LIBRARY_PREFIX%" ^
-DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
-DCMAKE_BUILD_TYPE=Release ^
-DBUILD_STATIC=OFF ^
-DBUILD_EXAMPLES=OFF ^
-DADS_VERSION=%PKG_VERSION% ^
..
if errorlevel 1 exit 1

cmake --build . --target install
if errorlevel 1 exit 1
17 changes: 17 additions & 0 deletions recipes/qtadvanceddocking/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

mkdir build
cd build

cmake \
${CMAKE_ARGS} \
-DCMAKE_PREFIX_PATH=${PREFIX} \
-DCMAKE_INSTALL_PREFIX=${PREFIX} \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_RPATH=${PREFIX}/lib \
-DBUILD_STATIC=OFF \
-DBUILD_EXAMPLES=OFF \
-DADS_VERSION=${PKG_VERSION} \
..
make install -j${CPU_COUNT}

49 changes: 49 additions & 0 deletions recipes/qtadvanceddocking/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{% set version = "3.8.2" %}

package:
name: qtadvanceddocking
version: {{ version }}

source:
url: https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/archive/{{ version }}.tar.gz
sha256: e56811228fb4d5f5703c31cd83cb39ab2d5a849f581719d383db72f9322ec7f2
patches:
- 0001-CDockContainerWidget.patch

build:
number: 0

requirements:
build:
- cmake
- {{ compiler('cxx') }}
- make # [not win]
- ninja # [win]
- {{ cdt('mesa-libgl-devel') }} # [linux]
- {{ cdt('mesa-dri-drivers') }} # [linux]
- {{ cdt('libselinux') }} # [linux]
- {{ cdt('libxdamage') }} # [linux]
- {{ cdt('libxxf86vm') }} # [linux]
- {{ cdt('libxext') }} # [linux]

host:
- qt-main >=5.15

test:
commands:
- if not exist %LIBRARY_BIN%\\qtadvanceddocking.dll exit 1 # [win]
- if not exist %LIBRARY_INC%\\ads_globals.h exit 1 # [win]
- if not exist %LIBRARY_LIB%\\cmake\\qtadvanceddocking\\qtadvanceddockingConfig.cmake exit 1 # [win]
- test -f $PREFIX/lib/libqtadvanceddocking${SHLIB_EXT} # [unix]
- test -f $PREFIX/include/ads_globals.h # [unix]
- test -f $PREFIX/lib/cmake/qtadvanceddocking/qtadvanceddockingConfig.cmake # [unix]

about:
home: https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System
license: LGPL-2.1-only
license_file: gnu-lgpl-v2.1.md
summary: Advanced Docking System for Qt

extra:
recipe-maintainers:
- n-elie