-
-
Notifications
You must be signed in to change notification settings - Fork 522
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use sysconfig instead of distutils for Python 3.10 compatability (#2100)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
c5e7869
commit 4c0e09b
Showing
2 changed files
with
4 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |