summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorYen Chi Hsuan2017-02-15 01:26:20 +0800
committerYen Chi Hsuan2017-02-15 01:51:45 +0800
commit33d928f23096ef401ee9e81973a89972ae0a3574 (patch)
tree13711e0fd091972a0d8f585eeb0038f1c7310436
parent51f72707a5e49d72cf394b48ca67397320524cc0 (diff)
downloadaur-33d928f23096ef401ee9e81973a89972ae0a3574.tar.gz
CPython has migrated to GitHub
-rw-r--r--.SRCINFO12
-rw-r--r--PKGBUILD27
-rw-r--r--boot-flag.patch89
3 files changed, 112 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8a5f1ee07fb7..91de1af0c31c 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
-pkgbase = python-hg
+pkgbase = python-git
pkgdesc = Next generation of the python high-level scripting language
- pkgver = 3.7.0a0.r104865+.a6e59a2e880e+
+ pkgver = 3.7.0a0.r98657.e7ffb99f84
pkgrel = 1
url = http://www.python.org/
arch = i686
@@ -10,7 +10,7 @@ pkgbase = python-hg
makedepends = sqlite
makedepends = valgrind
makedepends = bluez-libs
- makedepends = mercurial
+ makedepends = git
depends = expat
depends = bzip2
depends = gdbm
@@ -22,8 +22,10 @@ pkgbase = python-hg
options = debug
options = !strip
options = !makeflags
- source = hg+https://hg.python.org/cpython#branch=default
+ source = git+https://github.com/python/cpython#branch=master
+ source = boot-flag.patch
sha256sums = SKIP
+ sha256sums = 940202895732185da4548b6a1fb01ad080cd188c21a149359eb178fdcfb613f9
-pkgname = python-hg
+pkgname = python-git
diff --git a/PKGBUILD b/PKGBUILD
index b3d534d31b7f..6665c60cc930 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Daniel Milde <daniel@milde.cz>
-pkgname=python-hg
-pkgver=3.7.0a0.r104865+.a6e59a2e880e+
+pkgname=python-git
+pkgver=3.7.0a0.r98657.e7ffb99f84
pkgrel=1
_pybasever=3.7
_pkgname=cpython
@@ -10,19 +10,20 @@ arch=('i686' 'x86_64')
license=('custom')
url="http://www.python.org/"
depends=('expat' 'bzip2' 'gdbm' 'openssl' 'libffi' 'zlib')
-makedepends=('tk>=8.6.0' 'sqlite' 'valgrind' 'bluez-libs' 'mercurial')
+makedepends=('tk>=8.6.0' 'sqlite' 'valgrind' 'bluez-libs' 'git')
optdepends=('tk: for tkinter' 'sqlite')
options=(debug !strip !makeflags)
-source=("hg+https://hg.python.org/cpython#branch=default")
-sha256sums=('SKIP')
+source=("git+https://github.com/python/cpython#branch=master"
+ 'boot-flag.patch')
+sha256sums=('SKIP'
+ '940202895732185da4548b6a1fb01ad080cd188c21a149359eb178fdcfb613f9')
pkgver() {
cd "${srcdir}/${_pkgname}"
printf "%s.r%s.%s" \
"3.7.0a0" \
- "$(hg identify -n)" \
- "$(hg identify -i)"
- #"$(hg tags | awk 'NR==2 {print $1}' | sed -E 's/^v//;s/([a-z])/.\1/')" \
+ "$(git rev-list --count HEAD)" \
+ "$(git rev-parse --short HEAD)"
}
prepare() {
@@ -36,6 +37,9 @@ prepare() {
rm -rf Modules/expat
rm -rf Modules/zlib
rm -rf Modules/_ctypes/{darwin,libffi}*
+
+ # http://bugs.python.org/issue23404
+ patch -p1 -i ../boot-flag.patch
}
build() {
@@ -52,15 +56,16 @@ build() {
--with-system-ffi
# http://bugs.python.org/issue26662
- make touch
+ # `make touch` does not work with git clones: http://bugs.python.org/issue23404
+ # make touch
- make
+ make BOOT='#'
}
package() {
cd "${srcdir}/${_pkgname}"
# altinstall: /usr/bin/pythonX.Y but not /usr/bin/python or /usr/bin/pythonX
- make DESTDIR="${pkgdir}" altinstall maninstall
+ make BOOT='#' DESTDIR="${pkgdir}" altinstall maninstall
# Work around a conflict with 3.4 the 'python' package.
rm "${pkgdir}/usr/lib/libpython3.so"
diff --git a/boot-flag.patch b/boot-flag.patch
new file mode 100644
index 000000000000..f835b1c50cc5
--- /dev/null
+++ b/boot-flag.patch
@@ -0,0 +1,89 @@
+diff --git a/Makefile.pre.in b/Makefile.pre.in
+index 8752a02031..a7c8c5ad1e 100644
+--- a/Makefile.pre.in
++++ b/Makefile.pre.in
+@@ -247,6 +247,10 @@ COVERAGE_INFO= $(abs_builddir)/coverage.info
+ COVERAGE_REPORT=$(abs_builddir)/lcov-report
+ COVERAGE_REPORT_OPTIONS=--no-branch-coverage --title "CPython lcov report"
+
++# Run <make BOOT="#"> to avoid regenerating existing files, as an
++# alternative to the "make touch" rule.
++BOOT=
++
+
+ # === Definitions added by makesetup ===
+
+@@ -726,8 +730,7 @@ Python/importlib_external.h: @GENERATED_COMMENT@ $(srcdir)/Lib/importlib/_bootst
+ $(srcdir)/Lib/importlib/_bootstrap_external.py Python/importlib_external.h
+
+ Python/importlib.h: @GENERATED_COMMENT@ $(srcdir)/Lib/importlib/_bootstrap.py Programs/_freeze_importlib Python/marshal.c
+- ./Programs/_freeze_importlib \
+- $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h
++ $(BOOT)./Programs/_freeze_importlib $(srcdir)/Lib/importlib/_bootstrap.py Python/importlib.h
+
+
+ ############################################################################
+@@ -788,10 +791,10 @@ Python/sysmodule.o: $(srcdir)/Python/sysmodule.c Makefile
+ $(IO_OBJS): $(IO_H)
+
+ $(GRAMMAR_H): @GENERATED_COMMENT@ $(GRAMMAR_INPUT) $(PGEN)
+- @$(MKDIR_P) Include
+- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
++ @$(BOOT)$(MKDIR_P) Include
++ $(BOOT)$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ $(GRAMMAR_C): @GENERATED_COMMENT@ $(GRAMMAR_H)
+- touch $(GRAMMAR_C)
++ $(BOOT)touch $(GRAMMAR_C)
+
+ $(PGEN): $(PGENOBJS)
+ $(CC) $(OPT) $(PY_LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
+@@ -808,15 +811,15 @@ Parser/printgrammar.o: $(srcdir)/Parser/printgrammar.c
+ Parser/pgenmain.o: $(srcdir)/Include/parsetok.h
+
+ $(AST_H): $(AST_ASDL) $(ASDLGEN_FILES)
+- $(MKDIR_P) $(AST_H_DIR)
+- $(ASDLGEN) -h $(AST_H_DIR) $(AST_ASDL)
++ $(BOOT)$(MKDIR_P) $(AST_H_DIR)
++ $(BOOT)$(ASDLGEN) -h $(AST_H_DIR) $(AST_ASDL)
+
+ $(AST_C): $(AST_H) $(AST_ASDL) $(ASDLGEN_FILES)
+- $(MKDIR_P) $(AST_C_DIR)
+- $(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL)
++ $(BOOT)$(MKDIR_P) $(AST_C_DIR)
++ $(BOOT)$(ASDLGEN) -c $(AST_C_DIR) $(AST_ASDL)
+
+ $(OPCODE_H): $(srcdir)/Lib/opcode.py $(OPCODE_H_SCRIPT)
+- $(OPCODE_H_GEN)
++ $(BOOT)$(OPCODE_H_GEN)
+
+ Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
+
+@@ -869,7 +872,7 @@ Objects/dictobject.o: $(srcdir)/Objects/stringlib/eq.h $(srcdir)/Objects/dict-co
+ Objects/setobject.o: $(srcdir)/Objects/stringlib/eq.h
+
+ $(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES)
+- $(PYTHON_FOR_GEN) $(OPCODETARGETGEN) $(OPCODETARGETS_H)
++ $(BOOT)$(PYTHON_FOR_GEN) $(OPCODETARGETGEN) $(OPCODETARGETS_H)
+
+ Python/ceval.o: $(OPCODETARGETS_H) $(srcdir)/Python/ceval_gil.h
+
+@@ -889,7 +892,7 @@ Python/pydtrace.o: $(srcdir)/Include/pydtrace.d $(DTRACE_DEPS)
+
+ Objects/typeobject.o: Objects/typeslots.inc
+ Objects/typeslots.inc: $(srcdir)/Include/typeslots.h $(srcdir)/Objects/typeslots.py
+- $(PYTHON_FOR_GEN) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h Objects/typeslots.inc
++ $(BOOT)$(PYTHON_FOR_GEN) $(srcdir)/Objects/typeslots.py < $(srcdir)/Include/typeslots.h Objects/typeslots.inc
+
+ ############################################################################
+ # Header files
+@@ -1566,8 +1569,8 @@ TAGS::
+
+ # This fixes up the mtimes of checked-in generated files, assuming that they
+ # only *appear* to be outdated because of checkout order.
+-# This is run while preparing a source release tarball, and can be run manually
+-# to avoid bootstrap issues.
++# This is run while preparing a source release tarball. It can also be run
++# manually to avoid bootstrap issues, as an alternative to setting BOOT="#".
+ touch:
+ cd $(srcdir); \
+ hg --config extensions.touch=Tools/hg/hgtouch.py touch -v