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

Rewrite Debian/Ubuntu packaging #24

Merged
merged 3 commits into from
Nov 3, 2022
Merged

Conversation

stephankramer
Copy link
Contributor

To avoid having to deal with the setup.py install vagueries when installing python for Debian packaging, let pybuild take care of the building and installing of python. Rewrite debian/rules to make use of debhelper for as much as possible and minimize hackery. Also remove Debian-packaging-specific hacks in Makefile.in

The recipe we are now following is to install everything in debian/tmp (instead of straight into the debian// directories), and divide the resulting files up over the packages using debian/<package.install> files. Try to clean up some Lintin errors and warnings in the process.

Note that we are still using distutils in the setup.py files and calling "python setup.py install" which are both deprecated. Only this combination appears to not be hit by pypa/pip#10978 so just leaving as is.

Also introduces:

  • testing on both Focal and Jammy
  • fix intermittent test failure in build process

To avoid having to deal with the setup.py install vagueries when installing python for Debian packaging, let pybuild take care of the building and installing of python. Rewrite debian/rules to make use of debhelper for as much as possible and minimize hackery. Also remove Debian-packaging-specific hacks in Makefile.in

The recipe we are now following is to install everything in debian/tmp (instead of straight into the debian/<package>/ directories), and divide the resulting files up over the packages using debian/<package.install> files. Try to clean up some Lintin errors and warnings in the process.

Note that we are still using distutils in the setup.py files and calling
"python setup.py install" which are both deprecated. Only this
combination appears to not be hit by pypa/pip#10978
so just leaving as is.

Also introduces:
* testing on both Focal and Jammy
* fix intermittent test failure in build process
Copy link
Contributor

@cianwilson cianwilson left a comment

Choose a reason for hiding this comment

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

Looks great. This is a huge improvement and will help me immensely on a few machines where I've run into problems with this already. Thanks @stephankramer !

Couple of quick questions in the comments but happy to approve regardless.

@@ -22,7 +38,7 @@ jobs:
run: |
echo "Europe/London" > /etc/timezone
apt-get -y update
DEBIAN_FRONTEND=noninteractive apt-get -y install gfortran g++ python3-setuptools python3-all-dev debhelper dh-python texlive python3-junit.xml
DEBIAN_FRONTEND=noninteractive apt-get -y install gfortran g++ python3-setuptools python3-pip python3-all-dev debhelper dh-python texlive python3-junit.xml
Copy link
Contributor

Choose a reason for hiding this comment

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

Not a problem but curious if the pip installation is still necessary or leftover from when you were trying it that way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed now

debian/control Outdated
Priority: extra
Build-Depends: gfortran (>=4.2), g++ (>=4.2), python3-setuptools (>= 0.6b3-1), python3-all-dev (>= 2.3.5-11), debhelper (>= 5.0.38), dh-python, texlive
Priority: optional
Build-Depends: gfortran (>=4.2), g++ (>=4.2), python3-setuptools (>= 39), python3-pip, python3-all-dev , debhelper (>= 5.0.38), dh-python, texlive
Copy link
Contributor

Choose a reason for hiding this comment

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

Same question about pip, is it a required dependency?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No indeed. Removed

Also update actions versions to get rid of github actions warnings
@stephankramer stephankramer force-pushed the fix-package-building branch 7 times, most recently from 368b636 to 7877ed7 Compare November 2, 2022 12:02
@stephankramer
Copy link
Contributor Author

Thanks, good point.
In the mean time I've also added testing of the package building to the actions CI

Copy link
Contributor

@cianwilson cianwilson left a comment

Choose a reason for hiding this comment

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

Looks good!

@stephankramer stephankramer merged commit 0f2d365 into main Nov 3, 2022
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.

2 participants