Commit 67077122 authored by Christoph Groth's avatar Christoph Groth
Browse files remove our_ prefix for distutils commands

parent 158fb875
......@@ -19,8 +19,8 @@ import configparser
from setuptools import setup, Extension, Command
from sysconfig import get_platform
from distutils.errors import DistutilsError, DistutilsModuleError
from setuptools.command.build_ext import build_ext
from setuptools.command.sdist import sdist
from setuptools.command.build_ext import build_ext as build_ext_orig
from setuptools.command.sdist import sdist as sdist_orig
from os.path import samefile
......@@ -218,18 +218,18 @@ def long_description():
return ''.join(text)
class our_build_ext(build_ext):
class build_ext(build_ext_orig):
def run(self):
with open(os.path.join('src', 'version.hh'), 'w') as f:
f.write("// This file has been generated by\n")
f.write("// It is not included in source distributions.\n")
f.write('#define VERSION "{}"\n'.format(version))
class our_sdist(sdist):
class sdist(sdist_orig):
def make_release_tree(self, base_dir, files):
sdist.make_release_tree(self, base_dir, files)
sdist_orig.make_release_tree(self, base_dir, files)
fname = os.path.join(base_dir, SAVED_VERSION_FILE)
# This could be a hard link, so try to delete it first. Is there any way
......@@ -280,8 +280,8 @@ def main():
license="Simplified BSD license",
platforms=["Unix", "Linux", "Mac OS-X", "Windows"],
cmdclass={'build_ext': our_build_ext,
'sdist': our_sdist},
cmdclass={'build_ext': build_ext,
'sdist': sdist},
ext_modules=[Extension(name, **kwargs)
for name, kwargs in exts.items()],
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment