Skip to content

Commit 23ce3ce

Browse files
authored
Merge pull request swiftlang#48 from apple/shahmishal/fix-python3-six-amazonlinux2
Fix python3 six and make issue on Amazon Linux 2
2 parents bfc053a + 87b32c2 commit 23ce3ce

File tree

6 files changed

+10
-7
lines changed

6 files changed

+10
-7
lines changed

Diff for: platforms/Linux/amazonlinux/2/Dockerfile

+4
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ RUN yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.n
2121
ADD swiftlang.spec /tmp/swiftlang.spec
2222
RUN touch /tmp/metadata.inc # fake metadata is okay for this optimization
2323
RUN cd /tmp && yum-builddep -y swiftlang.spec
24+
25+
# fix python six
26+
RUN mkdir -p /usr/local/lib/python3.7/site-packages/
27+
RUN easy_install-3.7 six

Diff for: platforms/Linux/amazonlinux/2/swiftlang.spec

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Patch0: patches/swift-api-checker.patch
3535
Patch1: patches/hwasan_symbolize.patch
3636

3737
BuildRequires: clang
38-
BuildRequires: cmake
3938
BuildRequires: curl-devel
4039
BuildRequires: gcc-c++
4140
BuildRequires: git
@@ -45,6 +44,7 @@ BuildRequires: libedit-devel
4544
BuildRequires: libicu-devel
4645
BuildRequires: libuuid-devel
4746
BuildRequires: libxml2-devel
47+
BuildRequires: make
4848
BuildRequires: ncurses-devel
4949
BuildRequires: pexpect
5050
BuildRequires: pkgconfig

Diff for: platforms/Linux/centos/7/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@ RUN yum install -y epel-release centos-release-scl
2121
ADD swiftlang.spec /tmp/swiftlang.spec
2222
RUN touch /tmp/metadata.inc # fake metadata is okay for this optimization
2323
RUN cd /tmp && yum-builddep -y swiftlang.spec
24+
25+
# Workaround to support clang-3.5 or a later version
26+
RUN echo -e ". /opt/rh/sclo-git25/enable\n. /opt/rh/llvm-toolset-7/enable\n. /opt/rh/devtoolset-8/enable\n" >> $HOME/.bashrc
27+
RUN source $HOME/.bashrc
28+
RUN sed -i -e 's/\*__block/\*__libc_block/g' /usr/include/unistd.h

Diff for: platforms/Linux/centos/7/build_rpm.sh

-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ cp patches/*.patch $HOME/rpmbuild/SOURCES/
3232
pushd $HOME/rpmbuild/SPECS
3333
# install all the dependencies needed to build Swift from the spec file itself
3434
yum-builddep -y ./swiftlang.spec
35-
# Workaround to support clang-3.5 or a later version
36-
echo -e ". /opt/rh/sclo-git25/enable\n. /opt/rh/llvm-toolset-7/enable\n. /opt/rh/devtoolset-8/enable\n" >> $HOME/.bashrc
37-
source $HOME/.bashrc
38-
sed -i -e 's/\*__block/\*__libc_block/g' /usr/include/unistd.h
3935
# get the sources for Swift as defined in the spec file
4036
spectool -g -R ./swiftlang.spec
4137
# Now we proceed to build Swift. If this is successful, we

Diff for: platforms/Linux/centos/7/swiftlang.spec

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ Patch0: patches/swift-api-checker.patch
3535
Patch1: patches/hwasan_symbolize.patch
3636

3737
BuildRequires: autoconf
38-
BuildRequires: cmake
3938
BuildRequires: devtoolset-8
4039
BuildRequires: glibc-static
4140
BuildRequires: libatomic

Diff for: platforms/Linux/centos/8/swiftlang.spec

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Patch1: patches/hwasan_symbolize.patch
3636

3737
BuildRequires: autoconf
3838
BuildRequires: clang
39-
BuildRequires: cmake
4039
BuildRequires: diffutils
4140
BuildRequires: git
4241
BuildRequires: glibc-static

0 commit comments

Comments
 (0)