Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
7c80ef1
Remove "cdt" package
thomasarsouze Sep 28, 2026
f07c4ea
Update libgl-devel in meta.yaml
thomasarsouze Oct 1, 2026
300c2cd
Debuging build
thomasarsouze Oct 5, 2026
3828fa4
Trying build inspired by pyqt
Oct 27, 2026
6a1c8bd
Adding host deps
AurelienBesnier Oct 27, 2026
7583d29
adding pyqt5-sip as required in pyproject
AurelienBesnier Oct 27, 2026
1427ae0
Using pip install in build
AurelienBesnier Oct 27, 2026
9abdca7
build flags
AurelienBesnier Oct 27, 2026
afa62cc
Trying to force reinstall to get right version
AurelienBesnier Oct 27, 2026
9ef1189
Using python's pip
AurelienBesnier Oct 27, 2026
115c3b9
Installing deps through pip for consistency
AurelienBesnier Oct 27, 2026
243a70d
Manually setting pyqt-builder version
AurelienBesnier Oct 28, 2026
a8b8470
trying with sip-install
AurelienBesnier Oct 28, 2026
dbc82e7
pinning pyqt + pthread remove
AurelienBesnier Oct 28, 2026
86b0ae3
Using sysroot linux for libc
AurelienBesnier Oct 28, 2026
eccc6a7
Using build scripts for debug
AurelienBesnier Oct 28, 2026
286ec13
Just do sip install for Darwin
AurelienBesnier Oct 28, 2026
04c5c26
Setting sip version for mac latest
AurelienBesnier Oct 28, 2026
1370789
Setting sip versions
AurelienBesnier Oct 29, 2026
86ff6a0
Merge pull request #12 from openalea/11-update-metayml
baugetfa Nov 2, 2026
393412b
try relying on stdlib for all systems
christian34 Nov 2, 2026
b520329
align (unused) pip build tooling with conda recipe
christian34 Nov 2, 2026
3c2ef94
only pass -L to linker
christian34 Nov 2, 2026
9b577a8
try removing explicit ref to sysroot (normally pulled by stdlib)
christian34 Nov 2, 2026
1c3463f
try removing explicit sysroot exposition to linker
christian34 Nov 2, 2026
f22b171
keep only g++ exposition
christian34 Nov 3, 2026
67fa61c
add developer-environment files for win, linux and macos
christian34 Nov 3, 2026
b666ae2
remove platform specific build scripts
christian34 Nov 3, 2026
95cf3ac
Merge pull request #14 from openalea/stdlib
christian34 Nov 3, 2026
9849e56
Merge branch 'fredboudon:master' into master
fredboudon Nov 4, 2026
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
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,15 @@ if __name__ == '__main__':

The sources are hosted on [GitHub](https://github.com/fredboudon/PyQGLViewer).

To create a conda environment with all dependencies:
To create and activate a conda environment with all dependencies, using `environment-linux.yml`, `environment-macos.yml` or `environment-windows.yml` for your platform:

```
conda env create -f environment.yml
conda env create -f environment-linux.yml
conda activate qglviewer
```

macOS also requires the Xcode Command Line Tools, and Windows Visual Studio 2022 with the C++ tools.

To build and install the project:

```
Expand Down
1 change: 0 additions & 1 deletion conda/bld.bat

This file was deleted.

40 changes: 0 additions & 40 deletions conda/build.sh

This file was deleted.

52 changes: 26 additions & 26 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,50 +16,50 @@ about:

build:
number: 2
string: py{{ PY_VER }}
script:
- readlink -f "$(which g++)" # [linux]
- g++ --version # [linux]
- sip-install --verbose
script_env:
- SETUPTOOLS_SCM_PRETEND_VERSION

requirements:
build:
- {{ compiler('cxx')}}
- {{ compiler('cxx') }}
- {{ stdlib('c') }}
# on linux qmake calls g++ by its plain name, that compiler('cxx') does not provide
- gxx # [linux]
- make # [unix]
- pkg-config # [linux]
- {{ cdt('mesa-libgl-devel') }} # [linux] # match libqglviewer CDT GL strategy
# from https://conda-forge.org/docs/maintainer/knowledge_base.html#libgl
- python # [build_platform != target_platform]
- sip # [build_platform != target_platform]
- pyqt-builder # [build_platform != target_platform]
- pkg-config # [unix]
host:
- python
- pip
- qt-main
- sip<=6.10
- pyqt
- libqglviewer
- sip
- pyqt5-sip
- pyqt-builder
- {{ cdt('mesa-libgl-devel') }} # [linux]
- libxcb # [linux]
- pthread-stubs # [linux]
- pyqt-builder 1.18.*
- packaging
- qt-main
- libqglviewer
- libgl-devel # [linux]
- xorg-libxfixes # [linux]


run:
- python
- {{ pin_compatible('pyqt', max_pin='x.x') }}
- {{ pin_compatible('libqglviewer', max_pin='x.x') }}
- pyqt
- libqglviewer
- pyopengl
- xorg-libxfixes # [linux]

test:
requires: # [unix]
- pytest # [unix]
- pytest-qt # [unix]
- pytest-xvfb # [unix]
requires:
- pytest
- pytest-qt
- pytest-xvfb # [linux]
imports:
- PyQGLViewer
source_files: # [unix]
- test/*.py # [unix]
commands: # [unix]
- pytest -v # [unix]
source_files:
- test/*.py
commands:
- set QT_QPA_PLATFORM=offscreen # [win]
- pytest -v
32 changes: 32 additions & 0 deletions environment-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Linux developer environment, mirroring conda/meta.yaml.
# Versions follow conda-forge. Only sip and pyqt-builder are pinned as in the
# recipe, and sysroot as in conda-forge-pinning.
name: qglviewer
channels:
- conda-forge
dependencies:
# compiler('cxx') and stdlib('c') from the recipe. cxx-compiler provides g++
# without target prefix, as called by qmake (gxx in the recipe does the same).
# g++ finds this sysroot by itself.
- cxx-compiler
- sysroot_linux-64=2.17
- make
- pkg-config
# host
- python
- pip
- sip<=6.10
- pyqt
- pyqt5-sip
- pyqt-builder=1.18.*
- packaging
- qt-main
- libqglviewer
- libgl-devel
- xorg-libxfixes
# run
- pyopengl
# test
- pytest
- pytest-qt
- pytest-xvfb
30 changes: 30 additions & 0 deletions environment-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# macOS developer environment (Intel and Apple Silicon), mirroring conda/meta.yaml.
# Versions follow conda-forge. Only sip and pyqt-builder are pinned as in the
# recipe.
#
# Xcode Command Line Tools are required: qmake gets the SDK path from xcrun.
name: qglviewer
channels:
- conda-forge
dependencies:
# clang++ as called by qmake. The clangxx_osx-* wrappers of compiler('cxx')
# are arch specific and only set env flags, that qmake does not read.
- cxx-compiler
- make
- pkg-config
# host
- python
- pip
- sip<=6.10
- pyqt
- pyqt5-sip
- pyqt-builder=1.18.*
- packaging
- qt-main
- libqglviewer
# run
- pyopengl
# test
- pytest
- pytest-qt
- pytest-xvfb
27 changes: 27 additions & 0 deletions environment-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Windows developer environment, mirroring conda/meta.yaml.
# Versions follow conda-forge. Only sip and pyqt-builder are pinned as in the
# recipe.
#
# Visual Studio 2022 with the C++ tools is required: activation of the env sets
# up its compiler and nmake.
name: qglviewer
channels:
- conda-forge
dependencies:
# compiler('cxx') from the recipe
- cxx-compiler
# host
- python
- pip
- sip<=6.10
- pyqt
- pyqt5-sip
- pyqt-builder=1.18.*
- packaging
- qt-main
- libqglviewer
# run
- pyopengl
# test
- pytest
- pytest-qt
13 changes: 0 additions & 13 deletions environment.yml

This file was deleted.

32 changes: 12 additions & 20 deletions project.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@


import os
import platform
import subprocess

from pyqtbuild import PyQtBindings, PyQtProject


def determine_pyqglviewer_version():
import os, subprocess

version = os.environ.get("SETUPTOOLS_SCM_PRETEND_VERSION",None)
if version is None:
try:
Expand Down Expand Up @@ -68,28 +68,20 @@ def __init__(self, project):
print("Instanciation of the PyQGLViewerBindings ")

def apply_user_defaults(self, tool):
import platform, os


CONDA_PREFIX = os.environ.get('CONDA_PREFIX',None)
PREFIX = os.environ.get('PREFIX',None)
CONDA_BUILD_SYSROOT = os.environ.get('CONDA_BUILD_SYSROOT',None)

if platform.system() in ['Darwin','Linux'] :
system = platform.system()
prefix = os.environ.get("PREFIX") or os.environ.get("CONDA_PREFIX")

if system in ('Darwin','Linux') :
self.libraries.append('QGLViewer')
if not CONDA_PREFIX is None:
self.include_dirs.append(f'{CONDA_PREFIX}/include')
self.library_dirs.append(f'{CONDA_PREFIX}/lib')
if not PREFIX is None:
self.include_dirs.append(f'{PREFIX}/include')
self.library_dirs.append(f'{PREFIX}/lib')

if platform.system() == 'Linux':
if prefix:
self.include_dirs.append(f'{prefix}/include')
self.library_dirs.append(f'{prefix}/lib')

if system == 'Linux':
self.libraries.append('GLU')
if not CONDA_BUILD_SYSROOT is None :
self.include_dirs.append(f'{CONDA_BUILD_SYSROOT}/usr/include')

elif platform.system() == 'Windows':
elif system == 'Windows':
self.libraries.append('QGLViewer2')
self.libraries.append('opengl32')
self.libraries.append('glu32')
Expand Down
7 changes: 6 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Specify the build system.
[build-system]
# "setuptools", "setuptools-scm" not used
requires = ["sip", "PyQt-builder"]
requires = ["sip<=6.10", "PyQt-builder=1.18"]
build-backend = "sipbuild.api"


Expand All @@ -15,6 +15,10 @@ readme = "README.md"
authors = [
{ name = "Frederic Boudon", email = "frederic.boudon@cirad.fr" }
]
dependencies = [
"PyQt5",
"PyQt5-sip"
]

[tool.sip.project]
sip-module = "PyQt5.sip"
Expand All @@ -24,5 +28,6 @@ sip-files-dir = "sip"
qmake-QT = ['xml', 'opengl', 'gui', 'widgets']
tags = ['QGLViewer_2_9_1']


# Could specified directly with new construct but currently only working on MacOS. Instead options set in project.py
# libraries = ['QGLViewer ; system_platform == "Linux"','GLU ; system_platform == "Linux"']
Loading