File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 13
13
import sys
14
14
import os
15
15
from socket import gethostbyname
16
- from distutils .version import LooseVersion
16
+ from packaging .version import Version
17
17
import zmq
18
18
19
19
import zprocess
@@ -337,7 +337,7 @@ def connect_to_zlock_server():
337
337
global _zlock_server_supports_readwrite
338
338
if hasattr (client , 'get_protocol_version' ):
339
339
version = client .get_protocol_version ()
340
- if LooseVersion (version ) >= LooseVersion ('1.1.0' ):
340
+ if Version (version ) >= Version ('1.1.0' ):
341
341
_zlock_server_supports_readwrite = True
342
342
343
343
# The user can call these functions to change the timeouts later if they
Original file line number Diff line number Diff line change 16
16
import os
17
17
import imp
18
18
import site
19
- import distutils . sysconfig
19
+ import sysconfig
20
20
21
21
22
22
# Directories in which the standard library and installed packages may be located.
23
23
# Modules in these locations will be whitelisted:
24
24
PKGDIRS = [
25
- distutils . sysconfig .get_python_lib ( plat_specific = True , standard_lib = True ),
26
- distutils . sysconfig .get_python_lib ( plat_specific = True , standard_lib = False ),
27
- distutils . sysconfig .get_python_lib ( plat_specific = False , standard_lib = True ),
28
- distutils . sysconfig .get_python_lib ( plat_specific = False , standard_lib = False ),
25
+ sysconfig .get_path ( 'platstdlib' ),
26
+ sysconfig .get_path ( 'platlib' ),
27
+ sysconfig .get_path ( 'stdlib' ),
28
+ sysconfig .get_path ( 'purelib' ),
29
29
site .getusersitepackages (),
30
30
]
31
31
PKGDIRS += site .getsitepackages ()
Original file line number Diff line number Diff line change 1
1
import os
2
2
from setuptools import setup
3
3
from setuptools .command .develop import develop
4
- from distutils import log
4
+ import logging
5
5
6
6
7
7
class develop_command (develop ):
@@ -11,7 +11,7 @@ def run(self):
11
11
path = os .path .join (self .install_dir , 'labscript-suite.pth' )
12
12
super ().run ()
13
13
if not self .uninstall :
14
- log .info (f'Copying labscript-suite.pth to { path } ' )
14
+ logging .info (f'Copying labscript-suite.pth to { path } ' )
15
15
if not self .dry_run :
16
16
self .copy_file ('labscript-suite.pth' , path )
17
17
You can’t perform that action at this time.
0 commit comments