| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2df52ac commit a2edd3a
9 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -69,8 +69,8 @@ PyAPI_FUNC(const char *) Py_GetCopyright(void); | |||
| 69 | 69 | PyAPI_FUNC(const char *) Py_GetCompiler(void); | |
| 70 | 70 | PyAPI_FUNC(const char *) Py_GetBuildInfo(void); | |
| 71 | 71 | #ifndef Py_LIMITED_API | |
| 72 | - PyAPI_FUNC(const char *) _Py_hgidentifier(void); | ||
| 73 | - PyAPI_FUNC(const char *) _Py_hgversion(void); | ||
| 72 | + PyAPI_FUNC(const char *) _Py_gitidentifier(void); | ||
| 73 | + PyAPI_FUNC(const char *) _Py_gitversion(void); | ||
| 74 | 74 | #endif | |
| 75 | 75 | ||
| 76 | 76 | /* Internal -- various one-time initializations */ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1199,7 +1199,9 @@ def _sys_version(sys_version=None): | |||
| 1199 | 1199 | elif buildtime: | |
| 1200 | 1200 | builddate = builddate + ' ' + buildtime | |
| 1201 | 1201 | ||
| 1202 | - if hasattr(sys, '_mercurial'): | ||
| 1202 | + if hasattr(sys, '_git'): | ||
| 1203 | + _, branch, revision = sys._git | ||
| 1204 | + elif hasattr(sys, '_mercurial'): | ||
| 1203 | 1205 | _, branch, revision = sys._mercurial | |
| 1204 | 1206 | elif hasattr(sys, 'subversion'): | |
| 1205 | 1207 | # sys.subversion was added in Python 2.5 | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -66,12 +66,12 @@ def test_processor(self): | |||
| 66 | 66 | ||
| 67 | 67 | def setUp(self): | |
| 68 | 68 | self.save_version = sys.version | |
| 69 | - self.save_mercurial = sys._mercurial | ||
| 69 | + self.save_git = sys._git | ||
| 70 | 70 | self.save_platform = sys.platform | |
| 71 | 71 | ||
| 72 | 72 | def tearDown(self): | |
| 73 | 73 | sys.version = self.save_version | |
| 74 | - sys._mercurial = self.save_mercurial | ||
| 74 | + sys._git = self.save_git | ||
| 75 | 75 | sys.platform = self.save_platform | |
| 76 | 76 | ||
| 77 | 77 | def test_sys_version(self): | |
@@ -101,7 +101,7 @@ def test_sys_version(self): | |||
| 101 | 101 | ('CPython', '2.4.3', '', '', 'truncation', '', 'GCC')), | |
| 102 | 102 | ): | |
| 103 | 103 | # branch and revision are not "parsed", but fetched | |
| 104 | - # from sys._mercurial. Ignore them | ||
| 104 | + # from sys._git. Ignore them | ||
| 105 | 105 | (name, version, branch, revision, buildno, builddate, compiler) \ | |
| 106 | 106 | = platform._sys_version(input) | |
| 107 | 107 | self.assertEqual( | |
@@ -148,10 +148,10 @@ def test_sys_version(self): | |||
| 148 | 148 | sys_versions.items(): | |
| 149 | 149 | sys.version = version_tag | |
| 150 | 150 | if subversion is None: | |
| 151 | - if hasattr(sys, "_mercurial"): | ||
| 152 | - del sys._mercurial | ||
| 151 | + if hasattr(sys, "_git"): | ||
| 152 | + del sys._git | ||
| 153 | 153 | else: | |
| 154 | - sys._mercurial = subversion | ||
| 154 | + sys._git = subversion | ||
| 155 | 155 | if sys_platform is not None: | |
| 156 | 156 | sys.platform = sys_platform | |
| 157 | 157 | self.assertEqual(platform.python_implementation(), info[0]) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,9 +41,9 @@ RANLIB= @RANLIB@ | |||
| 41 | 41 | READELF= @READELF@ | |
| 42 | 42 | SOABI= @SOABI@ | |
| 43 | 43 | LDVERSION= @LDVERSION@ | |
| 44 | - HGVERSION= @HGVERSION@ | ||
| 45 | - HGTAG= @HGTAG@ | ||
| 46 | - HGBRANCH= @HGBRANCH@ | ||
| 44 | + GITVERSION= @GITVERSION@ | ||
| 45 | + GITTAG= @GITTAG@ | ||
| 46 | + GITBRANCH= @GITBRANCH@ | ||
| 47 | 47 | PGO_PROF_GEN_FLAG=@PGO_PROF_GEN_FLAG@ | |
| 48 | 48 | PGO_PROF_USE_FLAG=@PGO_PROF_USE_FLAG@ | |
| 49 | 49 | LLVM_PROF_MERGER=@LLVM_PROF_MERGER@ | |
@@ -739,9 +739,9 @@ Modules/getbuildinfo.o: $(PARSER_OBJS) \ | |||
| 739 | 739 | $(MODOBJS) \ | |
| 740 | 740 | $(srcdir)/Modules/getbuildinfo.c | |
| 741 | 741 | $(CC) -c $(PY_CORE_CFLAGS) \ | |
| 742 | - -DHGVERSION="\"`LC_ALL=C $(HGVERSION)`\"" \ | ||
| 743 | - -DHGTAG="\"`LC_ALL=C $(HGTAG)`\"" \ | ||
| 744 | - -DHGBRANCH="\"`LC_ALL=C $(HGBRANCH)`\"" \ | ||
| 742 | + -DGITVERSION="\"`LC_ALL=C $(GITVERSION)`\"" \ | ||
| 743 | + -DGITTAG="\"`LC_ALL=C $(GITTAG)`\"" \ | ||
| 744 | + -DGITBRANCH="\"`LC_ALL=C $(GITBRANCH)`\"" \ | ||
| 745 | 745 | -o $@ $(srcdir)/Modules/getbuildinfo.c | |
| 746 | 746 | ||
| 747 | 747 | Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -127,11 +127,6 @@ Tests | |||
| 127 | 127 | determine the candidate encoding for the test regex (allowing it to correctly | |
| 128 | 128 | skip the test when the default locale encoding is a multi-byte encoding) | |
| 129 | 129 | ||
| 130 | - Build | ||
| 131 | - ----- | ||
| 132 | - | ||
| 133 | - - bpo-29572: Update Windows build and OS X installers to use OpenSSL 1.0.2k. | ||
| 134 | - | ||
| 135 | 130 | ||
| 136 | 131 | What's New in Python 3.5.3? | |
| 137 | 132 | =========================== | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,47 +21,47 @@ | |||
| 21 | 21 | #endif | |
| 22 | 22 | ||
| 23 | 23 | /* XXX Only unix build process has been tested */ | |
| 24 | - #ifndef HGVERSION | ||
| 25 | - #define HGVERSION "" | ||
| 24 | + #ifndef GITVERSION | ||
| 25 | + #define GITVERSION "" | ||
| 26 | 26 | #endif | |
| 27 | - #ifndef HGTAG | ||
| 28 | - #define HGTAG "" | ||
| 27 | + #ifndef GITTAG | ||
| 28 | + #define GITTAG "" | ||
| 29 | 29 | #endif | |
| 30 | - #ifndef HGBRANCH | ||
| 31 | - #define HGBRANCH "" | ||
| 30 | + #ifndef GITBRANCH | ||
| 31 | + #define GITBRANCH "" | ||
| 32 | 32 | #endif | |
| 33 | 33 | ||
| 34 | 34 | const char * | |
| 35 | 35 | Py_GetBuildInfo(void) | |
| 36 | 36 | { | |
| 37 | - static char buildinfo[50 + sizeof(HGVERSION) + | ||
| 38 | - ((sizeof(HGTAG) > sizeof(HGBRANCH)) ? | ||
| 39 | - sizeof(HGTAG) : sizeof(HGBRANCH))]; | ||
| 40 | - const char *revision = _Py_hgversion(); | ||
| 37 | + static char buildinfo[50 + sizeof(GITVERSION) + | ||
| 38 | + ((sizeof(GITTAG) > sizeof(GITBRANCH)) ? | ||
| 39 | + sizeof(GITTAG) : sizeof(GITBRANCH))]; | ||
| 40 | + const char *revision = _Py_gitversion(); | ||
| 41 | 41 | const char *sep = *revision ? ":" : ""; | |
| 42 | - const char *hgid = _Py_hgidentifier(); | ||
| 43 | - if (!(*hgid)) | ||
| 44 | - hgid = "default"; | ||
| 42 | + const char *gitid = _Py_gitidentifier(); | ||
| 43 | + if (!(*gitid)) | ||
| 44 | + gitid = "default"; | ||
| 45 | 45 | PyOS_snprintf(buildinfo, sizeof(buildinfo), | |
| 46 | - "%s%s%s, %.20s, %.9s", hgid, sep, revision, | ||
| 46 | + "%s%s%s, %.20s, %.9s", gitid, sep, revision, | ||
| 47 | 47 | DATE, TIME); | |
| 48 | 48 | return buildinfo; | |
| 49 | 49 | } | |
| 50 | 50 | ||
| 51 | 51 | const char * | |
| 52 | - _Py_hgversion(void) | ||
| 52 | + _Py_gitversion(void) | ||
| 53 | 53 | { | |
| 54 | - return HGVERSION; | ||
| 54 | + return GITVERSION; | ||
| 55 | 55 | } | |
| 56 | 56 | ||
| 57 | 57 | const char * | |
| 58 | - _Py_hgidentifier(void) | ||
| 58 | + _Py_gitidentifier(void) | ||
| 59 | 59 | { | |
| 60 | - const char *hgtag, *hgid; | ||
| 61 | - hgtag = HGTAG; | ||
| 62 | - if ((*hgtag) && strcmp(hgtag, "tip") != 0) | ||
| 63 | - hgid = hgtag; | ||
| 60 | + const char *gittag, *gitid; | ||
| 61 | + gittag = GITTAG; | ||
| 62 | + if ((*gittag) && strcmp(gittag, "undefined") != 0) | ||
| 63 | + gitid = gittag; | ||
| 64 | 64 | else | |
| 65 | - hgid = HGBRANCH; | ||
| 66 | - return hgid; | ||
| 65 | + gitid = GITBRANCH; | ||
| 66 | + return gitid; | ||
| 67 | 67 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1816,9 +1816,9 @@ _PySys_Init(void) | |||
| 1816 | 1816 | PyUnicode_FromString(Py_GetVersion())); | |
| 1817 | 1817 | SET_SYS_FROM_STRING("hexversion", | |
| 1818 | 1818 | PyLong_FromLong(PY_VERSION_HEX)); | |
| 1819 | - SET_SYS_FROM_STRING("_mercurial", | ||
| 1820 | - Py_BuildValue("(szz)", "CPython", _Py_hgidentifier(), | ||
| 1821 | - _Py_hgversion())); | ||
| 1819 | + SET_SYS_FROM_STRING("_git", | ||
| 1820 | + Py_BuildValue("(szz)", "CPython", _Py_gitidentifier(), | ||
| 1821 | + _Py_gitversion())); | ||
| 1822 | 1822 | SET_SYS_FROM_STRING("dont_write_bytecode", | |
| 1823 | 1823 | PyBool_FromLong(Py_DontWriteBytecodeFlag)); | |
| 1824 | 1824 | SET_SYS_FROM_STRING("api_version", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -757,10 +757,10 @@ build_os | |||
| 757 | 757 | build_vendor | |
| 758 | 758 | build_cpu | |
| 759 | 759 | build | |
| 760 | - HAS_HG | ||
| 761 | - HGBRANCH | ||
| 762 | - HGTAG | ||
| 763 | - HGVERSION | ||
| 760 | + HAS_GIT | ||
| 761 | + GITBRANCH | ||
| 762 | + GITTAG | ||
| 763 | + GITVERSION | ||
| 764 | 764 | BASECPPFLAGS | |
| 765 | 765 | target_alias | |
| 766 | 766 | host_alias | |
@@ -2839,17 +2839,17 @@ fi | |||
| 2839 | 2839 | ||
| 2840 | 2840 | ||
| 2841 | 2841 | ||
| 2842 | - if test -e $srcdir/.hg/dirstate | ||
| 2842 | + if test -e $srcdir/.git/HEAD | ||
| 2843 | 2843 | then | |
| 2844 | - # Extract the first word of "hg", so it can be a program name with args. | ||
| 2845 | - set dummy hg; ac_word=$2 | ||
| 2844 | + # Extract the first word of "git", so it can be a program name with args. | ||
| 2845 | + set dummy git; ac_word=$2 | ||
| 2846 | 2846 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 2847 | 2847 | $as_echo_n "checking for $ac_word... " >&6; } | |
| 2848 | - if ${ac_cv_prog_HAS_HG+:} false; then : | ||
| 2848 | + if ${ac_cv_prog_HAS_GIT+:} false; then : | ||
| 2849 | 2849 | $as_echo_n "(cached) " >&6 | |
| 2850 | 2850 | else | |
| 2851 | - if test -n "$HAS_HG"; then | ||
| 2852 | - ac_cv_prog_HAS_HG="$HAS_HG" # Let the user override the test. | ||
| 2851 | + if test -n "$HAS_GIT"; then | ||
| 2852 | + ac_cv_prog_HAS_GIT="$HAS_GIT" # Let the user override the test. | ||
| 2853 | 2853 | else | |
| 2854 | 2854 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 2855 | 2855 | for as_dir in $PATH | |
@@ -2858,39 +2858,39 @@ do | |||
| 2858 | 2858 | test -z "$as_dir" && as_dir=. | |
| 2859 | 2859 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 2860 | 2860 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then | |
| 2861 | - ac_cv_prog_HAS_HG="found" | ||
| 2861 | + ac_cv_prog_HAS_GIT="found" | ||
| 2862 | 2862 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 | |
| 2863 | 2863 | break 2 | |
| 2864 | 2864 | fi | |
| 2865 | 2865 | done | |
| 2866 | 2866 | done | |
| 2867 | 2867 | IFS=$as_save_IFS | |
| 2868 | 2868 | ||
| 2869 | - test -z "$ac_cv_prog_HAS_HG" && ac_cv_prog_HAS_HG="not-found" | ||
| 2869 | + test -z "$ac_cv_prog_HAS_GIT" && ac_cv_prog_HAS_GIT="not-found" | ||
| 2870 | 2870 | fi | |
| 2871 | 2871 | fi | |
| 2872 | - HAS_HG=$ac_cv_prog_HAS_HG | ||
| 2873 | - if test -n "$HAS_HG"; then | ||
| 2874 | - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_HG" >&5 | ||
| 2875 | - $as_echo "$HAS_HG" >&6; } | ||
| 2872 | + HAS_GIT=$ac_cv_prog_HAS_GIT | ||
| 2873 | + if test -n "$HAS_GIT"; then | ||
| 2874 | + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HAS_GIT" >&5 | ||
| 2875 | + $as_echo "$HAS_GIT" >&6; } | ||
| 2876 | 2876 | else | |
| 2877 | 2877 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 2878 | 2878 | $as_echo "no" >&6; } | |
| 2879 | 2879 | fi | |
| 2880 | 2880 | ||
| 2881 | 2881 | ||
| 2882 | 2882 | else | |
| 2883 | - HAS_HG=no-repository | ||
| 2883 | + HAS_GIT=no-repository | ||
| 2884 | 2884 | fi | |
| 2885 | - if test $HAS_HG = found | ||
| 2885 | + if test $HAS_GIT = found | ||
| 2886 | 2886 | then | |
| 2887 | - HGVERSION="hg id -i \$(srcdir)" | ||
| 2888 | - HGTAG="hg id -t \$(srcdir)" | ||
| 2889 | - HGBRANCH="hg id -b \$(srcdir)" | ||
| 2887 | + GITVERSION="git -C \$(srcdir) rev-parse HEAD" | ||
| 2888 | + GITTAG="git -C \$(srcdir) name-rev --tags --name-only HEAD" | ||
| 2889 | + GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD" | ||
| 2890 | 2890 | else | |
| 2891 | - HGVERSION="" | ||
| 2892 | - HGTAG="" | ||
| 2893 | - HGBRANCH="" | ||
| 2891 | + GITVERSION="" | ||
| 2892 | + GITTAG="" | ||
| 2893 | + GITBRANCH="" | ||
| 2894 | 2894 | fi | |
| 2895 | 2895 | ||
| 2896 | 2896 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,25 +25,25 @@ else | |||
| 25 | 25 | BASECPPFLAGS="" | |
| 26 | 26 | fi | |
| 27 | 27 | ||
| 28 | - AC_SUBST(HGVERSION) | ||
| 29 | - AC_SUBST(HGTAG) | ||
| 30 | - AC_SUBST(HGBRANCH) | ||
| 28 | + AC_SUBST(GITVERSION) | ||
| 29 | + AC_SUBST(GITTAG) | ||
| 30 | + AC_SUBST(GITBRANCH) | ||
| 31 | 31 | ||
| 32 | - if test -e $srcdir/.hg/dirstate | ||
| 32 | + if test -e $srcdir/.git/HEAD | ||
| 33 | 33 | then | |
| 34 | - AC_CHECK_PROG(HAS_HG, hg, found, not-found) | ||
| 34 | + AC_CHECK_PROG(HAS_GIT, git, found, not-found) | ||
| 35 | 35 | else | |
| 36 | - HAS_HG=no-repository | ||
| 36 | + HAS_GIT=no-repository | ||
| 37 | 37 | fi | |
| 38 | - if test $HAS_HG = found | ||
| 38 | + if test $HAS_GIT = found | ||
| 39 | 39 | then | |
| 40 | - HGVERSION="hg id -i \$(srcdir)" | ||
| 41 | - HGTAG="hg id -t \$(srcdir)" | ||
| 42 | - HGBRANCH="hg id -b \$(srcdir)" | ||
| 40 | + GITVERSION="git -C \$(srcdir) rev-parse HEAD" | ||
| 41 | + GITTAG="git -C \$(srcdir) name-rev --tags --name-only HEAD" | ||
| 42 | + GITBRANCH="git -C \$(srcdir) name-rev --name-only HEAD" | ||
| 43 | 43 | else | |
| 44 | - HGVERSION="" | ||
| 45 | - HGTAG="" | ||
| 46 | - HGBRANCH="" | ||
| 44 | + GITVERSION="" | ||
| 45 | + GITTAG="" | ||
| 46 | + GITBRANCH="" | ||
| 47 | 47 | fi | |
| 48 | 48 | ||
| 49 | 49 | AC_CONFIG_SRCDIR([Include/object.h]) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments