10
10
from setuptools import setup
11
11
from distutils .command .build_scripts import build_scripts as distutils_build_scripts
12
12
from setuptools .command .build_py import build_py as setuptools_build_py
13
+ from setuptools .command .editable_wheel import editable_wheel as setuptools_editable_wheel
13
14
from setuptools .errors import SetupError
14
15
15
16
@@ -75,7 +76,9 @@ def ignore(path, names):
75
76
return ['src' ]
76
77
### ignore more stuff --- .tox etc.
77
78
return [name for name in names
78
- if name in ('.tox' , '.git' , '__pycache__' )]
79
+ if name in ('.tox' , '.git' , '__pycache__' ,
80
+ 'prefix' , 'local' , 'venv' , 'upstream' ,
81
+ 'config.status' , 'config.log' , 'logs' )]
79
82
80
83
if not os .path .exists (os .path .join (SAGE_ROOT , 'config.status' )):
81
84
# config.status and other configure output has to be writable.
@@ -99,6 +102,16 @@ def run(self):
99
102
distutils_build_scripts .run (self )
100
103
101
104
105
+ class editable_wheel (setuptools_editable_wheel ):
106
+ r"""
107
+ Customized so that exceptions raised by our build_py
108
+ do not lead to the "Customization incompatible with editable install" message
109
+ """
110
+ _safely_run = setuptools_editable_wheel .run_command
111
+
112
+
102
113
setup (
103
- cmdclass = dict (build_py = build_py , build_scripts = build_scripts )
114
+ cmdclass = dict (build_py = build_py ,
115
+ build_scripts = build_scripts ,
116
+ editable_wheel = editable_wheel )
104
117
)
0 commit comments