Skip to content

Commit

Permalink
Update PPA build rules, use pybuild, update changelog for 2.3.1
Browse files Browse the repository at this point in the history
… (stable) and `3.0.0` (daily) (#132)
  • Loading branch information
misl6 authored Dec 26, 2024
1 parent f0befdf commit 287c62a
Show file tree
Hide file tree
Showing 16 changed files with 66 additions and 155 deletions.
6 changes: 0 additions & 6 deletions linux/debian/daily/changelog
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
kivy (2.3.1-dev) UNRELEASED; urgency=medium

* update to new release

-- Mirko Galimberti <[email protected]> Sat, 16 Nov 2024 16:19:00 +0100

kivy (3.0.0-dev) UNRELEASED; urgency=medium

* update to new release
Expand Down
1 change: 0 additions & 1 deletion linux/debian/daily/compat

This file was deleted.

6 changes: 5 additions & 1 deletion linux/debian/daily/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Section: python
Priority: optional
Maintainer: Thomas-Karl Pietrowski <[email protected]>
Uploaders: Kivy Launchpad-Team <[email protected]>
Build-Depends: debhelper (>= 7.0.50~), dh-python, pkg-config, git,
Build-Depends: debhelper-compat (= 13), dh-python, pkg-config, git,
# Python development files - metapackages for python3
python3-deadsnakes-all-dev | python3-all-dev (>= 3.3),
# Cython3
Expand Down Expand Up @@ -44,6 +44,8 @@ Build-Depends: debhelper (>= 7.0.50~), dh-python, pkg-config, git,
texlive-latex-base, texlive-latex-recommended, texlive-latex-extra, texlive-fonts-extra, texlive-fonts-recommended,
# Raises an ImportError if not installed
python3-pygments,
# Raises an ImportError if not installed
python3-filetype,
Standards-Version: 3.9.1
Homepage: http://kivy.org/
Vcs-Git: https://github.com/kivy/kivy.git
Expand Down Expand Up @@ -85,6 +87,7 @@ Conflicts:
kivy-doc-html,
Depends:
${misc:Depends},
${sphinxdoc:Depends},
${shlibs:Depends},
${python:Depends},
Description: Kivy - Multimedia / Multitouch framework - documentation (html)
Expand Down Expand Up @@ -155,6 +158,7 @@ Depends: ${misc:Depends},
${python:Depends},
python3-docutils,
python3-pygments,
python3-filetype,
xclip | xsel,
libsdl2-2.0-0,
libsdl2-image-2.0-0,
Expand Down
1 change: 0 additions & 1 deletion linux/debian/daily/kivy-examples.install

This file was deleted.

7 changes: 0 additions & 7 deletions linux/debian/daily/kivy-tools.install

This file was deleted.

19 changes: 0 additions & 19 deletions linux/debian/daily/python3-kivy.install

This file was deleted.

66 changes: 25 additions & 41 deletions linux/debian/daily/rules
Original file line number Diff line number Diff line change
@@ -1,51 +1,35 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

export PYBUILD_NAME=kivy
export KIVY_NO_CONFIG=1
export PYTHONPATH=$(CURDIR)/pypackages:$PYTHONPATH
export TMP_INSTALL_DIR=$(CURDIR)/tmp-debian-install


%:
dh $@ --with python3
dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_build:
echo "Skipping any builds - doing them on install..."

override_dh_installdocs:
rm -rf pypackages || true;
$(MAKE) clean;
mkdir pypackages;
python3 -m pip list;
python3 -m pip install $(CURDIR)/cython -t $(CURDIR)/pypackages --no-deps --upgrade || true;
# Build the package
dh_auto_build

# Patch the documentation configuration to disable the sphinxcontrib-jquery extension
patch doc/sources/conf.py < kivy-ppa-patches/disable-sphinxcontrib-jquery.patch;
python3 -m pip list;
$(MAKE) PYTHON=python3 force;
cd doc && PYTHONPATH=..:$PYTHONPATH make html;
dh_installdocs

override_dh_auto_install:
echo "PYTHONPATH is $$PYTHONPATH"
patch pyproject.toml < kivy-ppa-patches/use-relaxed-build-time-reqs-versions.patch
for PYX in $(shell py3versions -r); do \
rm -rf pypackages || true; \
$(MAKE) clean; \
mkdir pypackages; \
$$PYX -m pip list; \
$$PYX -m pip install $(CURDIR)/cython -t $(CURDIR)/pypackages --no-deps --upgrade; \
$$PYX -m pip list; \
$(MAKE) install PYTHON=$$PYX INSTALL_ROOT=$(CURDIR)/debian/tmp INSTALL_PREFIX=/usr INSTALL_LAYOUT=deb; \
$(MAKE) install PYTHON=$$PYX-dbg INSTALL_ROOT=$(CURDIR)/debian/tmp-dbg INSTALL_PREFIX=/usr INSTALL_LAYOUT=deb || true; \
done

# Create a temporary installation directory
mkdir -p $(TMP_INSTALL_DIR)

# Perform the installation step into the temporary directory
dh_auto_install --destdir=$(TMP_INSTALL_DIR)

# Build the HTML documentation
# Set PYTHONPATH to include the installed package's dist-packages directory

cd doc && PYTHONPATH=$$(find $(TMP_INSTALL_DIR) -type d -name dist-packages -print):$$PYTHONPATH make html

# Clean up the temporary installation directory
rm -rf $(TMP_INSTALL_DIR)


override_dh_auto_test:
#xvfb-run -s "+extension GLX" dh_auto_test
echo "! TESTS ARE TEMPORARY DISABLED !"

override_dh_missing:
dh_missing --fail-missing --sourcedir debian/tmp
echo "! TESTS ARE TEMPORARY DISABLED !"
6 changes: 6 additions & 0 deletions linux/debian/stable/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
kivy (2.3.1-0) stable; urgency=medium

* update to new release

-- Mirko Galimberti <[email protected]> Thu, 26 Dec 2024 19:48:00 +0100

kivy (2.3.0-0) stable; urgency=medium

* update to new release
Expand Down
1 change: 0 additions & 1 deletion linux/debian/stable/compat

This file was deleted.

6 changes: 5 additions & 1 deletion linux/debian/stable/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Section: python
Priority: optional
Maintainer: Thomas-Karl Pietrowski <[email protected]>
Uploaders: Kivy Launchpad-Team <[email protected]>
Build-Depends: debhelper (>= 7.0.50~), dh-python, pkg-config, git,
Build-Depends: debhelper-compat (= 13), dh-python, pkg-config, git,
# Python development files - metapackages for python3
python3-deadsnakes-all-dev | python3-all-dev (>= 3.3),
# Cython3
Expand Down Expand Up @@ -44,6 +44,8 @@ Build-Depends: debhelper (>= 7.0.50~), dh-python, pkg-config, git,
texlive-latex-base, texlive-latex-recommended, texlive-latex-extra, texlive-fonts-extra, texlive-fonts-recommended,
# Raises an ImportError if not installed
python3-pygments,
# Raises an ImportError if not installed
python3-filetype,
Standards-Version: 3.9.1
Homepage: http://kivy.org/
Vcs-Git: https://github.com/kivy/kivy.git
Expand Down Expand Up @@ -85,6 +87,7 @@ Conflicts:
kivy-doc-html,
Depends:
${misc:Depends},
${sphinxdoc:Depends},
${shlibs:Depends},
${python:Depends},
Description: Kivy - Multimedia / Multitouch framework - documentation (html)
Expand Down Expand Up @@ -155,6 +158,7 @@ Depends: ${misc:Depends},
${python:Depends},
python3-docutils,
python3-pygments,
python3-filetype,
xclip | xsel,
libsdl2-2.0-0,
libsdl2-image-2.0-0,
Expand Down
1 change: 0 additions & 1 deletion linux/debian/stable/kivy-examples.install

This file was deleted.

7 changes: 0 additions & 7 deletions linux/debian/stable/kivy-tools.install

This file was deleted.

9 changes: 0 additions & 9 deletions linux/debian/stable/python3-kivy-bin.install

This file was deleted.

1 change: 0 additions & 1 deletion linux/debian/stable/python3-kivy-common.install

This file was deleted.

19 changes: 0 additions & 19 deletions linux/debian/stable/python3-kivy.install

This file was deleted.

65 changes: 25 additions & 40 deletions linux/debian/stable/rules
Original file line number Diff line number Diff line change
@@ -1,50 +1,35 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1

export PYBUILD_NAME=kivy
export KIVY_NO_CONFIG=1
export PYTHONPATH=$(CURDIR)/pypackages:$PYTHONPATH
export TMP_INSTALL_DIR=$(CURDIR)/tmp-debian-install


%:
dh $@ --with python3
dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_build:
echo "Skipping any builds - doing them on install..."

override_dh_installdocs:
rm -rf pypackages || true;
$(MAKE) clean;
mkdir pypackages;
python3 -m pip list;
python3 -m pip install $(CURDIR)/cython -t $(CURDIR)/pypackages --no-deps --upgrade || true;
# Build the package
dh_auto_build

# Patch the documentation configuration to disable the sphinxcontrib-jquery extension
patch doc/sources/conf.py < kivy-ppa-patches/disable-sphinxcontrib-jquery.patch;
python3 -m pip list;
$(MAKE) PYTHON=python3 force;
cd doc && PYTHONPATH=..:$PYTHONPATH make html;
dh_installdocs

override_dh_auto_install:
echo "PYTHONPATH is $$PYTHONPATH"
for PYX in $(shell py3versions -r); do \
rm -rf pypackages || true; \
$(MAKE) clean; \
mkdir pypackages; \
$$PYX -m pip list; \
$$PYX -m pip install $(CURDIR)/cython -t $(CURDIR)/pypackages --no-deps --upgrade; \
$$PYX -m pip list; \
$(MAKE) install PYTHON=$$PYX INSTALL_ROOT=$(CURDIR)/debian/tmp INSTALL_PREFIX=/usr INSTALL_LAYOUT=deb; \
$(MAKE) install PYTHON=$$PYX-dbg INSTALL_ROOT=$(CURDIR)/debian/tmp-dbg INSTALL_PREFIX=/usr INSTALL_LAYOUT=deb || true; \
done

# Create a temporary installation directory
mkdir -p $(TMP_INSTALL_DIR)

# Perform the installation step into the temporary directory
dh_auto_install --destdir=$(TMP_INSTALL_DIR)

# Build the HTML documentation
# Set PYTHONPATH to include the installed package's dist-packages directory

cd doc && PYTHONPATH=$$(find $(TMP_INSTALL_DIR) -type d -name dist-packages -print):$$PYTHONPATH make html

# Clean up the temporary installation directory
rm -rf $(TMP_INSTALL_DIR)


override_dh_auto_test:
#xvfb-run -s "+extension GLX" dh_auto_test
echo "! TESTS ARE TEMPORARY DISABLED !"

override_dh_missing:
dh_missing --fail-missing --sourcedir debian/tmp
echo "! TESTS ARE TEMPORARY DISABLED !"

0 comments on commit 287c62a

Please sign in to comment.