Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D dune-common
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 97
    • Issues 97
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 55
    • Merge requests 55
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Core ModulesCore Modules
  • dune-common
  • Merge requests
  • !1148

Refactor python package installation

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Santiago Ospina De Los Ríos requested to merge 310-dune_python_install_package-can-only-install-packages-without-setup-py into master Jun 14, 2022
  • Overview 63
  • Commits 13
  • Pipelines 25
  • Changes 10

What does this MR do?

This MR is a refactor of the CMake function dune_python_install_package. The function has many responsibilities that conflict with the initial intention of the function but are needed to properly configure the python bindings. So in this MR we (@andreas.dedner, @samuel.burbulla, and @santiago.ospina) identify such responsibilities and split them into separate functions. That is:

  • dune_python_configure_dependencies: Installs dependencies at configure time for a project with a setup.py file. This is done by extracting a requirements file and installing them explicitely.
  • dune_link_dune_py: Create the metadata in the python package. This function effectively glues a python package with the dune-py project running the bindings. Additionally, it provides a setup.py if none is given (a typical use case of dune bindings).
  • dune_python_configure_package: Configures dependencies (with dune_python_configure_dependencies) and installs a project having a setup.py at configure time (notice that we opted to include !1103 (closed) directly here). Package installation is done without internet since the package is available locally and dependencies have been already fulfilled.
  • dune_python_configure_bindings: Combines dune_python_configure_package and dune_link_dune_py for easy set-up of the dune python bindings.
  • dune_python_install_package: Legacy command for installing packages. Should be deprecated in favor of dune_python_configure_package and dune_python_configure_bindings.

What does this MR solves?

With the current state, only one python package can be configured/installed with this function, namely, the dune python bindings. This was not the initial intention of the function and conflicts with other use cases on downstream projects before Dune 2.8. So, this refactor, allows to pick the correct use-case of the python package and keep both intended uses available.

  • Add CHANGELOG entry

Closes #310 (closed)

Edited Jul 18, 2022 by Santiago Ospina De Los Ríos
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: 310-dune_python_install_package-can-only-install-packages-without-setup-py