diff --git a/helpers/DATA/python-apt/patch_changes/pep440.patch b/helpers/DATA/python-apt/patch_changes/pep440.patch new file mode 100644 index 0000000..ac50a64 --- /dev/null +++ b/helpers/DATA/python-apt/patch_changes/pep440.patch @@ -0,0 +1,23 @@ +diff --git a/setup.py b/setup.py +index 9648d871..a63a2c66 100644 +--- a/setup.py ++++ b/setup.py +@@ -6,6 +6,7 @@ import os + import shutil + import subprocess + import sys ++import re + + from setuptools import Extension, setup + from setuptools.command.install import install +@@ -64,6 +64,10 @@ def get_version(): + version = version.replace("tanglu", "+tanglu") + version = version.split("build")[0] + ++ # Trisquel-style suffix: "3.1.0trisquel12" -> "3.1.0+trisquel12" (PEP 440 local) ++ if "+" not in version: ++ version = re.sub(r"(?<=\d)([A-Za-z])", r"+\1", version, count=1) ++ + return version + + diff --git a/helpers/make-python-apt b/helpers/make-python-apt index 3f5924e..3e945b2 100644 --- a/helpers/make-python-apt +++ b/helpers/make-python-apt @@ -24,7 +24,7 @@ # list available on the resulting netinstall (mini.iso) image. # The same way as 'ubiquity' is for for the next Live Desktop ISOs. -VERSION=12 +VERSION=13 EXTERNAL='deb-src http://archive.ubuntu.com/ubuntu resolute main' REPOKEY=871920D1991BC93C COMPONENT=main @@ -89,9 +89,12 @@ diff -ru source.orig/apt/progress/base.py source/apt/progress/base.py self.percent = float(percent) EOF +apply_patch_changes + export DEB_BUILD_OPTIONS=nocheck -changelog "Compiled for Trisquel" +changelog "Compiled for Trisquel +Fixed PEP440 version issue." package