Skip to content
Snippets Groups Projects

[Setup] Add support for editable mode

1 unresolved thread

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

Edited by Christophe Guillon

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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 the setup.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)

  • Ok perfect ! thanks for the clarity. I'll merge :)

  • Please register or sign in to reply
  • Grégoire Kubler approved this merge request

    approved this merge request

  • Grégoire Kubler enabled an automatic merge when the pipeline for fc645f01 succeeds

    enabled an automatic merge when the pipeline for fc645f01 succeeds

  • mentioned in commit 290e8042

  • Please register or sign in to reply
    Loading