@@ -37,52 +37,7 @@ def build(context):
37
37
context = MockContext ()
38
38
context .run (f"{ executable } -m pip install --upgrade pip" , echo = True )
39
39
context .run (f"pip install -r requirements.txt" , echo = True )
40
- context .run (
41
- f"{ executable } setup.py develop sdist" ,
42
- env = {"CPPFLAGS" : "-Werror -Wno-deprecated-declarations" },
43
- replace_env = False ,
44
- )
45
- if platform == "linux" :
46
- from sys import abiflags
47
-
48
- for so in glob ("*.so" ):
49
- context .run (
50
- f"patchelf --remove-needed libpython{ get_python_version ()} { abiflags } .so.1.0 { so } " ,
51
- echo = True ,
52
- )
53
- context .run (f"{ executable } setup.py bdist_wheel" , echo = True )
54
- WHEELS = glob ("dist/*.whl" )
55
- assert WHEELS , "No wheels in dist!"
56
- print ("Before:" , * WHEELS , sep = "\n - " )
57
- if platform == "linux" :
58
- # We're typically eligible for manylinux1... or at least manylinux2010.
59
- # This will remove the wheel if it was unchanged... but that will cause
60
- # our assert to fail later, which is what we want!
61
- context .run (f"pip install -r requirements-audit.txt" , echo = True )
62
- for wheel in WHEELS :
63
- context .run (f"auditwheel repair { wheel } -w dist" , echo = True )
64
- remove (wheel )
65
- else :
66
- if platform == "darwin" :
67
- # We lie here, and say our 10.9 64-bit build is a 10.6 32/64-bit one.
68
- # This is because pip is conservative in what wheels it will use, but
69
- # Python installations are EXTREMELY liberal in their macOS support.
70
- # A typical user may be running a 32/64 Python built for 10.6.
71
- # In reality, we shouldn't worry about supporting 32-bit Snow Leopard.
72
- for wheel in WHEELS :
73
- fake = wheel .replace ("macosx_10_9_x86_64" , "macosx_10_6_intel" )
74
- replace (wheel , fake )
75
- assert (
76
- wheel != fake or "TRAVIS" not in environ
77
- ), "We expected a macOS 10.9 x86_64 build!"
78
- # Windows is fine.
79
- FIXED = glob ("dist/*.whl" )
80
- print ("After:" , * FIXED , sep = "\n - " )
81
- assert len (WHEELS ) == len (FIXED ), "We gained or lost a wheel!"
82
-
83
- context .run ("twine check dist/*" , echo = True )
84
- for dist in ["." , * glob ("dist/*.tar.gz" ), * glob ("dist/*.whl" )]:
85
- context .run (f"pip install --force-reinstall --no-cache-dir { dist } " , echo = True )
40
+ context .run (f"{ executable } setup.py develop" )
86
41
87
42
88
43
@task (build )
0 commit comments