Skip to content

Commit 18aebf4

Browse files
author
Matthias Koeppe
committed
pkgs/sage-conf_conda/setup.py: Skip some files generated in editable mode when copying in non-editable mode
1 parent 66a407e commit 18aebf4

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

pkgs/sage-conf_conda/setup.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from setuptools import setup
1111
from distutils.command.build_scripts import build_scripts as distutils_build_scripts
1212
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
1314
from setuptools.errors import SetupError
1415

1516

@@ -75,7 +76,9 @@ def ignore(path, names):
7576
return ['src']
7677
### ignore more stuff --- .tox etc.
7778
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')]
7982

8083
if not os.path.exists(os.path.join(SAGE_ROOT, 'config.status')):
8184
# config.status and other configure output has to be writable.
@@ -99,6 +102,16 @@ def run(self):
99102
distutils_build_scripts.run(self)
100103

101104

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+
102113
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)
104117
)

0 commit comments

Comments
 (0)