Skip to content

Commit

Permalink
Removal of unnecessary outputs during installation (#108)
Browse files Browse the repository at this point in the history
* Deactivate to source nest_vars by activating the the env

* Deactivate some log outputs

* Bumped the build number

* Fix error  sed: -I or -i may not be used with stdin in darwin

* Not needed

* Tidy and del last sourcing of nest_vars.sh

* MNT: Re-rendered with conda-build 3.27.0, conda-smithy 3.30.3, and conda-forge-pinning 2024.01.11.05.51.13

* Not needed bekause there is no ativate or deactivate anymore

* Tidy

* Add replacement because the compiler have not the right path

* Direct path replacement

* Replace only compiler name

* Fix pipe

* Fix pipe

* Macos use -i with a symbol

* Fix macos sed

* Add file backup

* Fix macos sed

* Replace compiler

* New sed and doc

* Delete not needed variable

* Documentation

* Avoid wrong compiler with problems by conda setting env

* Change in doc

* Fix typo

* MNT: Re-rendered with conda-build 3.27.0, conda-smithy 3.30.4, and conda-forge-pinning 2024.02.06.01.10.37
  • Loading branch information
steffengraber authored Feb 6, 2024
1 parent 177a5e0 commit 449e0a2
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 282 deletions.
13 changes: 12 additions & 1 deletion .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions .scripts/build_steps.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .scripts/run_docker_build.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

238 changes: 0 additions & 238 deletions README.md.orig

This file was deleted.

3 changes: 0 additions & 3 deletions recipe/activate.sh

This file was deleted.

6 changes: 0 additions & 6 deletions recipe/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,3 @@ if [[ -d ${PREFIX}/lib64 ]]
then
cp -R "${PREFIX}"/lib64/* "${PREFIX}"/lib
fi

for CHANGE in "activate" "deactivate"
do
mkdir -p "${PREFIX}/etc/conda/${CHANGE}.d"
sed "s#!!!SP_DIR!!!#${SP_DIR}#g" "${RECIPE_DIR}/${CHANGE}.sh" > "${PREFIX}/etc/conda/${CHANGE}.d/${PKG_NAME}_${CHANGE}.sh"
done
6 changes: 0 additions & 6 deletions recipe/deactivate.sh

This file was deleted.

3 changes: 1 addition & 2 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% set name = "nest-simulator" %}
{% set version = "3.6" %}
{% set build = 3 %}
{% set build = 4 %}

package:
name: {{ name|lower }}
Expand Down Expand Up @@ -82,7 +82,6 @@ test:
imports:
- nest
commands:
- python -c "import nest; nest.help();"
- nest --help
- sli --help

Expand Down
42 changes: 22 additions & 20 deletions recipe/post-link.sh
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
#!/bin/bash

. "${CONDA_PREFIX}/bin/nest_vars.sh"
now=$(date +"%b%d-%Y-%H%M%S")

COMPILER_FULL=$(bash nest-config --compiler)
COMPILER_NAME=$(basename "${CXX}")
#COMPILER_RUN="${CONDA_PREFIX}/bin/${COMPILER_NAME}"
COMPILER_RUN=$(which "${COMPILER_NAME}")
COMPILER_NAME=$(basename "${COMPILER_FULL}")
COMPILER="${CONDA_PREFIX}/bin/${COMPILER_NAME}"

# Install the same compiler then on build time.env list
# To use nest with nestml in linux install
# mamba install -c conda-forge gxx_linux-64
#
# To use nest with nestml in osx-64 install
# mamba install -c conda-forge clangxx_osx-64
#
# To use nest with nestml in osx-arm64 install
# mamba install -c conda-forge clangxx_osx-arm64
#
# Update `nest-config.sh` with `bash .nest-simulator-post-link.sh`

if [[ "$OSTYPE" == "linux-gnu"* ]]; then
echo "COMPILER LINUX BUILD" >> "${PREFIX}"/.messages.txt
bash nest-config --compiler >> "${PREFIX}"/.messages.txt
sed -i "s|${COMPILER_FULL}|${COMPILER_RUN}|g" "${CONDA_PREFIX}"/bin/nest-config
echo "COMPILER LINUX RUN" >> "${PREFIX}"/.messages.txt
bash nest-config --compiler >> "${PREFIX}"/.messages.txt
cp "${CONDA_PREFIX}"/bin/nest-config "${CONDA_PREFIX}"/bin/nest-config-"${now}".orig
sed -i "s|${COMPILER_FULL}|${COMPILER}|g" "${CONDA_PREFIX}"/bin/nest-config
elif [[ "$OSTYPE" == "darwin"* ]]; then
echo "COMPILER DARWIN BUILD" >> "${PREFIX}"/.messages.txt
bash nest-config --compiler >> "${PREFIX}"/.messages.txt
sed -i "s|${COMPILER_FULL}|${COMPILER_RUN}|g" "${CONDA_PREFIX}"/bin/nest-config
sed -i "s|-fopenmp=libomp|-Xclang -fopenmp|g" "${CONDA_PREFIX}"/bin/nest-config
echo "COMPILER DARWIN RUN" >> "${PREFIX}"/.messages.txt
bash nest-config --compiler >> "${PREFIX}"/.messages.txt
cat "${CONDA_PREFIX}"/bin/nest-config >> "${PREFIX}"/.messages.txt
cp "${CONDA_PREFIX}"/bin/nest-config "${CONDA_PREFIX}"/bin/nest-config-"${now}".orig
sed -i'.bac' "s|${COMPILER_FULL}|${COMPILER}|g" "${CONDA_PREFIX}"/bin/nest-config
sed -i'.bac' "s|-fopenmp=libomp|-Xclang -fopenmp|g" "${CONDA_PREFIX}"/bin/nest-config
else
echo "$OSTYPE" >> "${PREFIX}"/.messages.txt
fi


echo $OSTYPE
fi

0 comments on commit 449e0a2

Please sign in to comment.