diff --git a/dev-python/beautifulsoup/beautifulsoup-4.12.0.recipe b/dev-python/beautifulsoup/beautifulsoup-4.12.0.recipe new file mode 100644 index 000000000..d04433ec3 --- /dev/null +++ b/dev-python/beautifulsoup/beautifulsoup-4.12.0.recipe @@ -0,0 +1,97 @@ +SUMMARY="Python library for iterating, searching, and modifying an HTML/XML parse tree" +DESCRIPTION=" + Beautiful Soup is a Python library designed for quick turnaround projects like \ + screen-scraping. Three features make it powerful: + + * Beautiful Soup provides a few simple methods and Pythonic idioms for navigating, \ + searching, and modifying a parse tree: a toolkit for dissecting a document and \ + extracting what you need. It doesn't take much code to write an application + * Beautiful Soup automatically converts incoming documents to Unicode and outgoing \ + documents to UTF-8. You don't have to think about encodings, unless the document \ + doesn't specify an encoding and Beautiful Soup can't detect one. Then you just have \ + to specify the original encoding. + * Beautiful Soup sits on top of popular Python parsers like lxml and html5lib, allowing \ + you to try out different parsing strategies or trade speed for flexibility. + + Beautiful Soup parses anything you give it, and does the tree traversal stuff for you. \ + You can tell it \"Find all the links\", or \"Find all the links of class externalLink\", \ + or \"Find all the links whose urls match 'foo.com'\", or \"Find the table heading that's \ + got bold text, then give me that text.\"" +HOMEPAGE="https://www.crummy.com/software/BeautifulSoup/ + https://pypi.python.org/pypi/beautifulsoup4/ + https://bugs.launchpad.net/beautifulsoup/" +COPYRIGHT="2004-2023 Leonard Richardson" +LICENSE="MIT" +REVISION="1" +SOURCE_URI="https://pypi.org/packages/source/b/beautifulsoup4/beautifulsoup4-$portVersion.tar.gz" +CHECKSUM_SHA256="c5fceeaec29d09c84970e47c65f2f0efe57872f7cff494c9691a26ec0ff13234" +SOURCE_DIR="beautifulsoup4-$portVersion" + +ARCHITECTURES="any" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " + +PYTHON_PACKAGES=(python38 python39 python310) +PYTHON_VERSIONS=(3.8 3.9 3.10) +for i in "${!PYTHON_PACKAGES[@]}"; do + pythonPackage=${PYTHON_PACKAGES[i]} + pythonVersion=${PYTHON_VERSIONS[$i]} + + eval "PROVIDES_${pythonPackage}=\" + ${portName}_$pythonPackage = $portVersion + \"" + eval "REQUIRES_$pythonPackage=\" + haiku + soupsieve_$pythonPackage + cmd:python$pythonVersion + \"" + BUILD_REQUIRES+=" + setuptools_$pythonPackage + soupsieve_$pythonPackage + " + BUILD_PREREQUIRES+=" + cmd:python$pythonVersion + " +done + +# We'll move this inside the loop above once we drop 3.8 +TEST_REQUIRES=" + html5lib_python39 + lxml_python39 + pytest_python39 + " + +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 + + packageEntries $pythonPackage \ + $prefix/lib/python* + done +} + + +TEST() +{ + # We get 4 lxml related failures + python3 -m pytest bs4 || true +} diff --git a/dev-python/beautifulsoup/beautifulsoup-4.9.3.recipe b/dev-python/beautifulsoup/beautifulsoup-4.9.3.recipe deleted file mode 100644 index ea9867fb7..000000000 --- a/dev-python/beautifulsoup/beautifulsoup-4.9.3.recipe +++ /dev/null @@ -1,69 +0,0 @@ -SUMMARY="Python library for iterating, searching, and modifying an HTML/XML parse tree" -DESCRIPTION=" - Beautiful Soup is a Python HTML/XML parser designed for quick - turnaround projects like screen-scraping. - Two features make it powerful: - it won't choke if you give it bad markup and it provides - a few simple methods and Pythonic idioms for navigating and - searching a parse tree: a toolkit for dissecting a document and - extracting what you need" -HOMEPAGE="https://bugs.launchpad.net/beautifulsoup/ - https://pypi.python.org/pypi/beautifulsoup4 - https://www.crummy.com/software/BeautifulSoup/bs4/" -COPYRIGHT="2004-2015 Leonard Richardson - 2006-2013 James Graham and other contributors" -LICENSE="MIT" -REVISION="3" -SOURCE_URI="https://pypi.org/packages/source/b/beautifulsoup4/beautifulsoup4-$portVersion.tar.gz" -CHECKSUM_SHA256="84729e322ad1d5b4d25f805bfa05b902dd96450f43842c4e99067d5e1369eb25" -SOURCE_DIR="beautifulsoup4-$portVersion" - -ARCHITECTURES="any" - -PROVIDES=" - $portName = $portVersion - " -REQUIRES=" - haiku - " - -BUILD_REQUIRES=" - haiku_devel - " - -PYTHON_PACKAGES=(python38 python39 python310) -PYTHON_VERSIONS=(3.8 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\ - \"" -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 - - packageEntries $pythonPackage \ - $prefix/lib/python* - done -}