59 lines
1.9 KiB
Diff
59 lines
1.9 KiB
Diff
--- setup.py
|
|
+++ setup.py
|
|
@@ -77,7 +77,7 @@
|
|
return sys.platform
|
|
|
|
|
|
-CROSS_COMPILING = ("_PYTHON_HOST_PLATFORM" in os.environ)
|
|
+CROSS_COMPILING = ("_PYTHON_HOST_PLATFORM" in os.environ) or ('PYTHONXCPREFIX' in os.environ)
|
|
HOST_PLATFORM = get_platform()
|
|
MS_WINDOWS = (HOST_PLATFORM == 'win32')
|
|
CYGWIN = (HOST_PLATFORM == 'cygwin')
|
|
@@ -898,6 +898,10 @@
|
|
if HOST_PLATFORM == 'hp-ux11':
|
|
self.lib_dirs += ['/usr/lib/hpux64', '/usr/lib/hpux32']
|
|
|
|
+ if 'XBPS_CROSS_BASE' in os.environ:
|
|
+ self.lib_dirs += [os.environ['XBPS_CROSS_BASE'] + '/usr/lib']
|
|
+ self.inc_dirs += [os.environ['XBPS_CROSS_BASE'] + '/usr/include']
|
|
+
|
|
if MACOS:
|
|
# This should work on any unixy platform ;-)
|
|
# If the user has bothered specifying additional -I and -L flags
|
|
--- Makefile.pre.in
|
|
+++ Makefile.pre.in
|
|
@@ -1743,8 +1743,6 @@
|
|
upgrade) ensurepip="--upgrade" ;; \
|
|
install|*) ensurepip="" ;; \
|
|
esac; \
|
|
- $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
|
|
- $$ensurepip --root=$(DESTDIR)/ ; \
|
|
fi
|
|
|
|
altinstall: commoninstall
|
|
@@ -1753,8 +1751,6 @@
|
|
upgrade) ensurepip="--altinstall --upgrade" ;; \
|
|
install|*) ensurepip="--altinstall" ;; \
|
|
esac; \
|
|
- $(RUNSHARED) $(PYTHON_FOR_BUILD) -m ensurepip \
|
|
- $$ensurepip --root=$(DESTDIR)/ ; \
|
|
fi
|
|
|
|
commoninstall: check-clean-src @FRAMEWORKALTINSTALLFIRST@ \
|
|
@@ -2226,11 +2222,12 @@
|
|
# Install the dynamically loadable modules
|
|
# This goes into $(exec_prefix)
|
|
sharedinstall: all
|
|
+ CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' \
|
|
$(RUNSHARED) $(PYTHON_FOR_BUILD) $(srcdir)/setup.py install \
|
|
--prefix=$(prefix) \
|
|
- --install-scripts=$(BINDIR) \
|
|
- --install-platlib=$(DESTSHARED) \
|
|
- --root=$(DESTDIR)/
|
|
+ --install-scripts=$(DESTDIR)$(BINDIR) \
|
|
+ --install-platlib=$(DESTDIR)$(DESTSHARED) \
|
|
+ --root=/
|
|
-rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata_$(ABIFLAGS)_$(MACHDEP)_$(MULTIARCH).py
|
|
-rm -r $(DESTDIR)$(DESTSHARED)/__pycache__
|
|
|