mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-29 08:52:56 +02:00
python3-pathtools: rebuild for Python 3.12
This commit is contained in:
parent
2f5eeda80e
commit
587707737c
2 changed files with 34 additions and 1 deletions
29
srcpkgs/python3-pathtools/patches/strip-version.patch
Normal file
29
srcpkgs/python3-pathtools/patches/strip-version.patch
Normal file
|
@ -0,0 +1,29 @@
|
|||
Python 3.12 drops the imp module, and rather than implement a convoluted
|
||||
replacement for imp.load_source to automatically populate the package version,
|
||||
we can just add a placeholder and vsed it in the template.
|
||||
|
||||
--- ./setup.py.orig 2023-09-29 14:08:21.605034790 -0400
|
||||
+++ ./setup.py 2023-09-29 14:08:47.085183549 -0400
|
||||
@@ -22,13 +22,8 @@
|
||||
# THE SOFTWARE.
|
||||
|
||||
import os
|
||||
-import imp
|
||||
from setuptools import setup
|
||||
|
||||
-PKG_DIR = 'pathtools'
|
||||
-version = imp.load_source('version',
|
||||
- os.path.join(PKG_DIR, 'version.py'))
|
||||
-
|
||||
def read_file(filename):
|
||||
"""
|
||||
Reads the contents of a given file relative to the directory
|
||||
@@ -40,7 +35,7 @@
|
||||
return open(os.path.join(os.path.dirname(__file__), filename)).read()
|
||||
|
||||
setup(name='pathtools',
|
||||
- version=version.VERSION_STRING,
|
||||
+ version='@@VERSION@@',
|
||||
description='File system general utilities',
|
||||
long_description=read_file('README'),
|
||||
author="Yesudeep Mangalapilly",
|
|
@ -1,7 +1,7 @@
|
|||
# Template file for 'python3-pathtools'
|
||||
pkgname=python3-pathtools
|
||||
version=0.1.2
|
||||
revision=6
|
||||
revision=7
|
||||
build_style=python3-module
|
||||
hostmakedepends="python3-setuptools"
|
||||
depends="python3"
|
||||
|
@ -12,6 +12,10 @@ homepage="https://github.com/gorakhargosh/pathtools"
|
|||
distfiles="${PYPI_SITE}/p/pathtools/pathtools-${version}.tar.gz"
|
||||
checksum=7c35c5421a39bb82e58018febd90e3b6e5db34c5443aaaf742b3f33d4655f1c0
|
||||
|
||||
post_patch() {
|
||||
vsed -i -e "s/@@VERSION@@/${version}/" setup.py
|
||||
}
|
||||
|
||||
post_install() {
|
||||
vlicense LICENSE
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue