|
@@ -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:]
|
|
|
)
|
|
|
|