diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 3479ae707589788dae91391e6ec7433f6f5d0f17..55763d3f4cb777e0950315052578b2d0596cc7ea 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,7 +1,12 @@ +Version 6.1.3 (2025-03-19) +===================================================== + +* Fix compatibility with Python 3.13 by dropping usage of distutils. + Version 6.1.2 (2024-02-10) ===================================================== -* Explicitly set nodeLinker config to fix compatibility with Yarn 4.x +* Explicitly set nodeLinker config to fix compatibility with Yarn 4.x Version 6.1.1 (2024-02-09) ===================================================== diff --git a/django_yarnpkg/conf.py b/django_yarnpkg/conf.py index c6c42b57bde8eb1dfc6515676b98b5b80323e466..c688f9f118a425add4498e2f7d01ba46a68a229a 100644 --- a/django_yarnpkg/conf.py +++ b/django_yarnpkg/conf.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -from distutils.spawn import find_executable +from shutil import which import os import sys from django.conf import settings @@ -8,6 +8,6 @@ __all__ = ['NODE_MODULES_ROOT', 'YARN_PATH'] NODE_MODULES_ROOT = getattr(settings, 'NODE_MODULES_ROOT', os.path.abspath(os.path.dirname(__name__))) -default_yarn_path = find_executable('yarnpkg') or find_executable('yarn') +default_yarn_path = which('yarnpkg') or which('yarn') YARN_PATH = getattr(settings, 'YARN_PATH', default_yarn_path) diff --git a/django_yarnpkg/yarn.py b/django_yarnpkg/yarn.py index 3b9c5a1198205aa7dd6b1c410e67a2a5a35952f9..c8084a100e4bb97d5c2d4885138ee364c00d4a82 100644 --- a/django_yarnpkg/yarn.py +++ b/django_yarnpkg/yarn.py @@ -1,5 +1,5 @@ from . import conf, shortcuts, exceptions -from distutils.spawn import find_executable +from shutil import which import os import subprocess import sys @@ -16,7 +16,7 @@ class YarnAdapter(object): def is_yarn_exists(self): """Check is bower exists""" if shortcuts.is_executable(self._yarn_path)\ - or find_executable(self._yarn_path): + or which(self._yarn_path): return True else: return False diff --git a/setup.py b/setup.py index 3478585a7b195dc1d503be21a684e4d4038b0df8..e6d2a0add0c4192b45c630e400cef0062b72051a 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -version = '6.1.2' +version = '6.1.3' setup( name='django-yarnpkg',