Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
b861055
feat(event-loop): implement `setInterval`
Xmader Mar 27, 2024
bb55507
rename variable
Xmader Apr 10, 2024
50710e8
next operator function in for JSObjectProxy
philippedistributive Apr 8, 2024
3b51b7e
introducing JS proxy for Python iterator type
philippedistributive Apr 8, 2024
b14f901
improved memory management
philippedistributive Apr 8, 2024
b088419
produce pythonish result for next operator in python context
philippedistributive Apr 9, 2024
23ed662
improved naming
philippedistributive Apr 9, 2024
9a349fe
pyIterableProxyHandler case implemented
philippedistributive Apr 9, 2024
daa34e1
comment fix
philippedistributive Apr 9, 2024
8edd73e
improved condition test order
philippedistributive Apr 9, 2024
551963f
improved naming
philippedistributive Apr 9, 2024
3c73822
extra line removed
philippedistributive Apr 9, 2024
ddb6226
fix(event-loop): memory bug preventing more `setInterval`/`setTimeout…
Xmader Apr 10, 2024
c1929d7
refactor(event-loop): only the timer's `handleId` is needed
Xmader Apr 10, 2024
153d35f
fix(event-loop): `setInterval` timer should continue running regardle…
Xmader Apr 10, 2024
794823e
fix(event-loop): `clearInterval` not working when called inside a `se…
Xmader Apr 10, 2024
7fe3518
fix(event-loop): timer `.ref()` should noop if the timer is finished …
Xmader Apr 10, 2024
c5b1dfd
feat(event-loop): throw an error when user trying to call the unimple…
Xmader Apr 11, 2024
421b7e2
improved naming
philippedistributive Apr 10, 2024
1325764
clarified docs
philippedistributive Apr 10, 2024
9f81a3b
fix(pmjs): `pmjs -e`/`pmjs -p` should be able to call functions that …
Xmader Apr 11, 2024
edb97cf
fix(pmjs): `pmjs -p` should be printing from the JS side
Xmader Apr 11, 2024
071c99b
test(event-loop): write tests for setInterval & clearInterval
Xmader Apr 11, 2024
38b2486
Update tests/js/set-interval.bash
Xmader Apr 11, 2024
c8897d2
fix English
Xmader Apr 11, 2024
4cddf2a
test(event-loop): write tests to make sure the event-loop won't be ac…
Xmader Apr 11, 2024
5f59d91
perf(event-loop): memory management
Xmader Apr 11, 2024
ecb2f2a
perf(event-loop): reference count for the job function
Xmader Apr 11, 2024
ac9fc07
oops, typo
Xmader Apr 11, 2024
d34fb3d
chore: do not try to update dependencies by poetry when running the V…
Xmader Apr 11, 2024
5ad50e5
style: whitespace autoformat
Xmader Apr 12, 2024
b8659d7
fix(event-loop): `.unref()` doesn't work for `setInterval` timers
Xmader Apr 12, 2024
bf8e6e3
test(event-loop): testing `.unref()` on `setInterval` timers
Xmader Apr 12, 2024
2402982
for of now works with iterable
philippedistributive Apr 15, 2024
00ac112
improved naming
philippedistributive Apr 15, 2024
6611fcf
chore(warnings): remove obsolete doxygen tags
zollqir Apr 16, 2024
384e5be
chore(warnings): remove nested comment in PyDictProxyHandler
zollqir Apr 16, 2024
88fcce3
chore(meta): fix Spidermonkey check during compilation
zollqir Apr 22, 2024
d4c9223
chore(meta): implement linting git commit hook
zollqir Apr 22, 2024
9809334
chore(meta): add autopep8 to the pre-commit hook
zollqir Apr 23, 2024
73e5772
chore(meta): add eslint to the pre-commit hook
zollqir Apr 23, 2024
3b69bfe
chore(meta): add uncrustify to the pre-commit hook
zollqir Apr 23, 2024
eb06ea9
chore(meta): only call pre-commit hook linter on newly changed files
zollqir Apr 22, 2024
b7d6182
chore(build): fix invalid-offsetof warnings from SpiderMonkey
zollqir Apr 23, 2024
ea30c36
chore(docs): JavaScript is not support by Doxygen
zollqir Apr 23, 2024
7fd3bd4
chore(docs): fix Doxygen documentation warnings
zollqir Apr 23, 2024
f0a07c8
feat(meta): implement new build options
zollqir Apr 23, 2024
1ee8cdf
chore(ExceptionType): suppress zero-length format string warning in t…
zollqir Apr 23, 2024
546d0ce
chore(JSFunctionProxy): use return value of JS::RootedVector::append …
zollqir Apr 23, 2024
b578c83
Merge branch 'main' into caleb/build/overhaul
zollqir Apr 23, 2024
fd92e06
chore(docs): add missing documentation for function parameters
zollqir Apr 23, 2024
7bfed2b
feat(build): implement seperate build systems
zollqir Apr 23, 2024
58cd4b4
chore(linting): lint all C++ files
zollqir Apr 23, 2024
16dc315
chore(linting): lint all JavaScript files
zollqir Apr 23, 2024
aae30e8
chore(linting): lint all python files
zollqir Apr 23, 2024
494cf7c
fix(build): fix new build system on Windows
zollqir Apr 24, 2024
f510aad
build Release builds in CI
zollqir Apr 24, 2024
5d81f49
feat(CI): add per-OS debugging in CI, and include macos-11
zollqir Apr 24, 2024
c0e75ba
feat(build): make build types case-insensitive
zollqir Apr 24, 2024
03ae565
use consistent formatting in Makefile
zollqir Apr 24, 2024
834066e
chore(docs): document how to disable pre-commit hook
zollqir Apr 24, 2024
9fae482
fix(CI): fix syntax error in workflow file
zollqir Apr 24, 2024
9854368
fix(build): fix bug where it was not possible to disable building docs
zollqir Apr 24, 2024
3206737
fix(build): use multi-config generator on windows, and single- on unix
zollqir Apr 24, 2024
c6c98e6
chore(docs): fix comment on PyDictProxyHandler::enumerate
zollqir Apr 24, 2024
a9c41f9
chore(typo): fix typo in setup.sh echo
zollqir Apr 24, 2024
1dd16d5
chore(jsTypeFactory): remove duplicate if block from messy merge
zollqir Apr 24, 2024
19b99c4
chore(test): remove commented code from print-load.js
zollqir Apr 24, 2024
db77a13
fix(build): fix Windows build config
zollqir Apr 24, 2024
f29d8aa
chore(docs): remove unused directory from Doxyfile INPUT
zollqir Apr 24, 2024
097b182
chore(meta): add git-blame-ignore-revs file
zollqir Apr 30, 2024
27e26a7
fix(cmake): fix compilation flags on Windows
zollqir Apr 30, 2024
02a2f9f
Merge branch 'main' into caleb/build/overhaul
zollqir Apr 30, 2024
e83e0de
chore(CI): add CI debugging for build types
zollqir Apr 30, 2024
8220674
chore(CI): add Debug fallback build type in CI
zollqir Apr 30, 2024
a65fcfa
chore(meta): fix compilation warnings on Windows
zollqir Apr 30, 2024
ff85b28
fix(CI): fix Debug Windows build in CI
zollqir Apr 30, 2024
8c700e4
chore(CI): fix Debug builds on Windows in CI
zollqir Apr 30, 2024
be716c7
Merge branch 'caleb/build/overhaul' of github.com:Distributive-Networ…
philippedistributive Apr 30, 2024
e525634
chore(meta): fix Windows builds
zollqir Apr 30, 2024
469c595
Merge branch 'caleb/build/overhaul' of github.com:Distributive-Networ…
philippedistributive Apr 30, 2024
844f858
update aiohttp
philippedistributive Apr 30, 2024
63d6181
chore(meta): fix BUILD_DOCS unused variable warning
zollqir Apr 30, 2024
140c510
chore(meta): fix CMake CMP0148 warning
zollqir Apr 30, 2024
93427a7
Merge branch 'caleb/build/overhaul' of github.com:Distributive-Networ…
zollqir Apr 30, 2024
6fb0195
chore(CI): remove symlinking of debug python files on Windows CI
zollqir May 1, 2024
47cb5be
chore(CI): remove macos-11 from CI
zollqir May 1, 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
8 changes: 8 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# chore(linting): lint all python files
aae30e864449442cf0b04e94f8a242b1b667de9a

# chore(linting): lint all JavaScript files
16dc3153b3cb684ca72445ed058babc8f5d97f42

# chore(linting): lint all C++ files
58cd4b45777b046f03a63255c1d93e289e1cab5e
65 changes: 43 additions & 22 deletions .github/workflows/test-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,38 @@ on:
workflow_call:
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
debug_enabled_os:
type: choice
description: Optionally, choose an OS to run the build with SSH debugging on (https://github.com/fawazahmed0/action-debug)
required: false
default: false
dump_cores:
type: boolean
description: 'Include core dumps in CI artifacts'
options:
- ''
- 'ubuntu-20.04'
- 'macos-12'
- 'macos-13'
- 'macos-14'
- 'windows-2019'
debug_enabled_python:
type: choice
description: Choose a Python version to run the build with SSH debugging on
required: false
default: false
options:
- ''
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
build_type:
type: choice
description: 'Choose the build type to use'
required: false
default: 'Debug'
options:
- 'Debug'
- 'Profile'
- 'DRelease'
- 'Release'
pull_request:

env:
Expand Down Expand Up @@ -100,11 +122,10 @@ jobs:
fail-fast: false
matrix:
# The lowest supported version is Ubuntu 20.04 + Python 3.8 or macOS 12 + Python 3.9
os: [ 'ubuntu-20.04', 'macos-12', 'windows-2019', 'macos-14' ]
os: [ 'ubuntu-20.04', 'macos-12', 'macos-13', 'macos-14', 'windows-2019' ]
python_version: [ '3.8', '3.9', '3.10', '3.11', '3.12' ]
exclude:
# macOS 12 comes with Python 3.9 by default, so we drop ci support for Python 3.8 on macOS
# FIXME: We can't build on macOS 11 for now because our prebuilt `uncrustify` binary requires macOS 12
- os: 'macos-12'
python_version: '3.8'
# actions/setup-python: The version '3.8'/'3.9' with architecture 'arm64' was not found for macOS.
Expand Down Expand Up @@ -165,7 +186,8 @@ jobs:
- name: Build wheel
run: |
echo $(poetry run python --version)
poetry build --format=wheel
WORKFLOW_BUILD_TYPE=${{ inputs.build_type }}
BUILD_TYPE=${WORKFLOW_BUILD_TYPE:-"Debug"} poetry build --format=wheel
ls -lah ./dist/
- name: Upload wheel as CI artifacts
uses: actions/upload-artifact@v3
Expand All @@ -179,7 +201,7 @@ jobs:
name: docs-${{ github.run_id }}-${{ github.sha }}
path: ./build/docs/html/
- name: Set cores to get stored in /cores
if: ${{ matrix.os != 'windows-2019' && github.event_name == 'workflow_dispatch' && inputs.dump_cores }}
if: ${{ matrix.os != 'windows-2019' }}
# TODO (Caleb Aikens) figure out how to get Windows core dumps
run: |
sudo mkdir -p /cores
Expand All @@ -196,7 +218,8 @@ jobs:
# TODO (Caleb Aikens) figure out how to get Windows core dumps
ulimit -c unlimited
fi
poetry run python -m pip install --force-reinstall --verbose ./dist/*
WORKFLOW_BUILD_TYPE=${{ inputs.build_type }}
BUILD_TYPE=${WORKFLOW_BUILD_TYPE:-"Debug"} poetry run python -m pip install --force-reinstall --verbose ./dist/*
poetry run python -m pytest tests/python
- name: Run JS tests (peter-jr)
if: ${{ (success() || failure()) }}
Expand All @@ -206,20 +229,18 @@ jobs:
ulimit -c unlimited
fi
poetry run bash ./peter-jr ./tests/js/
- name: SSH debug session
if: ${{ (success() || failure()) && github.event_name == 'workflow_dispatch' && inputs.debug_enabled_os == matrix.os && inputs.debug_enabled_python == matrix.python_version}}
uses: fawazahmed0/action-debug@main
with:
credentials: "admin:admin"
- name: Upload core dumps as CI artifacts
uses: actions/upload-artifact@v3
if: ${{ matrix.os != 'windows-2019' && github.event_name == 'workflow_dispatch' && inputs.dump_cores }}
if: ${{ matrix.os != 'windows-2019' && failure() }}
# TODO (Caleb Aikens) figure out how to get Windows core dumps
with:
name: cores-${{ matrix.os }}-${{ matrix.python_version }}
path: /cores
# Enable tmate debugging of manually-triggered workflows if the input option was provided
- name: SSH debug session
if: ${{ (success() || failure()) && github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
uses: mxschmitt/action-tmate@v3
with:
detached: true
limit-access-to-actor: true
sdist:
runs-on: ubuntu-20.04
steps:
Expand All @@ -236,7 +257,7 @@ jobs:
- name: Build source distribution (sdist) file
run: |
poetry self add "poetry-dynamic-versioning[plugin]"
poetry build --format=sdist
BUILD_DOCS=1 BUILD_TYPE=Release poetry build --format=sdist
ls -lah ./dist/
- name: Upload sdist as CI artifacts
uses: actions/upload-artifact@v3
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ firefox-*/
__pycache__
Testing/Temporary
_spidermonkey_install
uncrustify-*.tar.gz
uncrustify-*/
uncrustify
*.uncrustify
__pycache__/*
dist
*.so
Expand Down
91 changes: 59 additions & 32 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,9 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Add an external; appends to `PYTHONMONKEY_EXTERNAL_FILES` in the parent scope.
function(pythonmonkey_add_external PYTHONMONKEY_EXTERNAL)
add_subdirectory("cmake/externals/${PYTHONMONKEY_EXTERNAL}")
set(PYTHONMONKEY_EXTERNAL_FILE "cmake/externals/${PYTHONMONKEY_EXTERNAL}/CMakeLists.txt")
source_group(
TREE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/externals/${PYTHONMONKEY_EXTERNAL}"
PREFIX "Externals\\${PYTHONMONKEY_EXTERNAL}"
FILES "${PYTHONMONKEY_EXTERNAL_FILE}"
)
list(APPEND PYTHONMONKEY_EXTERNAL_FILES "${PYTHONMONKEY_EXTERNAL_FILE}")

set(PYTHONMONKEY_EXTERNAL_FILES ${PYTHONMONKEY_EXTERNAL_FILES} PARENT_SCOPE)
endfunction()

file (GLOB SOURCE_FILES "src/*.cc" "src/internalBinding/*.cc") # Find all C++ files in the src directory
file (GLOB HEADER_FILES "include/*.hh") # Find all header files in the include directory
file (GLOB PYTHON_FILES "python/*.cc" "python/*.hh") # Find all the python bindings in the python directory
file (GLOB_RECURSE HEADER_FILES "include/*.hh") # Find all header files in the include directory and below
file (GLOB_RECURSE SOURCE_FILES "src/*.cc") # Find all C++ files in the src directory and below


include_directories(${CMAKE_CURRENT_LIST_DIR})

Expand All @@ -43,8 +29,50 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
### Code block from: https://cliutils.gitlab.io/modern-cmake/chapters/projects/submodule.html
include(FetchContent)

SET(COMPILE_FLAGS "-ggdb -Ofast -fno-rtti") # optimize but also emit debug symbols
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_FLAGS} $ENV{EXTRA_CMAKE_CXX_FLAGS}")
if (WIN32)
SET(COMPILE_FLAGS "/GR- /W0")

SET(OPTIMIZED "/O2")
SET(UNOPTIMIZED "/Od")
SET(KEEP_SYMBOLS "/DEBUG:FULL")
SET(STRIP_SYMBOLS "/DEBUG:NONE")
SET(PROFILE "/PROFILE")
else()
SET(COMPILE_FLAGS "-fno-rtti -Wno-invalid-offsetof")

SET(OPTIMIZED "-Ofast -DNDEBUG")
SET(UNOPTIMIZED "-O0")
SET(KEEP_SYMBOLS "-ggdb")
SET(STRIP_SYMBOLS "-s")
SET(PROFILE "-pg")
endif()
SET(PROFILE_FLAGS "${UNOPTIMIZED} ${KEEP_SYMBOLS} ${PROFILE}")
SET(DEBUG_FLAGS "${UNOPTIMIZED} ${KEEP_SYMBOLS}")
SET(DRELEASE_FLAGS "${OPTIMIZED} ${KEEP_SYMBOLS}")
SET(RELEASE_FLAGS "${OPTIMIZED} ${STRIP_SYMBOLS}")

if(GENERATOR_IS_MULTI_CONFIG)
set(CMAKE_CONFIGURATION_TYPES "Profile;Debug;DRelease;Release" CACHE STRING "" FORCE)
string(APPEND COMPILE_FLAGS "$<$<CONFIG:Profile>:${PROFILE_FLAGS}> $<$<CONFIG:Debug>:${DEBUG_FLAGS}> $<$<CONFIG:DRelease>:${DRELEASE_FLAGS}> $<$<CONFIG:Release>:${RELEASE_FLAGS}>")
else()
set_property(CACHE PM_BUILD_TYPE PROPERTY HELPSTRING "Choose the type of build")
set_property(CACHE PM_BUILD_TYPE PROPERTY STRINGS "Profile;Debug;DRelease;Release")
if(PM_BUILD_TYPE STREQUAL "Profile")
list(APPEND COMPILE_FLAGS "${PROFILE_FLAGS}")
elseif(PM_BUILD_TYPE STREQUAL "Debug")
list(APPEND COMPILE_FLAGS "${DEBUG_FLAGS}")
elseif(PM_BUILD_TYPE STREQUAL "DRelease")
list(APPEND COMPILE_FLAGS "${DRELEASE_FLAGS}")
else() #Release build
message("PM_BUILD_TYPE not detected or invalid value, defaulting to Release build.")
set(PM_BUILD_TYPE Release CACHE STRING "" FORCE)
list(APPEND COMPILE_FLAGS "${RELEASE_FLAGS}")
endif()
message("PythonMonkey build type is: ${PM_BUILD_TYPE}")
list(JOIN COMPILE_FLAGS " " COMPILE_FLAGS)
endif()

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COMPILE_FLAGS}")

set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules)
if(APPLE)
Expand All @@ -55,36 +83,35 @@ if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
set(PYTHONLIBS_VERSION_STRING ${Python_VERSION})
set(PYTHON_INCLUDE_DIR ${Python_INCLUDE_DIRS})
set(PYTHON_LIBRARIES ${Python_LIBRARIES})
message("Apple - Using Python:${Python_VERSION_MAJOR} - Libraries:${PYTHON_LIBRARIES} - IncludeDirs: ${PYTHON_INCLUDE_DIR}")
elseif(UNIX)
find_package(Python 3.8 COMPONENTS Interpreter Development REQUIRED)
set(Python_FIND_VIRTUALENV FIRST) # (require cmake >= v3.15 and this is the default) use the Python version configured by pyenv if available
set(PYTHON_LIBRARIES ${Python_LIBRARIES})
set(PYTHON_INCLUDE_DIR ${Python_INCLUDE_DIRS})
message("Linux - Using Python:${Python_VERSION_MAJOR}.${Python_VERSION_MINOR} - Libraries:${PYTHON_LIBRARIES} - IncludeDirs: ${PYTHON_INCLUDE_DIR}")
find_package(SpiderMonkey REQUIRED)
elseif(WIN32)
find_package(PythonInterp 3.8 REQUIRED)
find_package(PythonLibs 3.8 REQUIRED)
find_package(Python 3.8 COMPONENTS Interpreter Development REQUIRED)
set(Python_FIND_VIRTUALENV FIRST) # (require cmake >= v3.15 and this is the default) use the Python version configured by pyenv if available
set(PYTHON_LIBRARIES ${Python_LIBRARIES})
set(PYTHON_INCLUDE_DIR ${Python_INCLUDE_DIRS})
find_package(SpiderMonkey REQUIRED)
set(PYTHONLIBS_VERSION_STRING $ENV{PY_VERSION})
endif()
include_directories(${PYTHON_INCLUDE_DIRS})
message("${CMAKE_SYSTEM_NAME} - Using Python:${Python_VERSION} - Libraries:${Python_LIBRARIES} - IncludeDirs: ${Python_INCLUDE_DIRS}")
include_directories(${Python_INCLUDE_DIRS})
include_directories(${SPIDERMONKEY_INCLUDE_DIR})

# Add doxygen if this is the main app
find_package(Doxygen)
if(Doxygen_FOUND)
option(BUILD_DOCS "Build documentation" OFF)
if(BUILD_DOCS)
find_package(Doxygen)
if(Doxygen_FOUND)
add_subdirectory(cmake/docs)
else()
else()
message(STATUS "Doxygen not found. Not building docs.")
endif()
endif()

endif()

# Add compiled folder directories
add_subdirectory(src)

pythonmonkey_add_external("uncrustify")
pythonmonkey_add_external("autopep8")
add_subdirectory(cmake/format)
34 changes: 23 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,37 @@
# @date March 2024
#

BUILD = debug
BUILD = Debug # (case-insensitive) Release, DRelease, Debug, or Profile
DOCS = false
VERBOSE = true
PYTHON = python3
RUN = poetry run
RUN = poetry run

PYTHON_BUILD_ENV = VERBOSE=1 EXTRA_CMAKE_CXX_FLAGS="$(EXTRA_CMAKE_CXX_FLAGS)"
OS_NAME := $(shell uname -s)

ifeq ($(OS_NAME),Linux)
CPU_COUNT=$(shell cat /proc/cpuinfo | grep -c processor)
MAX_JOBS=10
CPU_COUNT = $(shell cat /proc/cpuinfo | grep -c processor)
MAX_JOBS = 10
CPUS := $(shell test $(CPU_COUNT) -lt $(MAX_JOBS) && echo $(CPU_COUNT) || echo $(MAX_JOBS))
PYTHON_BUILD_ENV += CPUS=$(CPUS)
endif

EXTRA_CMAKE_CXX_FLAGS = -Wno-invalid-offsetof $(JOBS)
ifeq ($(BUILD),Profile)
PYTHON_BUILD_ENV += BUILD_TYPE=Profile
else ifeq ($(BUILD),Debug)
PYTHON_BUILD_ENV += BUILD_TYPE=Debug
else ifeq ($(BUILD),DRelease)
PYTHON_BUILD_ENV += BUILD_TYPE=DRelease
else # Release build
PYTHON_BUILD_ENV += BUILD_TYPE=Release
endif

ifeq ($(DOCS),true)
PYTHON_BUILD_ENV += BUILD_DOCS=1
endif

ifeq ($(BUILD),debug)
EXTRA_CMAKE_CXX_FLAGS += -O0
ifeq ($(VERBOSE),true)
PYTHON_BUILD_ENV += VERBOSE=1
endif

.PHONY: build test all clean debug
Expand All @@ -37,10 +50,9 @@ all: build test
clean:
rm -rf build/src/CMakeFiles/pythonmonkey.dir
rm -f build/src/pythonmonkey.so
rm -f python/pythonmonkey.so
rm -f python/pythonmonkey/pythonmonkey.so

debug:
@echo EXTRA_CMAKE_CXX_FLAGS=$(EXTRA_CMAKE_CXX_FLAGS)
@echo JOBS=$(JOBS)
@echo CPU_COUNT=$(CPU_COUNT)
@echo OS_NAME=$(OS_NAME)
@echo OS_NAME=$(OS_NAME)
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ Read this if you want to build a local version.
- [Poetry](https://python-poetry.org/docs/#installation)
- [poetry-dynamic-versioning](https://github.com/mtkennerly/poetry-dynamic-versioning)

2. Run `poetry install`. This command automatically compiles the project and installs the project as well as dependencies into the poetry virtualenv.
2. Run `poetry install`. This command automatically compiles the project and installs the project as well as dependencies into the poetry virtualenv. If you would like to build the docs, set the `BUILD_DOCS` environment variable, like so: `BUILD_DOCS=1 poetry install`.
PythonMonkey supports multiple build types, which you can build by setting the `BUILD_TYPE` environment variable, like so: `BUILD_TYPE=Debug poetry install`. The build types are (case-insensitive):
- `Release`: stripped symbols, maximum optimizations (default)
- `DRelease`: same as `Release`, except symbols are not stripped
- `Debug`: minimal optimizations
- `Profile`: same as `Debug`, except profiling is enabled

If you are using VSCode, you can just press <kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>B</kbd> to [run build task](https://code.visualstudio.com/docs/editor/tasks#_custom-tasks) - We have [the `tasks.json` file configured for you](.vscode/tasks.json).

Expand Down
Loading