[Setup] Add support for editable mode
Context
Add support for editable/development mode build.
Basically reported necessary changes for supporting build in development mode with:
Refer to same changes done in aidge_core merge request aidge_core!154 (merged)
Modified files
Modified:
- setup.py: account for editable mode and pass python module installation directory to cmake, remove useless copy of module now directly installed by cmake
- cmake: add installation of python module
- README.md: add short description and refer to aidge_core README for details
Detailed major modifications
No incompatible modification. Add new support for development mode.
TODO
Nope
Merge request reports
Activity
Hi @gregkub, this one reports support for editable/development mode in aidge_backend_cpu.
added 21 commits
-
093fa7e5...10ef1960 - 20 commits from branch
eclipse/aidge:dev
- 7ba8d2ab - [Setup] Add support for editable mode
-
093fa7e5...10ef1960 - 20 commits from branch
added Enhancement ⭐ label
added 3 commits
-
7ba8d2ab...44c25e9d - 2 commits from branch
eclipse/aidge:dev
- a0c740e3 - [Setup] Add support for editable mode
-
7ba8d2ab...44c25e9d - 2 commits from branch
added 10 commits
-
a0c740e3...aa30d4b3 - 9 commits from branch
eclipse/aidge:dev
- fc645f01 - [Setup] Add support for editable mode
-
a0c740e3...aa30d4b3 - 9 commits from branch
assigned to @gregkub
assigned to @cguillon
requested review from @cguillon
unassigned @gregkub
requested review from @gregkub
86 89 os.chdir(str(cwd)) 87 90 88 aidge_package = build_lib / (get_project_name()) 89 90 # Get "aidge core" package 91 # ext_lib = build_temp 92 print(build_temp.absolute()) 93 # Copy all shared object files from build_temp/lib to aidge_package 94 for root, _, files in os.walk(build_temp.absolute()): 95 for file in files: 96 if (file.endswith(".so") or file.endswith(".pyd")) and ( 97 root != str(aidge_package.absolute()) 98 ): 99 currentFile = os.path.join(root, file) 100 shutil.copy(currentFile, str(aidge_package.absolute())) 101 - Comment on lines -88 to -101
Dummy me didn't see this on aidge_core!154 (diffs) but come that this doesn't break the pkg ? If I understand your modification this means that this process is automatic and these lines were useless ?
Otherwise everything looks good, I'll merge tomorrow morning just leaving you time to answer here!
Thanks in advance :)
Edited by Grégoire Kubler Actually it is in aidge_core diffs there: aidge_core!154 (diffs)
Indeed, as briefly mentioned in the description of this MR
cmake: add installation of python module
, the cmake build system now installs itself the python binding module (as done in aidge_core since aidge_core!154 (merged)). There is no need to add post installation stuff anymore in thesetup.py
.The installation path for the python bindoing module is set in the setup script though the cmake var
PYBIND_INSTALL_PREFIX
there !80 (diffs)
enabled an automatic merge when the pipeline for fc645f01 succeeds
mentioned in commit 290e8042