[med-svn] [Git][med-team/pycorrfit][master] 5 commits: Replace distutils to gain Python3.12 compatibility
Andreas Tille (@tille)
gitlab at salsa.debian.org
Tue Jun 25 19:26:50 BST 2024
Andreas Tille pushed to branch master at Debian Med / pycorrfit
Commits:
770ac331 by Andreas Tille at 2024-06-25T20:10:05+02:00
Replace distutils to gain Python3.12 compatibility
- - - - -
db54c35d by Andreas Tille at 2024-06-25T20:12:59+02:00
routine-update: Standards-Version: 4.7.0
- - - - -
fa7497ae by Andreas Tille at 2024-06-25T20:15:51+02:00
routine-update: Do not parse d/changelog
- - - - -
dfec0146 by Andreas Tille at 2024-06-25T20:15:52+02:00
routine-update: Build-Depends: s/dh-python/dh-sequence-python3/
- - - - -
7ef69618 by Andreas Tille at 2024-06-25T20:25:54+02:00
Remove wrong changelog entry
- - - - -
5 changed files:
- debian/changelog
- debian/control
- + debian/patches/python3.12.patch
- debian/patches/series
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+pycorrfit (1.1.7+dfsg-3) UNRELEASED; urgency=medium
+
+ * Replace distutils to gain Python3.12 compatibility
+ Closes: #1074222
+ * Standards-Version: 4.7.0 (routine-update)
+ * Build-Depends: s/dh-python/dh-sequence-python3/ (routine-update)
+
+ -- Andreas Tille <tille at debian.org> Tue, 25 Jun 2024 20:06:46 +0200
+
pycorrfit (1.1.7+dfsg-2) unstable; urgency=medium
* Standards-Version: 4.6.1 (routine-update)
=====================================
debian/control
=====================================
@@ -6,7 +6,7 @@ Section: python
Priority: optional
Build-Depends: cython3,
debhelper-compat (= 13),
- dh-python,
+ dh-sequence-python3,
faketime,
imagemagick,
librsvg2-bin,
@@ -27,7 +27,7 @@ Build-Depends: cython3,
texlive-latex-extra,
texlive-latex-recommended,
texlive-science
-Standards-Version: 4.6.1
+Standards-Version: 4.7.0
Vcs-Browser: https://salsa.debian.org/med-team/pycorrfit
Vcs-Git: https://salsa.debian.org/med-team/pycorrfit.git
Homepage: https://fcs-analysis.github.io/PyCorrFit/
=====================================
debian/patches/python3.12.patch
=====================================
@@ -0,0 +1,97 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Tue, 25 Jun 2024 20:06:46 +0200
+Bug-Debian: https://bugs.debian.org/1074222
+Description: Replace distutils to gain Python3.12 compatibility
+
+--- a/pycorrfit/gui/frontend.py
++++ b/pycorrfit/gui/frontend.py
+@@ -3,7 +3,7 @@
+ The frontend displays the GUI (Graphic User Interface). All necessary
+ functions and modules are called from here.
+ """
+-from distutils.version import LooseVersion # For version checking
++from packaging.version import Version # For version checking
+ import os
+ import pathlib
+ import platform
+@@ -1313,8 +1313,8 @@ class MyFrame(wx.Frame):
+
+ # Check for correct version
+ try:
+- arcv = LooseVersion(Infodict["Version"])
+- thisv = LooseVersion(self.version.strip())
++ arcv = Version(Infodict["Version"])
++ thisv = Version(self.version.strip())
+ if arcv > thisv:
+ errstring = "Your version of Pycorrfit ("+str(thisv) +\
+ ") is too old to open this session (" +\
+--- a/pycorrfit/gui/main.py
++++ b/pycorrfit/gui/main.py
+@@ -1,5 +1,5 @@
+ """Main execution script"""
+-from distutils.version import LooseVersion
++from packaging.version import Version
+ import sys
+ import warnings
+
+@@ -56,8 +56,8 @@ def CheckVersion(given, required, name):
+ the module str *name* the required verion is met or not.
+ """
+ try:
+- req = LooseVersion(required)
+- giv = LooseVersion(given)
++ req = Version(required)
++ giv = Version(given)
+ except:
+ print(" WARNING: Could not verify version of "+name+".")
+ return
+--- a/pycorrfit/gui/update.py
++++ b/pycorrfit/gui/update.py
+@@ -1,5 +1,5 @@
+ """PyCorrFit - update checking"""
+-from distutils.version import LooseVersion # For version checking
++from packaging.version import Version # For version checking
+ import os
+ import tempfile
+ import traceback
+@@ -80,7 +80,7 @@ def get_gh_version(ghrepo="user/repo", t
+ pass
+ else:
+ j = simplejson.loads(data)
+- newversion = LooseVersion(j["tag_name"])
++ newversion = Version(j["tag_name"])
+
+ return newversion
+
+@@ -112,9 +112,9 @@ def _update_worker(parent):
+
+ ghrepo = "FCS-analysis/PyCorrFit"
+ if hasattr(pcf_version, "repo_tag"):
+- old = LooseVersion(pcf_version.repo_tag)
++ old = Version(pcf_version.repo_tag)
+ else:
+- old = LooseVersion(pcf_version.version)
++ old = Version(pcf_version.version)
+
+ new = get_gh_version(ghrepo)
+
+--- a/setup.py
++++ b/setup.py
+@@ -4,10 +4,14 @@ import sys
+
+ # The next three lines are necessary for setup.py install to include
+ # ChangeLog and Documentation of PyCorrFit
+-from distutils.command.install import INSTALL_SCHEMES
+-for scheme in INSTALL_SCHEMES.values():
+- scheme['data'] = scheme['purelib']
++import sysconfig
+
++install_schemes = sysconfig.get_paths(scheme='posix_prefix') # Use appropriate scheme for your platform
++
++# Modify the data path to be the same as the purelib path
++for key in install_schemes:
++ if key == 'data':
++ install_schemes[key] = install_schemes['purelib']
+
+ # We don't need to cythonize if a .whl package is available.
+ try:
=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
fix_doc.patch
+python3.12.patch
=====================================
debian/rules
=====================================
@@ -29,7 +29,7 @@ PDFLATEX = pdflatex -synctex=1 -interaction=nonstopmode $(TEXDOC)
FAKETIME = faketime -f "$(DEB_DATE_RFC_3339)"
%:
- dh $@ --with python3 --buildsystem=pybuild
+ dh $@ --buildsystem=pybuild
override_dh_auto_clean:
touch doc/PyCorrFit_doc.pdf
View it on GitLab: https://salsa.debian.org/med-team/pycorrfit/-/compare/888d55c978696259cbaf989fcd134958a97e7d25...7ef69618c39e59d0a5381d116087eda95c44adda
--
This project does not include diff previews in email notifications.
View it on GitLab: https://salsa.debian.org/med-team/pycorrfit/-/compare/888d55c978696259cbaf989fcd134958a97e7d25...7ef69618c39e59d0a5381d116087eda95c44adda
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20240625/d7aaf082/attachment-0001.htm>
More information about the debian-med-commit
mailing list