Skip to content
Prev Previous commit
Next Next commit
Always run configure step if dotnet modules are present
  • Loading branch information
filmor committed Dec 10, 2020
commit d75cdccf22d7f6d49318cd0c82f63cd32daabb5f
15 changes: 1 addition & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,7 @@ def run(self):
other_modules = [lib for lib in orig_modules if not isinstance(lib, DotnetLib)]

if dotnet_modules:
if os.path.isfile(CONFIGURED_PROPS):
self.announce("Already configured", level=distutils.log.INFO)
else:
self.announce("Writing configured.props...", level=distutils.log.INFO)
_write_configure_props()
self.run_command("configure")

for lib in dotnet_modules:
output = os.path.join(os.path.abspath(self.build_lib), lib.args.pop("output"))
Expand Down Expand Up @@ -151,14 +147,6 @@ def run(self):
# If no modules need to be compiled, skip


class bdist_wheel_patched(bdist_wheel):
def finalize_options(self):
# Monkey patch bdist_wheel to think the package is pure even though we
# include DLLs
super().finalize_options()
self.root_is_pure = True


with open("README.rst", "r") as f:
long_description = f.read()

Expand Down Expand Up @@ -221,7 +209,6 @@ def finalize_options(self):
# data_files=[("{install_platlib}", ["{build_lib}/pythonnet"])],
cmdclass={
"build_ext": BuildDotnet,
"bdist_wheel": bdist_wheel_patched,
"configure": Configure,
},
py_modules=["clr"],
Expand Down