Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Commit 6ff22e8

Browse files
committed
Merge branch 'dev' into 3.8
2 parents 76c8d5b + c685a09 commit 6ff22e8

File tree

4 files changed

+47
-19
lines changed

4 files changed

+47
-19
lines changed

Dockerfile

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,18 @@ FROM ubuntu:18.04
55

66
# Install the build requirements for Python.
77
RUN apt-get update -y && \
8-
apt-get install -y gcc make curl \
9-
libssl-dev libsqlite3-dev liblzma-dev libbz2-dev libgdbm-dev \
10-
libffi-dev zlib1g-dev
8+
apt-get install -y \
9+
gcc make curl \
10+
libbz2-dev \
11+
libffi-dev \
12+
libgdbm-compat-dev \
13+
libgdbm-dev \
14+
liblzma-dev \
15+
libncurses5-dev \
16+
libsqlite3-dev \
17+
libssl-dev \
18+
uuid-dev \
19+
zlib1g-dev
1120

1221
# Install the Makefile and exclude list, and build Python.
1322
# This Makefile will assume there are two external mountpoints:

Makefile

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,25 @@ PROJECT_DIR=$(shell pwd)
44
BUILD_NUMBER=custom
55

66
# Version of packages that will be compiled by this meta-package
7-
PYTHON_VERSION=3.8.6
7+
# PYTHON_VERSION is the full version number (e.g., 3.10.0b3)
8+
# PYTHON_MICRO_VERSION is the full version number, without any alpha/beta/rc suffix. (e.g., 3.10.0)
9+
# PYTHON_VER is the major/minor version (e.g., 3.10)
10+
PYTHON_VERSION=3.8.13
11+
PYTHON_MICRO_VERSION=$(shell echo $(PYTHON_VERSION) | grep -Po "\d+\.\d+\.\d+")
812
PYTHON_VER=$(basename $(PYTHON_VERSION))
13+
914
ARCH=$(shell uname -m)
1015

1116
all:
1217
@echo "***** Building $(PYTHON_VERSION) $(ARCH) build $(BUILD_NUMBER) *****"
18+
rm -rf build
1319
docker build -t beeware/python-linux-$(ARCH)-support .
14-
docker run -e BUILD_NUMBER=$(BUILD_NUMBER) -v $(PROJECT_DIR)/downloads:/local/downloads -v $(PROJECT_DIR)/dist:/local/dist beeware/python-linux-$(ARCH)-support
20+
docker run -e \
21+
BUILD_NUMBER=$(BUILD_NUMBER) \
22+
-v $(PROJECT_DIR)/downloads:/local/downloads \
23+
-v $(PROJECT_DIR)/dist:/local/dist \
24+
-v $(PROJECT_DIR)/build:/local/build \
25+
beeware/python-linux-$(ARCH)-support
1526

1627
# Clean all builds
1728
clean:
@@ -33,7 +44,10 @@ downloads: downloads/Python-$(PYTHON_VERSION).tgz dependencies
3344
# Download original Python source code archive.
3445
downloads/Python-$(PYTHON_VERSION).tgz:
3546
mkdir -p downloads
36-
if [ ! -e downloads/Python-$(PYTHON_VERSION).tgz ]; then curl -L https://www.python.org/ftp/python/$(PYTHON_VERSION)/Python-$(PYTHON_VERSION).tgz > downloads/Python-$(PYTHON_VERSION).tgz; fi
47+
if [ ! -e downloads/Python-$(PYTHON_VERSION).tgz ]; then \
48+
curl --fail -L https://www.python.org/ftp/python/$(PYTHON_MICRO_VERSION)/Python-$(PYTHON_VERSION).tgz \
49+
-o downloads/Python-$(PYTHON_VERSION).tgz; \
50+
fi
3751

3852
build:
3953
mkdir build
@@ -49,10 +63,21 @@ build/Python-$(PYTHON_VERSION)/Makefile: build downloads
4963
# Configure target Python
5064
cd build/Python-$(PYTHON_VERSION) && ./configure \
5165
--prefix=$(PROJECT_DIR)/build/python \
52-
--without-doc-strings --enable-ipv6 --without-ensurepip
53-
54-
build/python/bin/python$(PYTHON_VER)m: build/Python-$(PYTHON_VERSION)/Makefile
55-
cd build/Python-$(PYTHON_VERSION) && make install
66+
--enable-ipv6 \
67+
--enable-shared \
68+
--without-doc-strings \
69+
--without-ensurepip \
70+
2>&1 | tee -a ../python-$(PYTHON_VERSION).config.log
71+
72+
build/Python-$(PYTHON_VERSION)/python.exe: build/Python-$(PYTHON_VERSION)/Makefile
73+
cd build/Python-$(PYTHON_VERSION) && \
74+
make \
75+
2>&1 | tee -a ../python-$(PYTHON_VERSION).build.log
76+
77+
build/python/bin/python$(PYTHON_VER): build/Python-$(PYTHON_VERSION)/python.exe
78+
cd build/Python-$(PYTHON_VERSION) && \
79+
make install \
80+
2>&1 | tee -a ../python-$(PYTHON_VERSION).install.log
5681

5782
build/python/VERSIONS: dependencies
5883
echo "Python version: $(PYTHON_VERSION) " > build/python/VERSIONS
@@ -62,7 +87,7 @@ build/python/VERSIONS: dependencies
6287
echo "OpenSSL: $$(awk '$$2=="openssl" { print $$3 }' downloads/system.versions)" >> build/python/VERSIONS
6388
echo "XZ: $$(awk '$$2=="liblzma5:amd64" { print $$3 }' downloads/system.versions)" >> build/python/VERSIONS
6489

65-
dist/Python-$(PYTHON_VER)-linux-$(ARCH)-support.$(BUILD_NUMBER).tar.gz: dist build/python/bin/python$(PYTHON_VER)m build/python/VERSIONS
90+
dist/Python-$(PYTHON_VER)-linux-$(ARCH)-support.$(BUILD_NUMBER).tar.gz: dist build/python/bin/python$(PYTHON_VER) build/python/VERSIONS
6691
tar zcvf $@ -X exclude.list -C build/python `ls -A build/python`
6792

6893
Python: dist/Python-$(PYTHON_VER)-linux-$(ARCH)-support.$(BUILD_NUMBER).tar.gz

README.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Python Linux Support
22
====================
33

4-
**This repository branch builds a packaged version of Python 3.8.3**.
4+
**This repository branch builds a packaged version of Python 3.8.13**.
55
Other Python versions are available by cloning other branches of the main
66
repository.
77

@@ -18,7 +18,7 @@ project.
1818
Quickstart
1919
----------
2020

21-
A version of this package, compiled on Ubuntu 16.04, is available for `x86_64`_.
21+
A version of this package, compiled on Ubuntu 18.04, is available for `x86_64`_.
2222

2323
If you want to build your own version, you will need to have Docker installed.
2424
After installing docker, run::
@@ -35,12 +35,10 @@ This will:
3535
applications:
3636

3737
* ``2to3``, ``pip``, ``pydoc``, and ``python-configure`` binaries
38-
* include files
3938
* man pages
4039
* Testing code
4140
* ``idle``
4241
* ``tkinter``
43-
* ``curses``
4442
* ``turtle``
4543

4644
6. Build a tarball of the installed output.

exclude.list

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ bin/idle3*
88
bin/pydoc3*
99
bin/python3*-config
1010
bin/pyvenv*
11-
# Remove include/ directory, only useful for compiling C extension modules.
12-
include
1311
# Remove standard library test suites.
1412
lib/python*/ctypes/test
1513
lib/python*/distutils/tests
@@ -21,8 +19,6 @@ lib/python*/lib-dynload/_test*.so
2119
lib/python*/lib-dynload/_ctypes_test*.so
2220
lib/python*/lib-dynload/xxlimited*.so
2321
lib/python*/lib-dynload/_xxtestfuzz.so
24-
# Remove command-line curses toolkit.
25-
lib/python*/curses/*
2622
# Remove config-* directory, which is used for compiling C extension modules.
2723
lib/python*/config-*
2824
# Remove ensurepip. If user code needs pip, it can add it to

0 commit comments

Comments
 (0)