mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
dev-python: merge most python2 and python3 recipes.
* adjust recipes depending on these, ie python_dateutil=>dateutil_python. * switch architectures to any for relevant python recipes. * bump versions for retext, argh, beautifulsoup, cssselect, dateutil, docutils, fonttools, html2text, httplib2, lxml, mechanize, mock, paramiko, pillow, pip, pygments, requests, twisted, urllib3, zope_interface.
This commit is contained in:
@@ -1,84 +0,0 @@
|
||||
SUMMARY="Python Imaging Library (fork)"
|
||||
DESCRIPTION="
|
||||
Pillow is the friendly PIL fork by Alex Clark and Contributors.
|
||||
PIL is the Python Imaging Library by Fredrik Lundh and Contributors."
|
||||
HOMEPAGE="https://github.com/python-imaging/Pillow
|
||||
https://pypi.python.org/pypi/Pillow"
|
||||
COPYRIGHT="1997-2011 by Secret Labs AB
|
||||
1995-2011 by Fredrik Lundh"
|
||||
LICENSE="HPND"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://pypi.python.org/packages/source/P/Pillow/Pillow-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="64b0a057210c480aea99406c9391180cd866fc0fd8f0b53367e3af21b195784a"
|
||||
SOURCE_DIR="Pillow-$portVersion"
|
||||
|
||||
ARCHITECTURES="x86 x86_gcc2 x86_64"
|
||||
|
||||
PROVIDES="
|
||||
pillow = $portVersion
|
||||
cmd:createfontdatachunk.py = $portVersion
|
||||
cmd:enhancer.py = $portVersion
|
||||
cmd:explode.py = $portVersion
|
||||
cmd:gifmaker.py = $portVersion
|
||||
cmd:painter.py = $portVersion
|
||||
cmd:pilconvert.py = $portVersion
|
||||
cmd:pildriver.py = $portVersion
|
||||
cmd:pilfile.py = $portVersion
|
||||
cmd:pilfont.py = $portVersion
|
||||
cmd:pilprint.py = $portVersion
|
||||
cmd:player.py = $portVersion
|
||||
cmd:thresholder.py = $portVersion
|
||||
cmd:viewer.py = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
cmd:python2
|
||||
#python_setuptools
|
||||
lib:libfreetype
|
||||
lib:libjpeg
|
||||
lib:libopenjp2
|
||||
lib:libtiff
|
||||
lib:libwebp
|
||||
lib:libz
|
||||
#cmd:tcl / tk (someday)
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
python_setuptools
|
||||
devel:libfreetype
|
||||
devel:libjpeg
|
||||
devel:libopenjp2
|
||||
devel:libtiff
|
||||
devel:libwebp
|
||||
devel:libz
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc
|
||||
cmd:ld
|
||||
cmd:python2
|
||||
cmd:freetype_config
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
export INCLUDE="$(findpaths -c: B_FIND_PATH_HEADERS_DIRECTORY)"
|
||||
export LIB="$(findpaths -c: B_FIND_PATH_DEVELOP_LIB_DIRECTORY)"
|
||||
$portPackageLinksDir/cmd~python2/bin/python2 setup.py build
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
export INCLUDE="$(findpaths -c: B_FIND_PATH_HEADERS_DIRECTORY)"
|
||||
export LIB="$(findpaths -c: B_FIND_PATH_DEVELOP_LIB_DIRECTORY)"
|
||||
# GENERIC: all python_setuptools-based installs need this
|
||||
export PATH="$portPackageLinksDir/cmd~python2/bin:$PATH"
|
||||
pythonVersion=$(python2 --version 2>&1 | sed 's/Python //' | head -c3)
|
||||
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
|
||||
export PYTHONPATH=$installLocation:$PYTHONPATH
|
||||
mkdir -p $installLocation
|
||||
|
||||
python2 setup.py install \
|
||||
--single-version-externally-managed \
|
||||
--root=/ --prefix=$prefix
|
||||
}
|
||||
120
dev-python/pillow/pillow-4.1.0.recipe
Normal file
120
dev-python/pillow/pillow-4.1.0.recipe
Normal file
@@ -0,0 +1,120 @@
|
||||
SUMMARY="Python Imaging Library (fork)"
|
||||
DESCRIPTION="
|
||||
Pillow is the friendly PIL fork by Alex Clark and Contributors.
|
||||
PIL is the Python Imaging Library by Fredrik Lundh and Contributors."
|
||||
HOMEPAGE="https://github.com/python-imaging/Pillow
|
||||
https://pypi.python.org/pypi/Pillow"
|
||||
COPYRIGHT="1997-2011 by Secret Labs AB
|
||||
1995-2011 by Fredrik Lundh"
|
||||
LICENSE="HPND"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://files.pythonhosted.org/packages/source/P/Pillow/Pillow-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="a0fd487fed4a35717401b7566e51a1520b34e7c0f7f2a315a6509f82bc86299f"
|
||||
SOURCE_DIR="Pillow-$portVersion"
|
||||
|
||||
ARCHITECTURES="x86 x86_gcc2 x86_64"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
devel:liblcms2
|
||||
devel:libfreetype
|
||||
devel:libopenjp2
|
||||
devel:libtiff
|
||||
devel:libwebp
|
||||
devel:libz
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:gcc
|
||||
cmd:ld
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python python3)
|
||||
PYTHON_VERSIONS=(2.7 3.6)
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
eval "PROVIDES_${pythonPackage}=\"\
|
||||
${portName}_$pythonPackage = $portVersion\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku\n\
|
||||
cmd:python$pythonVersion\n\
|
||||
lib:liblcms2\n\
|
||||
lib:libfreetype\n\
|
||||
lib:libjpeg\n\
|
||||
lib:libopenjp2\n\
|
||||
lib:libtiff\n\
|
||||
lib:libwebp\n\
|
||||
lib:libz\n\
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
setuptools_$pythonPackage"
|
||||
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
||||
cmd:python$pythonVersion"
|
||||
done
|
||||
|
||||
PROVIDES_python="$PROVIDES_python
|
||||
cmd:createfontdatachunk.py = $portVersion
|
||||
cmd:enhancer.py = $portVersion
|
||||
cmd:explode.py = $portVersion
|
||||
cmd:gifmaker.py = $portVersion
|
||||
cmd:painter.py = $portVersion
|
||||
cmd:pilconvert.py = $portVersion
|
||||
cmd:pildriver.py = $portVersion
|
||||
cmd:pilfile.py = $portVersion
|
||||
cmd:pilfont.py = $portVersion
|
||||
cmd:pilprint.py = $portVersion
|
||||
cmd:player.py = $portVersion
|
||||
cmd:thresholder.py = $portVersion
|
||||
cmd:viewer.py = $portVersion
|
||||
"
|
||||
PROVIDES_python3="$PROVIDES_python3
|
||||
cmd:createfontdatachunk3.py = $portVersion
|
||||
cmd:enhancer3.py = $portVersion
|
||||
cmd:explode3.py = $portVersion
|
||||
cmd:gifmaker3.py = $portVersion
|
||||
cmd:painter3.py = $portVersion
|
||||
cmd:pilconvert3.py = $portVersion
|
||||
cmd:pildriver3.py = $portVersion
|
||||
cmd:pilfile3.py = $portVersion
|
||||
cmd:pilfont3.py = $portVersion
|
||||
cmd:pilprint3.py = $portVersion
|
||||
cmd:player3.py = $portVersion
|
||||
cmd:thresholder3.py = $portVersion
|
||||
cmd:viewer3.py = $portVersion
|
||||
"
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
export INCLUDE="$(findpaths -c: B_FIND_PATH_HEADERS_DIRECTORY)"
|
||||
export LIB="$(findpaths -c: B_FIND_PATH_DEVELOP_LIB_DIRECTORY)"
|
||||
for i in "${!PYTHON_PACKAGES[@]}"; do
|
||||
pythonPackage=${PYTHON_PACKAGES[i]}
|
||||
pythonVersion=${PYTHON_VERSIONS[$i]}
|
||||
|
||||
python=python$pythonVersion
|
||||
installLocation=$prefix/lib/$python/vendor-packages/
|
||||
export PYTHONPATH=$installLocation:$PYTHONPATH
|
||||
mkdir -p $installLocation
|
||||
rm -rf build
|
||||
$python setup.py build install \
|
||||
--root=/ --prefix=$prefix
|
||||
|
||||
if [ $pythonPackage != python ]; then
|
||||
for f in $binDir/*.py; do
|
||||
mv $f ${f%.py}3.py
|
||||
done
|
||||
fi
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python* \
|
||||
$binDir
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user