mirror of
https://github.com/novatiq/packages.git
synced 2026-07-28 22:43:06 +01:00
python: import package as-is from old packages
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
This commit is contained in:
@@ -0,0 +1,112 @@
|
||||
---
|
||||
Makefile.pre.in | 25 +++++++++++++------------
|
||||
1 file changed, 13 insertions(+), 12 deletions(-)
|
||||
|
||||
--- a/Makefile.pre.in
|
||||
+++ b/Makefile.pre.in
|
||||
@@ -182,6 +182,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
|
||||
|
||||
PYTHON= python$(EXE)
|
||||
BUILDPYTHON= python$(BUILDEXE)
|
||||
+HOSTPYTHON= $(BUILDPYTHON)
|
||||
|
||||
# The task to run while instrument when building the profile-opt target
|
||||
PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
|
||||
@@ -214,6 +215,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
|
||||
##########################################################################
|
||||
# Parser
|
||||
PGEN= Parser/pgen$(EXE)
|
||||
+HOSTPGEN= $(PGEN)$(EXE)
|
||||
|
||||
POBJS= \
|
||||
Parser/acceler.o \
|
||||
@@ -384,7 +386,7 @@ build_all_generate_profile:
|
||||
$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-generate" LIBS="$(LIBS) -lgcov"
|
||||
|
||||
run_profile_task:
|
||||
- ./$(BUILDPYTHON) $(PROFILE_TASK)
|
||||
+ $(HOSTPYTHON) $(PROFILE_TASK)
|
||||
|
||||
build_all_use_profile:
|
||||
$(MAKE) all CFLAGS="$(CFLAGS) -fprofile-use"
|
||||
@@ -402,14 +404,14 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
|
||||
$(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
|
||||
|
||||
platform: $(BUILDPYTHON)
|
||||
- $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
|
||||
+ $(RUNSHARED) $(HOSTPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
|
||||
|
||||
|
||||
# Build the shared modules
|
||||
sharedmods: $(BUILDPYTHON)
|
||||
@case $$MAKEFLAGS in \
|
||||
- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
|
||||
- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
|
||||
+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
|
||||
+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
|
||||
esac
|
||||
|
||||
# Build static library
|
||||
@@ -543,7 +545,7 @@ Modules/python.o: $(srcdir)/Modules/pyth
|
||||
$(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
|
||||
Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
|
||||
-@$(INSTALL) -d Include
|
||||
- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
|
||||
+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
|
||||
-touch Parser/pgen.stamp
|
||||
|
||||
$(PGEN): $(PGENOBJS)
|
||||
@@ -708,7 +710,7 @@ $(LIBRARY_OBJS) $(MODOBJS) Modules/pytho
|
||||
|
||||
TESTOPTS= -l $(EXTRATESTOPTS)
|
||||
TESTPROG= $(srcdir)/Lib/test/regrtest.py
|
||||
-TESTPYTHON= $(RUNSHARED) ./$(BUILDPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
|
||||
+TESTPYTHON= $(RUNSHARED) $(HOSTPYTHON) -Wd -3 -E -tt $(TESTPYTHONOPTS)
|
||||
test: all platform
|
||||
-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
|
||||
-$(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
|
||||
@@ -1062,7 +1064,7 @@ libainstall: all python-config
|
||||
# Install the dynamically loadable modules
|
||||
# This goes into $(exec_prefix)
|
||||
sharedinstall: sharedmods
|
||||
- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
|
||||
+ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
|
||||
--prefix=$(prefix) \
|
||||
--install-scripts=$(BINDIR) \
|
||||
--install-platlib=$(DESTSHARED) \
|
||||
@@ -1100,7 +1102,7 @@ frameworkinstallstructure: $(LDLIBRARY)
|
||||
fi; \
|
||||
done
|
||||
$(LN) -fsn include/python$(VERSION) $(DESTDIR)$(prefix)/Headers
|
||||
- sed 's/%VERSION%/'"`$(RUNSHARED) ./$(BUILDPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
|
||||
+ sed 's/%VERSION%/'"`$(RUNSHARED) $(HOSTPYTHON) -c 'import platform; print platform.python_version()'`"'/g' < $(RESSRCDIR)/Info.plist > $(DESTDIR)$(prefix)/Resources/Info.plist
|
||||
$(LN) -fsn $(VERSION) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Versions/Current
|
||||
$(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/$(PYTHONFRAMEWORK)
|
||||
$(LN) -fsn Versions/Current/Headers $(DESTDIR)$(PYTHONFRAMEWORKINSTALLDIR)/Headers
|
||||
@@ -1135,7 +1137,7 @@ frameworkinstallextras:
|
||||
# This installs a few of the useful scripts in Tools/scripts
|
||||
scriptsinstall:
|
||||
SRCDIR=$(srcdir) $(RUNSHARED) \
|
||||
- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/setup.py install \
|
||||
+ $(HOSTPYTHON) $(srcdir)/Tools/scripts/setup.py install \
|
||||
--prefix=$(prefix) \
|
||||
--install-scripts=$(BINDIR) \
|
||||
--root=$(DESTDIR)/
|
||||
@@ -1157,7 +1159,7 @@ config.status: $(srcdir)/configure
|
||||
|
||||
# Run reindent on the library
|
||||
reindent:
|
||||
- ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
|
||||
+ $(HOSTPYTHON) $(srcdir)/Tools/scripts/reindent.py -r $(srcdir)/Lib
|
||||
|
||||
# Rerun configure with the same options as it was run last time,
|
||||
# provided the config.status script exists
|
||||
@@ -1260,7 +1262,7 @@ funny:
|
||||
|
||||
# Perform some verification checks on any modified files.
|
||||
patchcheck:
|
||||
- $(RUNSHARED) ./$(BUILDPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
|
||||
+ $(RUNSHARED) $(HOSTPYTHON) $(srcdir)/Tools/scripts/patchcheck.py
|
||||
|
||||
# Dependencies
|
||||
|
||||
Reference in New Issue
Block a user