Merge branch 'bug/rst-disable-patch' into 'master'

Use forked github-markup gem

To use the forked version, we must undo some patching we did before.

I'm preserving one patch that changes the interpreter from `python2` to `python3` so that we don't change the required libraries for current source installs. This will let us release the change in a patch release instead of waiting for `8.13`.

Related issue: gitlab-org/gitlab-ce#21696

See merge request !1015
This commit is contained in:
Rémy Coutable 2016-10-14 09:43:18 +00:00
parent cf7e507866
commit 422d9bf200
3 changed files with 1 additions and 21 deletions

View File

@ -1,19 +0,0 @@
diff --git a/lib/github/commands/rest2html b/lib/github/commands/rest2html
index 7ecfe27..958cd3c 100755
--- a/lib/github/commands/rest2html
+++ b/lib/github/commands/rest2html
@@ -31,9 +31,11 @@ import sys
import os
# This fixes docutils failing with unicode parameters to CSV-Table. The -S
-# switch and the following 2 lines can be removed after upgrading to python 3.
-reload(sys)
-sys.setdefaultencoding('utf-8')
+# switch and the following 3 lines can be removed after upgrading to python 3.
+if sys.version_info[0] < 3:
+ reload(sys)
+ sys.setdefaultencoding('utf-8')
+
import site
try:

View File

@ -71,8 +71,7 @@ build do
# This patch makes the github-markup gem use and be compatible with Python3
# We've sent part of the changes upstream: https://github.com/github/markup/pull/919
patch source: 'github-markup_gem-markups.patch', target: "#{gems_directory}/github-markup-1.4.0/lib/github/markups.rb"
patch source: 'github-markup_gem-rest2html.patch', target: "#{gems_directory}/github-markup-1.4.0/lib/github/commands/rest2html"
patch source: 'gitlab-markup_gem-markups.patch', target: "#{gems_directory}/gitlab-markup-1.5.0/lib/github/markups.rb"
# In order to precompile the assets, we need to get to a state where rake can
# load the Rails environment.