2017-03-27 21:01:07 +00:00
|
|
|
SUMMARY="An interpreted, interactive, object-oriented programming language"
|
2021-05-08 10:17:15 +00:00
|
|
|
DESCRIPTION="Python is a programming language that lets you work more quickly \
|
|
|
|
and integrate your systems more effectively. You can learn to use Python and \
|
|
|
|
see almost immediate gains in productivity and lower maintenance costs.
|
2017-03-27 21:01:07 +00:00
|
|
|
Python runs on Windows, Linux/Unix, Mac OS X, and has been ported to the Java \
|
|
|
|
and .NET virtual machines.
|
|
|
|
Python is free to use, even for commercial products, because of its \
|
2021-05-08 10:17:15 +00:00
|
|
|
OSI-approved open source license."
|
2018-05-30 06:06:34 +00:00
|
|
|
HOMEPAGE="https://www.python.org"
|
2017-03-27 21:01:07 +00:00
|
|
|
LICENSE="Python"
|
2018-12-18 18:28:22 +00:00
|
|
|
COPYRIGHT="1990-2018 Python Software Foundation"
|
2021-08-16 11:12:36 +00:00
|
|
|
REVISION="5"
|
2017-03-27 21:01:07 +00:00
|
|
|
SOURCE_URI="https://www.python.org/ftp/python/$portVersion/Python-$portVersion.tar.xz"
|
2021-01-15 16:37:08 +00:00
|
|
|
CHECKSUM_SHA256="70953a9b5d6891d92e65d184c3512126a15814bee15e1eff2ddcce04334e9a99"
|
2017-03-27 21:01:07 +00:00
|
|
|
SOURCE_DIR="Python-$portVersion"
|
|
|
|
PATCHES="python3-$portVersion.patchset"
|
2018-05-05 20:09:44 +00:00
|
|
|
if [ "$secondaryArchSuffix" = _x86 ] ; then
|
2018-02-04 12:10:41 +00:00
|
|
|
PATCHES+="
|
|
|
|
python3_x86-$portVersion.patchset
|
|
|
|
"
|
|
|
|
fi
|
2017-03-27 21:01:07 +00:00
|
|
|
|
2021-09-15 19:40:18 +00:00
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
2017-04-18 20:04:28 +00:00
|
|
|
SECONDARY_ARCHITECTURES="x86"
|
2017-03-27 21:01:07 +00:00
|
|
|
|
|
|
|
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
|
|
|
|
commandSuffix=$secondaryArchSuffix
|
|
|
|
commandBinDir=$binDir
|
|
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
|
|
commandSuffix=
|
|
|
|
commandBinDir=$prefix/bin
|
|
|
|
fi
|
|
|
|
|
|
|
|
PROVIDES="
|
2019-04-07 10:12:15 +00:00
|
|
|
python36$secondaryArchSuffix = $portVersion compat >= 3.6
|
2017-03-27 21:01:07 +00:00
|
|
|
cmd:2to3_3.6 = $portVersion compat >= 3.6
|
|
|
|
cmd:idle3.6 = $portVersion compat >= 3.6
|
|
|
|
cmd:pydoc3.6 = $portVersion compat >= 3.6
|
|
|
|
cmd:python3.6 = $portVersion compat >= 3.6
|
|
|
|
cmd:python3.6_config = $portVersion compat >= 3.6
|
|
|
|
cmd:python3.6m = $portVersion compat >= 3.6
|
|
|
|
cmd:python3.6m_config = $portVersion compat >= 3.6
|
|
|
|
cmd:pyvenv_3.6 = $portVersion compat >= 3.6
|
|
|
|
devel:libpython3.6m$secondaryArchSuffix = 1.0
|
|
|
|
lib:libpython3.6m$secondaryArchSuffix = 1.0
|
|
|
|
"
|
|
|
|
REQUIRES="
|
|
|
|
haiku$secondaryArchSuffix
|
|
|
|
cmd:file
|
|
|
|
lib:libbz2$secondaryArchSuffix
|
|
|
|
lib:libexpat$secondaryArchSuffix
|
2017-07-26 03:28:40 +00:00
|
|
|
lib:libffi$secondaryArchSuffix
|
2021-01-15 16:37:08 +00:00
|
|
|
lib:libintl$secondaryArchSuffix
|
2017-03-27 21:01:07 +00:00
|
|
|
lib:libncurses$secondaryArchSuffix
|
|
|
|
lib:libssl$secondaryArchSuffix
|
2021-05-08 10:17:15 +00:00
|
|
|
lib:libedit$secondaryArchSuffix
|
2017-03-27 21:01:07 +00:00
|
|
|
lib:libsqlite3$secondaryArchSuffix
|
|
|
|
lib:libz$secondaryArchSuffix
|
|
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
|
|
devel:libbz2$secondaryArchSuffix
|
|
|
|
devel:libexpat$secondaryArchSuffix
|
2017-07-26 03:28:40 +00:00
|
|
|
devel:libffi$secondaryArchSuffix
|
2017-03-27 21:01:07 +00:00
|
|
|
devel:libncurses$secondaryArchSuffix
|
|
|
|
devel:libssl$secondaryArchSuffix
|
2021-05-08 10:17:15 +00:00
|
|
|
devel:libedit$secondaryArchSuffix
|
2017-03-27 21:01:07 +00:00
|
|
|
devel:libsqlite3$secondaryArchSuffix
|
|
|
|
devel:libz$secondaryArchSuffix
|
|
|
|
"
|
|
|
|
BUILD_PREREQUIRES="
|
|
|
|
haiku${secondaryArchSuffix}_devel
|
|
|
|
cmd:aclocal
|
|
|
|
cmd:autoconf
|
|
|
|
cmd:find
|
|
|
|
cmd:gcc$secondaryArchSuffix
|
|
|
|
cmd:ld$secondaryArchSuffix
|
|
|
|
cmd:libtoolize
|
|
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
|
|
cmd:make
|
|
|
|
"
|
|
|
|
|
|
|
|
GLOBAL_WRITABLE_FILES="
|
|
|
|
non-packaged/lib/python3.6/site-packages directory keep-old
|
|
|
|
"
|
|
|
|
|
|
|
|
BUILD()
|
|
|
|
{
|
2017-04-16 19:33:04 +00:00
|
|
|
export CFLAGS="-D_BSD_SOURCE"
|
2017-03-27 21:01:07 +00:00
|
|
|
rm -Rf Modules/zlib Modules/expat
|
|
|
|
|
|
|
|
cd Modules/_ctypes/libffi
|
|
|
|
libtoolize --force --copy --install
|
|
|
|
cd ../../..
|
|
|
|
|
|
|
|
libtoolize --force --copy --install
|
|
|
|
aclocal
|
|
|
|
autoconf
|
2017-11-22 10:30:56 +00:00
|
|
|
export OPT=""
|
2017-07-04 16:46:29 +00:00
|
|
|
runConfigure --omit-dirs binDir,includeDir ./configure \
|
2018-02-04 12:10:41 +00:00
|
|
|
--enable-shared --without-ensurepip --with-system-ffi \
|
2017-07-04 16:46:29 +00:00
|
|
|
--with-system-expat --bindir=$commandBinDir --includedir=$developDir/headers
|
2017-03-27 21:01:07 +00:00
|
|
|
|
|
|
|
# prevent make from rebuilding stuff that requires python
|
|
|
|
touch Parser/asdl* Python/Python-ast.c Include/Python-ast.h
|
|
|
|
|
|
|
|
rm -f python
|
|
|
|
|
|
|
|
make $jobArgs
|
|
|
|
}
|
|
|
|
|
|
|
|
INSTALL()
|
|
|
|
{
|
|
|
|
make install
|
|
|
|
|
2019-04-07 10:12:15 +00:00
|
|
|
rm $libDir/libpython3.so $libDir/pkgconfig/python3.pc
|
2017-03-27 21:01:07 +00:00
|
|
|
|
2017-04-18 20:04:28 +00:00
|
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
|
|
# On x86_gcc2, move lib-dynload to lib/python3.x/
|
|
|
|
mv $libDir/python3.6/lib-dynload $prefix/lib/python3.6/
|
|
|
|
fi
|
2017-03-27 21:01:07 +00:00
|
|
|
prepareInstalledDevelLibs libpython3.6m
|
|
|
|
fixPkgconfig
|
2018-08-03 23:50:05 +00:00
|
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
|
|
# fix pkgconfig to match configure flags
|
|
|
|
sed -i -e 's,headers/x86,headers,' $developLibDir/pkgconfig/python*.pc
|
|
|
|
fi
|
2017-03-27 21:01:07 +00:00
|
|
|
|
|
|
|
mkdir -p $prefix/lib/python3.6/vendor-packages
|
|
|
|
echo 'This directory contains packaged python modules.' \
|
|
|
|
>$prefix/lib/python3.6/vendor-packages/README
|
|
|
|
|
|
|
|
mkdir -p $prefix/non-packaged/lib/python3.6
|
|
|
|
mv $prefix/lib/python3.6/site-packages $prefix/non-packaged/lib/python3.6/
|
2017-11-22 10:30:56 +00:00
|
|
|
|
|
|
|
# drop testsuite altogether; move to a separate package if needed
|
|
|
|
cd $prefix/lib/python3.6
|
|
|
|
rm -rf ctypes/test distutils/tests idlelib/idle_test lib2to3/tests \
|
|
|
|
sqlite3/test test tkinter/test unittest/test
|
|
|
|
|
|
|
|
# TODO: drop __pycache__ folders as well?
|
|
|
|
find . -name __pycache__ | xargs rm -rf
|
2019-05-24 20:14:07 +00:00
|
|
|
|
2019-04-07 10:12:15 +00:00
|
|
|
rm $commandBinDir/2to3 $commandBinDir/idle3 $commandBinDir/pydoc3 \
|
|
|
|
$commandBinDir/python3 $commandBinDir/python3-config \
|
|
|
|
$commandBinDir/pyvenv $manDir/man1/python3.1
|
2017-03-27 21:01:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
TEST()
|
|
|
|
{
|
|
|
|
cd Lib/test
|
|
|
|
rm -f test_asynchat.py # this one stalls, so skip it for now
|
|
|
|
rm -f test_multiprocessing.py # this one stalls, so skip it for now
|
|
|
|
|
|
|
|
python3 regrtest.py
|
|
|
|
}
|