Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add optional python dependencies to snap packaging #6317

Merged

Conversation

digitalrane
Copy link
Contributor

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file
  • Pull request includes a sign off

This PR adds the optional dependencies to snapcraft packaging, including required build and stage libraries to enable features such as PostgreSQL support.

NOTE: This is currently done by adding the '.[all]' requirement to the python-packages section of the snapcraft file, to avoid having to keep the snapcraft file up to date as dependencies change, and also to work around al imitation in snapcraft, noted in LP#1786939. Once this bug is fixed, then the method could be changed to use a supported snapcraft option to pull in additional dependencies based on the extras_require section of setup.py directly.

The additional stage and build packages are just used to ensure the required binary libraries which are needed by the optional dependencies are included in the resulting snap.

I have built and tested t his snap and am able to run a synapse instance using PostgreSQL as backing database based on these changes.

Signed-off-by: James Hebden [email protected]

@digitalrane digitalrane force-pushed the snapcraft-add-optional-deps branch 2 times, most recently from 50d920d to b80b9fe Compare November 2, 2019 20:47
@anoadragon453 anoadragon453 self-assigned this Nov 7, 2019
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks plausible. I don't think we need to pull in everything for postgres support, but as you say, it's mostly to not have the maintenance burden of a separate list of dependencies.

Very small change below, but otherwise looks good to me :) Thanks!

changelog.d/6317.misc Outdated Show resolved Hide resolved
@digitalrane digitalrane force-pushed the snapcraft-add-optional-deps branch from b80b9fe to 71b82fd Compare November 7, 2019 19:42
@digitalrane
Copy link
Contributor Author

Thanks for the review! I've updated the changelog entry to meet requirements.

@anoadragon453
Copy link
Member

Looks good, thank you!

@anoadragon453 anoadragon453 merged commit 53b6559 into matrix-org:develop Nov 14, 2019
@digitalrane digitalrane deleted the snapcraft-add-optional-deps branch February 27, 2020 20:03
babolivier pushed a commit that referenced this pull request Sep 1, 2021
* commit '53b6559a8':
  Add optional python dependencies to snap packaging (#6317)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants