Skip to content

Commit

Permalink
Merge pull request #43 from DLR-SC/update-cpacscreator
Browse files Browse the repository at this point in the history
update cpacscreator package
  • Loading branch information
merakulix authored Nov 21, 2024
2 parents 472a215 + ae935a9 commit ca74564
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 171 deletions.
25 changes: 15 additions & 10 deletions cpacscreator/bld.bat
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
copy %RECIPE_DIR%\boost-patch\* thirdparty\

mkdir build
cd build

REM Remove dot from PY_VER for use in library name
set MY_PY_VER=%PY_VER:.=%

REM We need own flags as conda turns on program size optimization
REM which ends up in huge static library sizes
set CFLAGS=
Expand All @@ -18,20 +13,30 @@ cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" ^
-DTIGL_VIEWER=ON ^
-DTIGL_BINDINGS_PYTHON_INTERNAL=ON ^
-DPythonOCC_SOURCE_DIR="%LIBRARY_PREFIX%"\src\pythonocc-core ^
-DPYTHON_EXECUTABLE:FILEPATH="%PYTHON%" ^
-DPYTHON_INCLUDE_DIR:PATH="%PREFIX%"/include ^
-DTIGL_CONCAT_GENERATED_FILES=OFF ^
-DPYTHON_LIBRARY:FILEPATH="%PREFIX%"/libs/python%MY_PY_VER%.lib ^
-DPython3_FIND_STRATEGY=LOCATION ^
-DPython3_FIND_REGISTRY=NEVER ^
..
if errorlevel 1 exit 1

REM Build step
cmake --build .
cmake --build . --config Release
if errorlevel 1 exit 1

REM Install step
cmake --build . --target install
cmake --build . --target install --config Release
if errorlevel 1 exit 1

REM install python packages
move %LIBRARY_PREFIX%\share\tigl3\python\tigl3 %SP_DIR%

REM The egg-info file is necessary because some packages,
REM might require cpacscreator in their setup.py.
REM See https://setuptools.readthedocs.io/en/latest/pkg_resources.html#workingset-objects

set egg_info=%SP_DIR%\cpacscreator-%PKG_VERSION%.egg-info
echo>%egg_info% Metadata-Version: 2.1
echo>>%egg_info% Name: cpacscreator
echo>>%egg_info% Version: %PKG_VERSION%
echo>>%egg_info% Summary: The TiGL Geometry Library to process aircraft geometries in pre-design
echo>>%egg_info% Platform: UNKNOWN
152 changes: 0 additions & 152 deletions cpacscreator/boost-patch/CMakeLists.txt

This file was deleted.

Binary file removed cpacscreator/boost-patch/boost_1_72_0.tar.gz
Binary file not shown.
16 changes: 15 additions & 1 deletion cpacscreator/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ if [[ ${HOST} =~ .*linux.* ]]; then
CMAKE_PLATFORM_FLAGS+=(-DCMAKE_TOOLCHAIN_FILE="${RECIPE_DIR}/cross-linux.cmake")
fi

cp $RECIPE_DIR/boost-patch/* thirdparty/

mkdir -p build
cd build
Expand All @@ -17,6 +16,8 @@ cmake -G "Ninja" -DCMAKE_INSTALL_PREFIX=$PREFIX \
-DTIGL_VIEWER=ON \
-DTIGL_CONCAT_GENERATED_FILES=OFF \
-DTIGL_BINDINGS_PYTHON_INTERNAL=ON \
-DPython3_FIND_STRATEGY=LOCATION \
-DPython3_FIND_FRAMEWORK=NEVER \
-DPythonOCC_SOURCE_DIR=$PREFIX/src/pythonocc-core \
-DBUNDLE_APPLE=OFF \
..
Expand All @@ -32,3 +33,16 @@ ninja install
mkdir -p $SP_DIR/tigl3
mv $PREFIX/share/tigl3/python/tigl3/* $SP_DIR/tigl3/
python $RECIPE_DIR/fixosxload.py $SP_DIR/tigl3/tigl3wrapper.py libtigl3


# The egg-info file is necessary because some packages
# might require tigl3 in their setup.py.
# See https://setuptools.readthedocs.io/en/latest/pkg_resources.html#workingset-objects

cat > $SP_DIR/cpacscreator-$PKG_VERSION.egg-info <<FAKE_EGG
Metadata-Version: 2.1
Name: cpacscreator
Version: $PKG_VERSION
Summary: The TiGL Geometry Library to process aircraft geometries in pre-design
Platform: UNKNOWN
FAKE_EGG
17 changes: 10 additions & 7 deletions cpacscreator/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{% set version = "0.1" %}
{% set version = "0.2.0" %}

package:
name: cpacscreator
version: {{ version }}

source:
git_url: https://github.com/DLR-SC/tigl.git
git_tag: cpacscreator-v0.1.1
git_tag: cpacscreator-v{{ version }}

build:
number: 11
number: 0


requirements:
Expand All @@ -34,16 +34,19 @@ requirements:

host:
- tixi3 ==3.3.0
- oce ==0.17.2
- pythonocc-core ==0.17.3
- opencascade ==7.4.0
- pythonocc-core ==7.4.1
- tbb-devel ==2019.5
- python {{ python }}
- libglu # [linux]
- qt

run:
- tixi3 ==3.3.0
- pyqt
- oce ==0.17.2
- pythonocc-core ==0.17.3
- opencascade ==7.4.0
- pythonocc-core ==7.4.1
- tbb ==2019.5
- python {{ python }}

test:
Expand Down
2 changes: 1 addition & 1 deletion tigl3/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ source:
git_tag: v{{ version }}

build:
number: 0
number: 0


requirements:
Expand Down

0 comments on commit ca74564

Please sign in to comment.