Skip to content

Commit

Permalink
Use sysconfig instead of distutils for Python 3.10 compatability (#2100)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
9999years and pre-commit-ci[bot] authored Jul 13, 2021
1 parent c5e7869 commit 4c0e09b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions docs/changelog/2100.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
``tox`` no longer shows deprecation warnings for ``distutils.sysconfig`` on
Python 3.10 - by :user:`9999years`
4 changes: 2 additions & 2 deletions src/tox/helper/get_site_package_dir.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from __future__ import unicode_literals

import distutils.sysconfig
import json
import sys
import sysconfig

data = json.dumps({"dir": distutils.sysconfig.get_python_lib(prefix=sys.argv[1])})
data = json.dumps({"dir": sysconfig.get_path("purelib", vars={"base": sys.argv[1]})})
print(data)

0 comments on commit 4c0e09b

Please sign in to comment.