Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 1a93d0d

Browse files
author
Matthias Koeppe
committed
Merge branch 't/30780/sage_setup__separate_installing_and_cleaning' into t/30578/add-src-requirements-txt
2 parents f6f1e97 + ad9402f commit 1a93d0d

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

build/pkgs/sagelib/src/setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
print("Discovered Python/Cython sources, time: %.2f seconds." % (time.time() - t))
8080

8181

82-
from sage_setup.command.sage_install import sage_install
82+
from sage_setup.command.sage_install import sage_install_and_clean
8383

8484
#########################################################
8585
### Distutils
@@ -177,5 +177,5 @@
177177
cmdclass = dict(build=sage_build,
178178
build_cython=sage_build_cython,
179179
build_ext=sage_build_ext,
180-
install=sage_install),
180+
install=sage_install_and_clean),
181181
ext_modules = cython_modules)

src/sage_setup/command/sage_install.py

+9-4
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@
88
from distutils.command.install import install
99

1010
class sage_install(install):
11+
1112
def run(self):
1213
install.run(self)
1314
self.install_kernel_spec()
14-
log.info('Cleaning up stale installed files....')
15-
t = time.time()
16-
self.clean_stale_files()
17-
log.info('Finished cleaning, time: %.2f seconds.' % (time.time() - t))
1815

1916
def install_kernel_spec(self):
2017
"""
@@ -31,6 +28,14 @@ def install_kernel_spec(self):
3128
# the install_data directory for installing our Jupyter files.
3229
SageKernelSpec.update(prefix=self.install_data)
3330

31+
class sage_install_and_clean(sage_install):
32+
33+
def run(self):
34+
sage_install.run(self)
35+
t = time.time()
36+
self.clean_stale_files()
37+
log.info('Finished cleaning, time: %.2f seconds.' % (time.time() - t))
38+
3439
def clean_stale_files(self):
3540
"""
3641
Remove stale installed files.

0 commit comments

Comments
 (0)