-
Notifications
You must be signed in to change notification settings - Fork 186
Packaging debian #715
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
Packaging debian #715
Conversation
In order to build this debian package, python3-hightime debian package should be installed first. |
What is the benefit of installing a Python package from a distro package manager and not pip? |
The risk with pip is that it may upgrade python packages to newer version that the version in apt. Thus it may break other packages or python based software of the distro. I don't like the idea of having to package managers interfering. When using apt you know the dependencies will be resolved using the repositories declared in apt (in my case ubuntu and ni). Allowing user to install via apt doesn't forbid others to install via pip. It's just another feature. |
Do you mean My biggest concern here is that how do we ensure that any given release of But... I might not be understanding something correctly. |
@zhindes Debian no longer allows installing 3rd party dependencies into the system Python. If you try to do this, you get this error: https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-every-time-i-use-pip-3
The problem with using NI's recommended solution to this problem has been to use virtual environments and tooling such as Poetry that supports locking dependency versions, but in doing this you lose the convenience of installing into the system Python. apt installs dependencies and enforces versioning based on the constraints in the
We can include version constraints in the control file: https://stackoverflow.com/questions/59249194/debian-packaging-control-file-with-specific-version |
python3-deprecation, | ||
python3-pytest-mock, | ||
python3-pykka, | ||
python3-tzlocal, | ||
python3-decouple, | ||
python3-hightime, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The nidaqmx package uses deprecation, tzlocal, decouple, and hightime at run time, not only for build/tests. I expect to get ImportError without these installed.
python3-deprecation, | ||
python3-pytest-mock, | ||
python3-pykka, | ||
python3-tzlocal, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like Debian stable still has tzlocal 4.x: https://packages.debian.org/en/bookworm/python3-tzlocal
tzlocal broke compatibility in versions 4.0 and 5.0 ( https://pypi.org/project/tzlocal/ ) and we haven't tested nidaqmx with tzlocal 4.x. Do the nidaqmx tests pass with this version?
You started a really interesting conversation within NI, and we thank you. At this point, we don't have a strategy here. We think that Linux packages for Python components is important, but we're not certain how we want to execute on that. For now, if you wanted to package this up within Debian (similar to how one of our dependencies, python-tzlocal, is distributed), I don't think there would be a problem with that. I expect that in the future we'll have a coordinated approach for this across all of our Python packages. For now, we'd prefer not to accept contributions like this until we've figured it out. |
@zhindes |
TODO: Check the above box with an 'x' indicating you've read and followed CONTRIBUTING.md.
TODO: Check the above box with an 'x' if considered if there were any and then documented client facing changes in CHANGELOG.md. Strike through if this is not a relevant client facing change.
TODO: Check the above box with an 'x' indicating you have considered and added any applicable system or unit tests. Strike through if you considered and decided additional tests were not warranted.
What does this Pull Request accomplish?
Hello.
I added files allowing one to generate a .deb package for installing the library with apt.
Why should this Pull Request be merged?
This PR allows one to install nidaqmx-python without using pip. Maybe NI can add the .deb files to its own apt repository.
What testing has been done?