Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ff16e05

Browse files
committed
Edit matplotlibrc in place if editable mode install
1 parent bdfd2ff commit ff16e05

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,9 @@ def update_matplotlibrc(path):
216216
class BuildPy(setuptools.command.build_py.build_py):
217217
def run(self):
218218
super().run()
219+
base_dir = "lib" if self.editable_mode else self.build_lib
219220
update_matplotlibrc(
220-
Path(self.build_lib, "matplotlib/mpl-data/matplotlibrc"))
221+
Path(base_dir, "matplotlib/mpl-data/matplotlibrc"))
221222

222223

223224
class Sdist(setuptools.command.sdist.sdist):

0 commit comments

Comments
 (0)