Skip to content

Commit

Permalink
Update node gyp to support python 3.12 (CycloneDX#1201)
Browse files Browse the repository at this point in the history
* Update node gyp to support python 3.12

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>

---------

Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
  • Loading branch information
prabhu authored Jun 30, 2024
1 parent a445694 commit cae6e4d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 3 additions & 1 deletion ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ RUN set -e; \
python${PYTHON_VERSION} python${PYTHON_VERSION}-devel python${PYTHON_VERSION}-pip ruby ruby-devel glibc-common glibc-all-langpacks \
pcre2 which tar gzip zip unzip bzip2 sudo ncurses sqlite-devel dotnet-sdk-8.0 \
&& alternatives --install /usr/bin/python3 python /usr/bin/python${PYTHON_VERSION} 1 \
&& alternatives --install /usr/bin/python3 python3 /usr/bin/python${PYTHON_VERSION} 1 \
&& python${PYTHON_VERSION} --version \
&& python${PYTHON_VERSION} -m pip install --upgrade pip virtualenv \
&& python${PYTHON_VERSION} -m pip install --user pipenv poetry blint \
Expand Down Expand Up @@ -124,7 +125,8 @@ RUN set -e; \
&& chmod +x linux-install.sh \
&& sudo ./linux-install.sh \
&& useradd -ms /bin/bash cyclonedx \
&& npm install --unsafe-perm -g @microsoft/rush --omit=dev \
&& npm install --unsafe-perm -g node-gyp @microsoft/rush --omit=dev \
&& npx node-gyp install \
&& pecl channel-update pecl.php.net \
&& pecl install timezonedb \
&& echo 'extension=timezonedb.so' >> /etc/php.ini \
Expand Down
11 changes: 6 additions & 5 deletions contrib/lima/cdxgen-opensuse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ provision:
*) echo >&2 "error: unsupported architecture: '$ARCH_NAME'"; exit 1 ;;
esac
zypper --non-interactive install -l --no-recommends git-core \
python312 python312-pip python312-devel wget zip unzip make gawk bzip2 findutils java-21-openjdk-devel libicu-devel rust1.78 cargo1.78 \
gcc13 gcc13-c++ gcc13-fortran \
python311 python311-pip python311-devel wget zip unzip make gawk bzip2 findutils java-21-openjdk-devel libicu-devel rust1.78 cargo1.78 \
gcc13 gcc13-c++ gcc13-fortran nodejs20 nodejs20-devel \
clang7 llvm7 llvm7-devel libcurl-devel libjpeg62-devel libmariadb-devel \
postgresql-devel postgresql16-server-devel libopenssl-devel libopenblas_pthreads-devel lapacke-devel
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 10
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-13 10
update-alternatives --install /usr/bin/gfortran gfortran /usr/bin/gfortran-13 10
update-alternatives --install /usr/bin/python python /usr/bin/python3.12 10
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 10
update-alternatives --install /usr/bin/python python /usr/bin/python3.11 10
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 10
python -m pip install --upgrade pip virtualenv
python -m pip install poetry pipenv blint custom-json-diff owasp-depscan
- mode: system
Expand All @@ -76,9 +76,10 @@ provision:
mkdir -p /opt
mv /.sdkman/candidates/* /opt/
rm -rf /.sdkman
npm install -g node-gyp @cyclonedx/cdxgen --omit=dev
npx node-gyp install
node -v
npm -v
gcc --version
zypper clean -a
npm install -g @cyclonedx/cdxgen --omit=dev
cdxgen --version

0 comments on commit cae6e4d

Please sign in to comment.