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

Upgrade to new namespace convention. Add py 3.11 and py3.12 #43

Merged
merged 53 commits into from
Jan 28, 2024
Merged
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
b3c3129
Update __version__.py
fredboudon Apr 6, 2022
9b8b8e9
add simlab extension module
fredboudon Apr 13, 2022
3a4f9b6
c++ compilation ok with qt6
tristancabel Jun 22, 2022
041bd50
Fixing compilation for macOS
Jun 24, 2022
c3856d3
Merge pull request #1 from NamelessIV/qt6
tristancabel Jun 24, 2022
b9ba9cd
more python changes
tristancabel Jun 30, 2022
115dca3
compile lpy ok
tristancabel Jun 30, 2022
1fe6d82
no more lpy import error
tristancabel Jul 5, 2022
fee2cd1
add turtle param in doc of StartInterpretation and EndInterpretation
fredboudon Jul 28, 2022
e6d912e
Merge branch 'master' of https://github.com/fredboudon/lpy
fredboudon Jul 28, 2022
c4d7be0
compatible with qt5
tristancabel Sep 2, 2022
c386713
remove python 3.7
tristancabel Sep 9, 2022
10156c8
Update __version__.py
fredboudon Oct 3, 2022
31314f7
Update meta.yaml
fredboudon Oct 24, 2022
f216b9e
add npt test option to conda build to avoid conflict
fredboudon Oct 25, 2022
5ec70cf
Update conda-package-build.yml
fredboudon Oct 25, 2022
5bad200
Update conda-package-build.yml
fredboudon Oct 25, 2022
deda20e
Merge pull request #45 from tristancabel/qt6
fredboudon Oct 25, 2022
2bbd327
Merge branch 'master' of https://github.com/fredboudon/lpy
fredboudon Oct 25, 2022
9c103b1
v3.10 with qt6 compat
fredboudon Oct 25, 2022
e82c590
remove dep to python 3.9
fredboudon Oct 28, 2022
e1ac88f
improve build
fredboudon Nov 3, 2022
a1bc0fc
remove py37
fredboudon Nov 3, 2022
d60ccc6
Delete LpyAnimation-checkpoint.ipynb
fredboudon Nov 3, 2022
30806a0
v 3.11. Fix opengl bugs
fredboudon Nov 19, 2022
f698c87
Update meta.yaml
fredboudon Nov 20, 2022
f7a6a1c
Add conda_build_config
fredboudon Nov 25, 2022
5d9ad9f
update github workflow
fredboudon Nov 25, 2022
2bf0de2
Update meta.yaml
fredboudon Nov 26, 2022
ed98c87
Fix bugs with Lsystem::interpret
fredboudon Nov 26, 2022
2cd833f
Test turtle pushpop.
fredboudon Feb 23, 2023
92dd569
Fix interface (settings, error report, object panel, keyword)
fredboudon Feb 23, 2023
9f915c3
Improve 2D curve edition
fredboudon Feb 23, 2023
b7b754d
Update lsystem.cpp
fredboudon Feb 23, 2023
74ef308
add upate_graphical_parameter and update_scalar
fredboudon Feb 23, 2023
14ead70
Update __init__.py
fredboudon Feb 23, 2023
bdd9747
v3.12
fredboudon Feb 23, 2023
01f2b63
updating graphical parameters
KaramokoS Feb 28, 2023
044bbcd
Merge pull request #46 from KaramokoS/feature/updating-graphical-params
fredboudon Mar 6, 2023
f452edf
fix bug with scalar editor
fredboudon Mar 22, 2023
bd2b305
v3.13.0
fredboudon Mar 22, 2023
d7c3599
update github workflow
fredboudon Mar 22, 2023
2e2187e
improve shell
fredboudon Oct 18, 2023
ff8570d
v3.14.0
fredboudon Oct 18, 2023
9b65884
Delete __init__.py
fredboudon Jan 22, 2024
cd7c04f
Update conda-package-build.yml
fredboudon Jan 24, 2024
70da31b
v3.14.1
fredboudon Jan 24, 2024
41a00b0
Fix bug with boost
fredboudon Jan 24, 2024
f961bf1
Fix pb with boost in meta.yaml
fredboudon Jan 24, 2024
8bb399e
Fix pb with snprintf on windows
fredboudon Jan 24, 2024
0d899ed
Merge branch 'master' into master
pradal Jan 26, 2024
927168a
Update setup.py
pradal Jan 26, 2024
2e8889f
Update conda-package-build.yml
pradal Jan 26, 2024
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
107 changes: 10 additions & 97 deletions .github/workflows/conda-package-build.yml
Original file line number Diff line number Diff line change
@@ -1,105 +1,18 @@
name: Building Package using Conda
name: Building Package

on:
push:
branches: [ master ]
branches:
- '**'
tags:
- 'v*'
pull_request:
branches: [ master ]
branches:
- '**'


jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
#max-parallel: 5
matrix:
os: [ macos-latest, ubuntu-latest]
env:
- CONDA_PY: "37"
CONDA_NPY: "111"
- CONDA_PY: "38"
CONDA_NPY: "116"
- CONDA_PY: "39"
CONDA_NPY: "119"

environment: anaconda_build

steps:
- uses: actions/checkout@v2

- name: Add conda to system path
run: |
# Add conda to system path
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH

- name: Setup conda
run: |
# Setup conda
sudo conda config --add channels conda-forge
sudo conda config --add channels fredboudon
sudo conda config --set always_yes yes
sudo conda config --set remote_read_timeout_secs 600
sudo conda config --set auto_update_conda False
sudo conda install conda-build anaconda-client

- name: Build
env:
CONDA_PY: ${{ matrix.env.CONDA_PY }}
CONDA_NPY: ${{ matrix.env.CONDA_NPY }}
run: |
# Build
if [[ "$CONDA_PY" = "" ]]; then
echo "CONDA_PY is not defined"
exit -1
fi
if [[ "$CONDA_NPY" = "" ]]; then
echo "CONDA_NPY is not defined"
exit -1
fi
export PYTHON_VERSION=${CONDA_PY:0:1}.${CONDA_PY:1:1}
export NUMPY_VERSION=${CONDA_NPY:0:1}.${CONDA_NPY:1:2}

export BUILD_CMD="sudo conda build . --python=$PYTHON_VERSION"
export BUILD_OUTPUT=`$BUILD_CMD --output`

if [[ "$BUILD_OUTPUT" = "" ]]; then
echo "PACKAGE NAME is not defined"
exit -1
fi
echo "BUILD_OUTPUT=$BUILD_OUTPUT" >> $GITHUB_ENV

$BUILD_CMD


- name: Login
env:
ANACONDA_LOGIN: ${{ secrets.ANACONDA_LOGIN }}
ANACONDA_PASSWORD: ${{ secrets.ANACONDA_PASSWORD }}
run: |
# Login
if [[ "$ANACONDA_LOGIN" = "" ]]; then
echo "ANACONDA_LOGIN is not defined"
exit -1
fi
SESSION_UID=$(uuidgen)
anaconda login --username $ANACONDA_LOGIN --password $ANACONDA_PASSWORD --hostname $SESSION_UID

- name: Deploy
env:
ANACONDA_OWNER: ${{ secrets.ANACONDA_OWNER }}
BUILD_OUTPUT: ${{ env.BUILD_OUTPUT }}
run: |
# Deploy
if [[ "$ANACONDA_OWNER" = "" ]]; then
echo "ANACONDA_OWNER is not defined"
exit -1
fi

echo "PACKAGE NAME:" $BUILD_OUTPUT
if [[ "$BUILD_OUTPUT" = "" ]]; then
echo "PACKAGE NAME is not defined"
exit -1
fi
anaconda upload --skip-existing $BUILD_OUTPUT -u $ANACONDA_OWNER --no-progress

uses: openalea/github-action-conda-build/.github/workflows/conda-package-build.yml@main
secrets:
anaconda_token: ${{ secrets.ANACONDA_TOKEN }}
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ src/openalea/lpy/gui/logindialog.py
src/openalea/lpy/gui/lpymainwindow.py
src/openalea/lpy/gui/lpyprefwidget.py
src/openalea/lpy/gui/py2exe_release.py
#src/openalea/lpy/gui/lpyresources_rc.py
src/openalea/lpy/gui/lpyresources_rc.py
src/openalea/lpy/gui/scalarfloatmetaedit.py
src/openalea/lpy/gui/scalarmetaedit.py

# lpy temp file
*.lpy~
*.py~
*.*~
\#*\#

# C extensions
Expand Down
26 changes: 20 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ project(lpy_project CXX)

# --- Build setup

set(CMAKE_INCLUDE_PATH "$ENV{CONDA_PREFIX}/include" ${CMAKE_INCLUDE_PATH})
set(CMAKE_LIBRARY_PATH "$ENV{CONDA_PREFIX}/lib" ${CMAKE_LIBRARY_PATH})
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
Expand All @@ -35,6 +37,9 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG")

if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")

# To fix compilation error with vc14 and boost
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DHAVE_SNPRINTF")
endif()

## When linking, Python libs are required, so I advised I could use: "target_library_link(targetname ${Python3_LIBRARIES})"
Expand All @@ -51,25 +56,34 @@ endif()

# --- Python

find_package (Python3 COMPONENTS Interpreter Development REQUIRED)
set(Python3_FIND_VIRTUALENV FIRST)
if (WIN32)
# needed when we run cmake in a conda environment
set(Python3_FIND_REGISTRY LAST)
endif()

find_package (Python3 COMPONENTS Interpreter Development NumPy REQUIRED)
include_directories(${Python3_INCLUDE_DIRS})

# --- Libraries

find_package(Threads REQUIRED)
find_package(Qt5Core CONFIG REQUIRED)
find_package(Qt5Concurrent CONFIG REQUIRED)
find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Core Concurrent)
find_package(PlantGL REQUIRED)

set(Boost_NO_SYSTEM_PATHS ON)
set(Boost_USE_MULTITHREAD ON)
set(Boost_USE_STATIC_LIBS OFF)
set(BUILD_SHARED_LIBS ON)

if (USE_CONDA)

set(boost_python python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
find_package(Boost 1.69 COMPONENTS system ${boost_python} REQUIRED)
if (NOT Boost_FOUND)
message("Boost not found, trying again")
set(boost_python python)
else()
set(boost_python python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
find_package(Boost 1.69 COMPONENTS system ${boost_python} REQUIRED)
endif()

find_package(Boost COMPONENTS system ${boost_python} REQUIRED)
Expand Down
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ environment:
CONDA_VERSION: 3

matrix:
- CONDA_PY: 37
- CONDA_PY: 38
CONDA_NPY: 116
- CONDA_PY: 39
CONDA_NPY: 119
- CONDA_PY: 310
CONDA_NPY: 121

install:
- git clone https://github.com/OpenAlea/appveyor-ci.git appveyor-ci
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
conda build . -c conda-forge -c fredboudon -c defaults --python=3.7
conda mambabuild . -c conda-forge -c fredboudon --python=3.10 --no-test
4 changes: 2 additions & 2 deletions conda/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ echo "PYTHON:" ${PYTHON}
#export PYTHONPATH=${PREFIX}/lib/python${PY_VER}/site-packages/
${PYTHON} setup.py install --prefix=${PREFIX}

cp -r share `${PYTHON} -c "import os, openalea.lpy as lpy ; print(os.path.dirname(lpy.__file__))"`/..
#cp -r share `${PYTHON} -c "import os, openalea.lpy as lpy ; print(os.path.dirname(lpy.__file__))"`/..

echo
echo "****** CHECK PYTHON LIB"
Expand All @@ -71,6 +71,6 @@ else
export LDD='ldd'
fi

${LDD} `${PYTHON} -c "import openalea.lpy.__lpy_kernel__ as lpy ; print(lpy.__file__)"`
echo `${PYTHON} -c "import openalea.lpy.__lpy_kernel__ as lpy ; print(lpy.__file__)"`

echo "****** END OF BUILD PROCESS"
17 changes: 17 additions & 0 deletions conda/conda_build_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
cxx_compiler:
- gxx # [linux]
- clangxx # [osx]
- vs2019 # [win]
compiler_version:
- 11 # [osx]
- 11.2.0 # [linux]
cxx_compiler_version:
- 11 # [osx]
- 11.2.0 # [linux]
MACOSX_DEPLOYMENT_TARGET: # [osx]
- '10.12' # [osx]
MACOSX_SDK_VERSION: # [osx and x86_64]
- '10.12' # [osx and x86_64]
pin_run_as_build:
boost: x.x
openalea.plantgl: x.x
31 changes: 16 additions & 15 deletions conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,33 +15,33 @@ about:

build:
preserve_egg_dir: True
number: 0
number: 1
requirements:
host:
- python x.x
- setuptools
- openalea.plantgl >=3.17
- boost
- pyqt
build:
- binutils_impl_linux-64<2.31.0 # [linux]
- binutils_impl_linux-64 # [linux]
- {{ compiler('cxx') }}
- python {{PY_VER}}
- cmake >=3.12.0
- python x.x
- cmake
- pkg-config # [linux]
- make # [unix]
- menuinst # [win]
host:
- python {{PY_VER}}
- setuptools
- openalea.plantgl
# - boost # provided by plantgl
- pyqt
run:
- python {{PY_VER}}
- python x.x
- setuptools
- {{ pin_compatible('openalea.plantgl', max_pin='x.x') }}
- {{ pin_compatible('boost', max_pin='x.x.x') }}
- boost
- pyqt
- ipython
- qtconsole
- jupyter_client # <6
- pyopengl
- pyqglviewer
- pyqglviewer >=1.3
- jsonschema

app:
Expand All @@ -52,11 +52,12 @@ app:
test:
requires:
- nose
- pandas
imports:
- openalea.lpy
source_files:
- test/
- share/
commands:
- nosetests -v -I test_predecessor_at_scale.py -I test_ui.py [unix]
- nosetests -v -I test_predecessor_at_scale.py -I test_ui.py -I test_axialtree.py -I test_successor_at_scale.py [win]
- nosetests -v -I test_predecessor_at_scale.py -I test_ui.py -I test_pickle.py [unix]
- nosetests -v -I test_predecessor_at_scale.py -I test_ui.py -I test_axialtree.py -I test_successor_at_scale.py -I test_pickle.py [win]
Binary file added doc/_images/gallery/tomato.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading