Skip to content

Commit 519337a

Browse files
committed
Use setuptools instead of distutils
Prompted by: https://bugzilla.redhat.com/show_bug.cgi?id=2154976 Notes: https://peps.python.org/pep-0632/#migration-advice https://bugs.python.org/issue41282#msg393017 I tested this with python3 (package built and installed, a test "crash" gets reported in the journal as expected), but not with python2, except for syntax correctness.
1 parent e0623df commit 519337a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# -*- coding:utf-8 -*-
2+
import site
23
import sys
3-
from distutils.core import setup
4+
import sysconfig
5+
from setuptools import setup
46

57
if '--user' in sys.argv: # There must be a better way to do this,
68
# if you know it, please tell me.
7-
import site
89
packages_path = site.getusersitepackages()
910
else:
10-
from distutils import sysconfig
11-
packages_path = sysconfig.get_python_lib()
11+
packages_path = sysconfig.get_path('purelib')
1212

1313
version = '1'
1414

0 commit comments

Comments
 (0)