diff --git a/setup.py b/setup.py index d8998b6958..cb98090f72 100644 --- a/setup.py +++ b/setup.py @@ -29,7 +29,6 @@ sys.path.append(str(Path.cwd() / 'src')) def _CustomBuild(*args, **kwargs): - print(sys.path) from pretix._build import CustomBuild return CustomBuild(*args, **kwargs) diff --git a/src/pretix/_build.py b/src/pretix/_build.py index f64f0f0c99..6a95066717 100644 --- a/src/pretix/_build.py +++ b/src/pretix/_build.py @@ -45,6 +45,10 @@ def npm_install(): class CustomBuild(build): def run(self): + if "pretix" not in os.listdir("."): + # Only run this command on the pretix module, not on other modules even if it's registered globally + # in some cases + return build.run(self) if "PRETIX_DOCKER_BUILD" in os.environ: return # this is a hack to allow calling this file early in our docker build to make use of caching os.environ.setdefault("DJANGO_SETTINGS_MODULE", "pretix._build_settings") @@ -68,6 +72,10 @@ class CustomBuild(build): class CustomBuildExt(build_ext): def run(self): + if "pretix" not in os.listdir("."): + # Only run this command on the pretix module, not on other modules even if it's registered globally + # in some cases + return build_ext.run(self) if "PRETIX_DOCKER_BUILD" in os.environ: return # this is a hack to allow calling this file early in our docker build to make use of caching npm_install()