Skip to content

Commit

Permalink
updated gitpod with python3.11 (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vipul-Cariappa authored Jan 15, 2023
1 parent 02ba416 commit 5d5a593
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 27 deletions.
33 changes: 17 additions & 16 deletions .gitpod.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,27 +27,28 @@ RUN sudo apt-get update \
&& sudo rm -rf /var/lib/apt/lists/*

# downloading and extracting premake5
RUN sudo wget https://github.com/premake/premake-core/releases/download/v5.0.0-beta1/premake-5.0.0-beta1-linux.tar.gz \
&& sudo tar xzf premake-5.0.0-beta1-linux.tar.gz \
RUN sudo wget https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz \
&& sudo tar xzf premake-5.0.0-beta2-linux.tar.gz \
&& sudo mv premake5 /usr/bin \
&& sudo rm premake-5.0.0-beta1-linux.tar.gz
&& sudo rm premake-5.0.0-beta2-linux.tar.gz

# downloading qlibc and installing
RUN git clone https://github.com/wolkykim/qlibc.git \
&& cd qlibc \
&& ./configure --prefix=/usr/ \
&& make \
&& sudo make install \
&& cd .. \
&& rm -fr qlibc/
# NOTE: No longer a dependency
# RUN git clone https://github.com/wolkykim/qlibc.git \
# && cd qlibc \
# && ./configure --prefix=/usr/ \
# && make \
# && sudo make install \
# && cd .. \
# && rm -fr qlibc/

# downloading and installing python3.10 in debug mode
RUN wget https://www.python.org/ftp/python/3.10.7/Python-3.10.7.tar.xz \
&& tar -xf Python-3.10.7.tar.xz \
&& cd Python-3.10.7 \
&& ./configure --enable-shared --with-trace-refs --with-assertions --with-address-sanitizer --with-pydebug \
# downloading and installing python3.11 in debug mode
RUN wget https://www.python.org/ftp/python/3.11.1/Python-3.11.1.tar.xz \
&& tar -xf Python-3.11.1.tar.xz \
&& cd Python-3.11.1 \
&& ./configure --enable-shared --with-trace-refs --with-assertions --with-pydebug \
&& make \
&& sudo make altinstall \
&& sudo ldconfig $(pwd) \
&& cd .. \
&& rm Python-3.10.7.tar.xz
&& rm Python-3.11.1.tar.xz
12 changes: 6 additions & 6 deletions .gitpod.premake5.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ project "PyC"


filter "configurations:Debug"
includedirs { "/usr/include/python3.8", "/usr/include", "/usr/lib/llvm-12/include/" }
includedirs { "/usr/local/include/python3.11d", "/usr/include", "/usr/lib/llvm-12/include/" }
libdirs { "/usr/lib", "/usr/lib/llvm-12/lib/" }
links { "python3.8", "ffi", "clang-12" }
links { "python3.11d", "ffi", "clang-12" }
defines { "DEBUG" }
symbols "On"

filter "configurations:TestCoverage"
includedirs { "/usr/include/python3.8", "/usr/include", "/usr/lib/llvm-12/include/" }
includedirs { "/usr/local/include/python3.11d", "/usr/include", "/usr/lib/llvm-12/include/" }
libdirs { "/usr/lib", "/usr/lib/llvm-12/lib/" }
links { "python3.8", "ffi", "clang-12" }
links { "python3.11d", "ffi", "clang-12" }
buildoptions { "-ftest-coverage", "-fprofile-arcs" }
linkoptions { "-lgcov" }
defines { "DEBUG" }
Expand All @@ -33,9 +33,9 @@ project "PyC"
optimize "On"

filter "configurations:MemoryTest"
includedirs { "/usr/local/include/python3.10d", "/usr/include", "/usr/lib/llvm-12/include/" }
includedirs { "/usr/local/include/python3.11d", "/usr/include", "/usr/lib/llvm-12/include/" }
libdirs { "/usr/lib", "/usr/lib/llvm-12/lib/", "/usr/local/lib" }
links { "python3.10d", "ffi", "clang-12" }
links { "python3.11d", "ffi", "clang-12" }
buildoptions { "-fsanitize=address" }
defines { "DEBUG" }
symbols "On"
10 changes: 5 additions & 5 deletions .gitpod.run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ if ! gcc -g -Wall -shared -fPIC -I./tests/c/ -o tests/libcmodule.so tests/c/modu
fi

printf "\nRunning the tests\n"
if ! python3 tests/test.py ; then
if ! python3.11 -X dev -X showrefcount tests/test.py -v ; then
exit 1
fi

printf "\nBuilding PyC to Check Memory Leaks\n"

printf "\nBuilding PyC\n"
if ! make config=memorytest ; then
exit 1
fi
Expand All @@ -33,8 +34,7 @@ if ! cp ./bin/MemoryTest/libPyC.so ./tests/PyC.so ; then
exit 1
fi

printf "\nRunning tests to Check Memory Leaks\n"
if ! python3.10d tests/test.py ; then
printf "\nRunning the tests\n"
if ! LD_PRELOAD=/usr/lib/gcc/x86_64-linux-gnu/9/libasan.so python3.11 -X dev -X showrefcount tests/test.py -v ; then
exit 1
fi

0 comments on commit 5d5a593

Please sign in to comment.