summaryrefslogtreecommitdiffstats
path: root/setup.py
diff options
context:
space:
mode:
authorThomas Waldmann <tw@waldmann-edv.de>2024-01-30 23:55:18 +0100
committerThomas Waldmann <tw@waldmann-edv.de>2024-02-09 17:37:46 +0100
commit8eba627b29fb97e1449480b0c994e4230d16ba0e (patch)
treece3dc4df7a395ec21eea0d00a10e556a9354457f /setup.py
parent4d424de69ea6fe9c8ca3b4f00032b2e16827f665 (diff)
scripts: make.py clean implementation
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py33
1 files changed, 3 insertions, 30 deletions
diff --git a/setup.py b/setup.py
index 453b7fbf3..e640f5356 100644
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,6 @@ import os
import re
import sys
from collections import defaultdict
-from glob import glob
try:
import multiprocessing
@@ -12,7 +11,7 @@ except ImportError:
multiprocessing = None
from setuptools.command.build_ext import build_ext
-from setuptools import setup, Extension, Command
+from setuptools import setup, Extension
from setuptools.command.sdist import sdist
try:
@@ -84,33 +83,7 @@ else:
raise ImportError("The GIT version of Borg needs Cython. Install Cython or use a released version.")
-def rm(file):
- try:
- os.unlink(file)
- print("rm", file)
- except FileNotFoundError:
- pass
-
-
-class Clean(Command):
- user_options = []
-
- def initialize_options(self):
- pass
-
- def finalize_options(self):
- pass
-
- def run(self):
- for source in cython_sources:
- genc = source.replace(".pyx", ".c")
- rm(genc)
- compiled_glob = source.replace(".pyx", ".cpython*")
- for compiled in sorted(glob(compiled_glob)):
- rm(compiled)
-
-
-cmdclass = {"build_ext": build_ext, "sdist": Sdist, "clean2": Clean}
+cmdclass = {"build_ext": build_ext, "sdist": Sdist}
ext_modules = []
@@ -228,7 +201,7 @@ if not on_rtd:
# this breaks chained commands like 'clean sdist'
cythonizing = (
len(sys.argv) > 1
- and sys.argv[1] not in (("clean", "clean2", "egg_info", "--help-commands", "--version"))
+ and sys.argv[1] not in (("clean", "egg_info", "--help-commands", "--version"))
and "--help" not in sys.argv[1:]
)