Was supposed to be a linux distribution, now just a collection of build scripts for packages on top of (ideally) any distribution.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.6 KiB

import 'compile/configure'
name=Python
8 years ago
version=3.6.2
update_url='https://www.python.org/downloads/'
define_option '2to3-symlink: Install the 2to3 symlink (it may conflict with python2)'
dlextract "https://www.python.org/ftp/python/$version/$name-$version.tar.xz" \
8 years ago
'2c68846471994897278364fc18730dd9'
_
cd "$name-$version"
# Don't build the static library
sed -i -e '/$(BUILDPYTHON):/s/$(LIBRARY)//' \
-e '/Programs\/_testembed:/s/$(LIBRARY)//' \
-e '/test -d $(LIBRARY)/c\ @if false; then \\' Makefile.pre.in
# Don't install the 2to3 symlink, as that conflicts with python 2
option !2to3-symlink sed -i -e '/$(LN) -s 2to3/d' Makefile.pre.in
# Remove windows binaries and scripts
find Lib \( -name '*.exe' -o -name '*.bat' \) -delete
# Fix paths
sed -i -e "/os.path.join(prefix/s/lib/$(safe_sed "$dir_lib")/" Lib/site.py
sed -i -e "s/\/lib\/python/$(safe_sed "/$dir_lib/python")/" \
-e "s/\/include\/python/$(safe_sed "/$dir_include/python")/" \
-e "s/\/bin/$(safe_sed "/$dir_bin")/" Lib/sysconfig.py Lib/distutils/command/install.py
sed -i -e "/libpython =/!b;n;s/lib/$(safe_sed "$dir_lib")/" \
-e "/os.path.join/s/include/$(safe_sed "$dir_include")/" Lib/distutils/sysconfig.py
sed -i -e "/lib_python =/s/lib\//$(safe_sed "$dir_lib")\//" Modules/getpath.c
sed -i -e "/SCRIPTDIR=/s/lib/$(safe_sed "$dir_lib")/" Makefile.pre.in
sed -i -e "/LIBPL=/s/lib/$(safe_sed "$dir_lib")/" configure
compile_configure -- \
--enable-shared \
8 years ago
--with-lto \
--with-threads \
--with-system-expat \
--with-system-ffi \
--with-system-libmpdec \
--without-ensurepip
# vim:set tabstop=4 shiftwidth=4 syntax=sh expandtab: