Files
haikuports/dev-python/python-graphviz/python_graphviz-0.20.1.recipe
OscarL 70ac5cadda python3.8: bulk removal of now obsolete "_python38" packages. (#9328)
* python3.8: bulk removal of now obsolete "_python38" packages.

Done via scripting. No functional change intended or expected.

Some manual tweaks will follow.

* python3.8: further manual tweaks after bulk-3.8-removal.

Unlike the previous commit with automated changes,
I've tested builds for *these* recipes in beta4 64 bits.
2023-09-01 18:19:50 +00:00

84 lines
2.4 KiB
Bash

SUMMARY="Simple interface for Graphviz"
DESCRIPTION="This package facilitates the creation and rendering of graph descriptions in the \
DOT_ language of the Graphviz_ graph drawing software (upstream repo_) from Python.
Create a graph object, assemble the graph by adding nodes and edges, and retrieve its DOT source \
code string. Save the source code to a file and render it with the Graphviz installation of your \
system.
Use the view option/method to directly inspect the resulting (PDF, PNG, SVG, etc.) file with \
its default application.
Graphs can also be rendered and displayed within Jupyter notebooks_ (formerly known as IPython \
notebooks_, example <notebook_>_, nbviewer <notebook-nbviewer_>_) as well as the \
Jupyter QtConsole_."
HOMEPAGE="https://github.com/xflr6/graphviz"
COPYRIGHT="2013-2022 Sebastian Bank"
LICENSE="MIT"
REVISION="3"
SOURCE_URI="$HOMEPAGE/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="815346b8c2fcd8ccede29623a67bfc30abdbb75749e96128b9d414573d6d8f04"
SOURCE_FILENAME="graphviz-$portVersion.tar.gz"
SOURCE_DIR="graphviz-$portVersion"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
PYTHON_PACKAGES=(python39 python310)
PYTHON_VERSIONS=(3.9 3.10)
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\
graphviz$secondaryArchSuffix\n\
\""
if [ "$targetArchitecture" = "x86_gcc2" ]; then
eval "PROVIDES_${pythonPackage}+=\"\n\
python_graphviz_$pythonPackage = $portVersion\
\""
fi
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
done
INSTALL()
{
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"
install -m 755 -d "$docDir"
install -m 644 -t "$docDir" README.rst
packageEntries $pythonPackage \
"$prefix"/lib/$python \
"$docDir"
done
}