Skip to content

Commit f0f29cf

Browse files
committed
Corrected some dependencies in the NumPy build targets.
1 parent cf5b88f commit f0f29cf

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

Makefile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,12 @@ XZ_DIR-$1=build/$2/xz-$(XZ_VERSION)-$1
191191
PYTHON_DIR-$1=build/$2/Python-$(PYTHON_VERSION)-$1
192192
pyconfig.h-$1=pyconfig-$$(ARCH-$1).h
193193

194+
ifeq ($2,macOS)
195+
PYTHON_HOST_DEP-$1=
196+
else
197+
PYTHON_HOST-$1=$(PYTHON_HOST)
198+
endif
199+
194200
# Unpack OpenSSL
195201
$$(OPENSSL_DIR-$1)/Makefile: downloads/openssl-$(OPENSSL_VERSION).tgz
196202
# Unpack sources
@@ -265,7 +271,7 @@ $$(XZ_DIR-$1)/src/liblzma/.libs/liblzma.a: $$(XZ_DIR-$1)/Makefile
265271
cd $$(XZ_DIR-$1) && make && make install
266272

267273
# Unpack Python
268-
$$(PYTHON_DIR-$1)/Makefile: downloads/Python-$(PYTHON_VERSION).tgz $(PYTHON_HOST)
274+
$$(PYTHON_DIR-$1)/Makefile: downloads/Python-$(PYTHON_VERSION).tgz $$(PYTHON_HOST-$1)
269275
# Unpack target Python
270276
mkdir -p $$(PYTHON_DIR-$1)
271277
tar zxf downloads/Python-$(PYTHON_VERSION).tgz --strip-components 1 -C $$(PYTHON_DIR-$1)
@@ -412,7 +418,7 @@ build/$1/xz/lib/liblzma.a: $$(foreach target,$$(TARGETS-$1),$$(XZ_DIR-$$(target)
412418

413419
$1: Python-$1
414420

415-
Python-$1: $$(PYTHON_FRAMEWORK-$1)
421+
Python-$1: dist/Python-$(PYTHON_VER)-$1-support.b$(BUILD_NUMBER).tar.gz
416422

417423
# Build Python
418424
$$(PYTHON_FRAMEWORK-$1): build/$1/libpython$(PYTHON_VER)m.a $$(foreach target,$$(TARGETS-$1),build/$1/$$(pyconfig.h-$$(target)))
@@ -467,7 +473,7 @@ pip: Python-macOS
467473
$(HOST_PYTHON) -m ensurepip
468474

469475
# Create the directory that will contain installed packages
470-
dist/app_packages: pip
476+
dist/app_packages:
471477
mkdir -p dist/app_packages
472478

473479
# Makefiles for individual binary packages that are supported.

patch/numpy/Makefile.numpy

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ endef
3636
define build-numpy
3737
$$(foreach target,$$(TARGETS-$1),$$(eval $$(call build-numpy-target,$$(target),$1)))
3838

39-
build/$1/packages/numpy: downloads/numpy-$(NUMPY_VERSION).tgz
39+
build/$1/packages/numpy: pip downloads/numpy-$(NUMPY_VERSION).tgz
4040
# Unpack numpy sources
4141
mkdir -p build/$1/packages/numpy
4242
tar zxf downloads/numpy-$(NUMPY_VERSION).tgz --strip-components 1 -C build/$1/packages/numpy
@@ -50,12 +50,12 @@ ifeq ($1,macOS)
5050
# Just install the source as-is into the dist/app_packages directory
5151
# Then clean out all the binary artefacts
5252

53-
dist/app_packages/numpy: dist/app_packages build/$1/packages/numpy
54-
cd build/$1/packages/numpy && \
53+
dist/app_packages/numpy: pip dist/app_packages build/macOS/packages/numpy
54+
cd build/macOS/packages/numpy && \
5555
$(NUMPY_CONFIG) $(HOST_PIP) install --target $(PROJECT_DIR)/dist/app_packages .
56-
find build/$1/packages/numpy -name "*.so" -exec rm {} \;
56+
find build/macOS/packages/numpy -name "*.so" -exec rm {} \;
5757

58-
numpy-$1: dist/app_packages/numpy
58+
numpy-macOS: dist/app_packages/numpy
5959

6060
else
6161
# For all other platforms, run the numpy build for each target architecture
@@ -75,4 +75,4 @@ endef
7575
$(foreach os,$(OS),$(eval $(call build-numpy,$(os))))
7676

7777
# Main entry point
78-
numpy: pip $(foreach os,$(OS),numpy-$(os))
78+
numpy: $(foreach os,$(OS),numpy-$(os))

0 commit comments

Comments
 (0)