Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate python to use pyproject.toml #1202

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

tfcollins
Copy link
Contributor

PR Description

This PR addresses #1201 and more improvements. This includes a change away from the CMake install mechanism used for the python bindings which has been historically error prone. Debian for example does not want you to install python packages like we are doing with CMake. Changes include CI updates with testing

PR Type

  • Bug fix (a change that fixes an issue)
  • New feature (a change that adds new functionality)
  • Breaking change (a change that affects other repos or cause CIs to fail)

PR Checklist

  • I have conducted a self-review of my own code changes
  • I have commented new code, particulary complex or unclear areas
  • I have checked that I did not intoduced new warnings or errors (CI output)
  • I have checked that components that use libiio did not get broken
  • I have updated the documentation accordingly (GitHub Pages, READMEs, etc)

Installing python through CMake is very error prone and should only be
done through pip or similar package manager. User tend to install it
with sudo which tends to make the bindings inaccessible.

Signed-off-by: Travis F. Collins <[email protected]>
[project.urls]
homepage = "https://analogdevicesinc.github.io/libiio/"
documentation = "https://analogdevicesinc.github.io/libiio/"
repository = "https://github/analogdevicesinc/libiio"
Copy link
Contributor

Choose a reason for hiding this comment

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

you must have meant github.com here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Replace old setup.py with project.toml and move single file module to
subfolder. setuptools does not support single file modules; therefore,
we need to use a subfolder for packaging

Signed-off-by: Travis F. Collins <[email protected]>
Make error helpful when python cannot find the libiio C library

Signed-off-by: Travis F. Collins <[email protected]>
Copy link
Contributor

@nunojsa nunojsa left a comment

Choose a reason for hiding this comment

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

LGTM... just one minor, nit comment

sudo ldconfig
cd ..

- name: Build and test Python bindings
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: The "and test" seems redundant to me given the next step

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

Signed-off-by: Travis F. Collins <[email protected]>
Signed-off-by: Travis F. Collins <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants