Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
File renamed without changes.
40 changes: 0 additions & 40 deletions conda/build.sh

This file was deleted.

63 changes: 63 additions & 0 deletions conda/build.sh.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
#!/bin/bash

# Inspired from https://github.com/conda-forge/pyqt-feedstock/tree/main/recipe

if [ "$(uname)" == "Linux" ]; then
GXX_PATH=$(command -v "${GXX}")
GCC_PATH=$(command -v "${GCC}")
GCC_AR_PATH=$(command -v "${GCC_AR}")
ln -sf "${GXX_PATH}" g++
ln -sf "${GCC_PATH}" gcc
ln -sf "${GCC_AR_PATH}" gcc-ar

export LD=${GXX}
export CC=${GCC}
export CXX=${GXX}
export PKG_CONFIG_EXECUTABLE=$(basename $(which pkg-config))

chmod +x g++ gcc gcc-ar
export PATH=${PWD}:${PATH}

SYSROOT_FLAGS="-L ${BUILD_PREFIX}/${HOST}/sysroot/usr/lib64 -L ${BUILD_PREFIX}/${HOST}/sysroot/usr/lib"
export CFLAGS="$SYSROOT_FLAGS $CFLAGS"
export CXXFLAGS="$SYSROOT_FLAGS $CXXFLAGS"
export LDFLAGS="$SYSROOT_FLAGS $LDFLAGS"
fi

echo "CC=${CC}"
echo "CXX=${CXX}"
echo "GCC=${GCC}"
echo "GXX=${GXX}"

which gcc
which g++

readlink -f "$(which gcc)" || true
readlink -f "$(which g++)" || true
readlink -f "$GCC" || true
readlink -f "$GXX" || true

"${CC}" --version
"${CXX}" --version

"$GXX" -v -E -x c++ /dev/null

${PYTHON} -m pip install --force-reinstall sip pyqt5-sip pyqt5

echo "**** BUILD"
${PYTHON} -m pip install . -v --no-build-isolation --no-deps

echo
echo "****** CHECK PYTHON LIB"

# To check if Python lib is not in the dependencies with conda-forge distribution.
# See https://github.com/conda-forge/boost-feedstock/issues/81
if [ $(uname) = "Darwin" ]; then
otool -L $(${PYTHON} -c "import PyQGLViewer as pyqgl ; print(pyqgl.__file__)")
fi

if [ "$(uname)" == "Linux" ]; then
ldd $(${PYTHON} -c "import PyQGLViewer as pyqgl ; print(pyqgl.__file__)")

fi
echo "****** END OF BUILD PROCESS"
30 changes: 17 additions & 13 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,40 @@ build:
string: py{{ PY_VER }}
script_env:
- SETUPTOOLS_SCM_PRETEND_VERSION
script:
- {{ PYTHON }} -m pip install . -v --no-build-isolation

requirements:
build:
- {{ compiler('cxx')}}
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ stdlib('c') }}
- make # [unix]
- pkg-config # [linux]
- {{ cdt('mesa-libgl-devel') }} # [linux] # match libqglviewer CDT GL strategy
- pkg-config # [unix]
- 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]
- python
# - sip
# - pyqt
# - pyqt-builder
host:
- python
- pip
# - sip
# - pyqt-builder
- packaging
- qt-main
- pyqt
- libqglviewer
- sip
- pyqt5-sip
- pyqt-builder
- {{ cdt('mesa-libgl-devel') }} # [linux]
- libgl-devel # [linux]
- libxcb # [linux]
- pthread-stubs # [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]

Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 @@ -23,6 +27,8 @@ sip-files-dir = "sip"
[tool.sip.bindings.PyQGLViewer]
qmake-QT = ['xml', 'opengl', 'gui', 'widgets']
tags = ['QGLViewer_2_9_1']
include-dirs=['${CONDA_PREFIX}/include']
library-dirs=['${CONDA_PREFIX}/lib']

# 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