Commit ca1faa68 by Christian Brauner Committed by GitHub

Merge pull request #1252 from stgraber/master

Fix environment before importing setuptools
parents ac94fda6 c223a536
...@@ -25,10 +25,7 @@ ...@@ -25,10 +25,7 @@
import os import os
import subprocess import subprocess
from setuptools import setup, Extension # Fix build when PIE is enabled (must run before setuptools import)
from setuptools.command.build_ext import build_ext as BuildExtCommand
# Fix build when PIE is enabled
for var in ("LDFLAGS", "CFLAGS"): for var in ("LDFLAGS", "CFLAGS"):
current = os.environ.get(var, None) current = os.environ.get(var, None)
if not current: if not current:
...@@ -44,6 +41,9 @@ for var in ("LDFLAGS", "CFLAGS"): ...@@ -44,6 +41,9 @@ for var in ("LDFLAGS", "CFLAGS"):
os.environ[var] = " ".join(new) os.environ[var] = " ".join(new)
from setuptools import setup, Extension
from setuptools.command.build_ext import build_ext as BuildExtCommand
class LxcBuildExtCommand(BuildExtCommand): class LxcBuildExtCommand(BuildExtCommand):
user_options = BuildExtCommand.user_options + [ user_options = BuildExtCommand.user_options + [
......
Markdown is supported
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