File tree Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Expand file tree Collapse file tree 1 file changed +25
-1
lines changed Original file line number Diff line number Diff line change 33from setuptools .command .develop import develop
44import logging
55
6+ # Setupstools >=64
7+ try :
8+ from setuptools .command .editable_wheel import editable_wheel
9+ except ImportError :
10+ editable_wheel_command = None
11+ else :
12+ from wheel .wheelfile import WheelFile
613
14+ class editable_wheel_command (editable_wheel ):
15+ """Custom editable_wheel command which installs the .pth file to the
16+ wheel file for editable installs."""
17+ def _create_wheel_file (self , bdist_wheel ):
18+ wheel_path = super ()._create_wheel_file (bdist_wheel )
19+ with WheelFile (wheel_path , 'a' ) as wheel :
20+ wheel .write ("labscript-suite.pth" )
21+ return wheel_path
22+
23+
24+ # Setuptools <= 63:
725class develop_command (develop ):
826 """Custom develop command which installs the .pth file to site-packages for editable
927 installs."""
@@ -21,4 +39,10 @@ def run(self):
2139 "local_scheme" : os .getenv ("SCM_LOCAL_SCHEME" , "node-and-date" ),
2240}
2341
24- setup (use_scm_version = VERSION_SCHEME , cmdclass = {'develop' : develop_command })
42+ setup (
43+ use_scm_version = VERSION_SCHEME ,
44+ cmdclass = {
45+ 'develop' : develop_command ,
46+ 'editable_wheel' : editable_wheel_command ,
47+ },
48+ )
You can’t perform that action at this time.
0 commit comments