summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorlilac2024-03-05 04:28:15 +0800
committerlilac2024-03-05 04:28:15 +0800
commitba5da18f0adbaa29b253ffe1b2215c45f749977c (patch)
treefca832d5ac62c1b2eda9cfb36b5277cae89324de
parent0b743a4189def3227604798df654bb9f3810275c (diff)
downloadaur-ba5da18f0adbaa29b253ffe1b2215c45f749977c.tar.gz
[lilac] updated to 0.6-9
-rw-r--r--.SRCINFO18
-rw-r--r--0001-fix-building-torch-extension-with-glog.patch24
-rw-r--r--PKGBUILD39
3 files changed, 66 insertions, 15 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e9b94bba20f2..c323d57662d1 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,14 +1,19 @@
pkgbase = python-detectron2
pkgdesc = FAIR's next-generation platform for object detection and segmentation
pkgver = 0.6
- pkgrel = 8
+ pkgrel = 9
url = https://github.com/facebookresearch/detectron2
arch = x86_64
- license = Apache
+ license = Apache-2.0
makedepends = cuda
makedepends = numactl
+ makedepends = python-build
+ makedepends = python-installer
makedepends = python-setuptools
+ makedepends = python-wheel
makedepends = python-pytorch-cuda
+ depends = gcc-libs
+ depends = glibc
depends = python-cloudpickle
depends = python-future
depends = python-fvcore
@@ -21,6 +26,7 @@ pkgbase = python-detectron2
depends = python-pillow
depends = python-pycocotools
depends = python-pydot
+ depends = python-shapely
depends = python-sympy
depends = python-tabulate
depends = python-termcolor
@@ -28,9 +34,13 @@ pkgbase = python-detectron2
depends = python-yacs
depends = tensorboard
source = detectron2-0.6.tar.gz::https://github.com/facebookresearch/detectron2/archive/v0.6.tar.gz
+ source = 0001-fix-building-torch-extension-with-glog.patch
sha256sums = 9757fed05fa32acc2116ea038185f08409d5e854573e70f41909a358b70d1004
+ sha256sums = b658be8e329604a2cdb9529b40c1389719054da61a831b76f7ee203c8bec2537
pkgname = python-detectron2
+ depends = gcc-libs
+ depends = glibc
depends = python-cloudpickle
depends = python-future
depends = python-fvcore
@@ -43,6 +53,7 @@ pkgname = python-detectron2
depends = python-pillow
depends = python-pycocotools
depends = python-pydot
+ depends = python-shapely
depends = python-sympy
depends = python-tabulate
depends = python-termcolor
@@ -53,6 +64,8 @@ pkgname = python-detectron2
pkgname = python-detectron2-cuda
pkgdesc = FAIR's next-generation platform for object detection and segmentation (with CUDA)
+ depends = gcc-libs
+ depends = glibc
depends = python-cloudpickle
depends = python-future
depends = python-fvcore
@@ -65,6 +78,7 @@ pkgname = python-detectron2-cuda
depends = python-pillow
depends = python-pycocotools
depends = python-pydot
+ depends = python-shapely
depends = python-sympy
depends = python-tabulate
depends = python-termcolor
diff --git a/0001-fix-building-torch-extension-with-glog.patch b/0001-fix-building-torch-extension-with-glog.patch
new file mode 100644
index 000000000000..9843b8618ef8
--- /dev/null
+++ b/0001-fix-building-torch-extension-with-glog.patch
@@ -0,0 +1,24 @@
+From ee088502ef194ae818341596c173a76005bdfd51 Mon Sep 17 00:00:00 2001
+From: Butui Hu <hot123tea123@gmail.com>
+Date: Mon, 4 Mar 2024 21:37:13 +0800
+Subject: [PATCH] fix building torch extension with glog
+
+---
+ setup.py | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/setup.py b/setup.py
+index 173d012..7602ef0 100644
+--- a/setup.py
++++ b/setup.py
+@@ -90,6 +90,7 @@ def get_extensions():
+
+ include_dirs = [extensions_dir]
+
++ define_macros += [("GLOG_USE_GLOG_EXPORT", None)]
+ ext_modules = [
+ extension(
+ "detectron2._C",
+--
+2.44.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 89e8fb00aee3..1683eb71dd4d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,12 +4,14 @@ _CUDA_ARCH_LIST="6.0;6.1;6.2;7.0;7.2;7.5;8.0;8.6;8.6;8.9;9.0;9.0+PTX"
pkgname=(python-detectron2 python-detectron2-cuda)
_pkgname=detectron2
pkgver=0.6
-pkgrel=8
+pkgrel=9
pkgdesc="FAIR's next-generation platform for object detection and segmentation"
arch=('x86_64')
url='https://github.com/facebookresearch/detectron2'
-license=('Apache')
+license=('Apache-2.0')
depends=(
+ gcc-libs
+ glibc
python-cloudpickle
python-future
python-fvcore
@@ -22,6 +24,7 @@ depends=(
python-pillow
python-pycocotools
python-pydot
+ python-shapely
python-sympy
python-tabulate
python-termcolor
@@ -32,32 +35,41 @@ depends=(
makedepends=(
cuda
numactl
+ python-build
+ python-installer
python-setuptools
+ python-wheel
python-pytorch-cuda
)
-source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/facebookresearch/detectron2/archive/v${pkgver}.tar.gz")
-sha256sums=('9757fed05fa32acc2116ea038185f08409d5e854573e70f41909a358b70d1004')
+source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/facebookresearch/detectron2/archive/v${pkgver}.tar.gz"
+ "0001-fix-building-torch-extension-with-glog.patch"
+)
+sha256sums=('9757fed05fa32acc2116ea038185f08409d5e854573e70f41909a358b70d1004'
+ 'b658be8e329604a2cdb9529b40c1389719054da61a831b76f7ee203c8bec2537')
prepare() {
- cp -a "${_pkgname}-${pkgver}" "python-${_pkgname}-${pkgver}"
- cp -a "${_pkgname}-${pkgver}" "python-${_pkgname}-cuda-${pkgver}"
+ cd ${_pkgname}-${pkgver}
+ patch -p1 -i "${srcdir}/0001-fix-building-torch-extension-with-glog.patch"
+ cp -a "${srcdir}/${_pkgname}-${pkgver}" "${srcdir}/python-${_pkgname}-${pkgver}"
+ cp -a "${srcdir}/${_pkgname}-${pkgver}" "${srcdir}/python-${_pkgname}-cuda-${pkgver}"
}
build() {
- cd "python-${_pkgname}-${pkgver}"
- python setup.py build
+ cd "${srcdir}/python-${_pkgname}-${pkgver}"
+ python -m build --wheel --no-isolation
cd "${srcdir}/python-${_pkgname}-cuda-${pkgver}"
TORCH_CUDA_ARCH_LIST=${_CUDA_ARCH_LIST} \
- FORCE_CUDA=1 python setup.py build
+ FORCE_CUDA=1 \
+ python -m build --wheel --no-isolation
}
package_python-detectron2() {
depends+=(
python-pytorch
)
- cd "${pkgname}-${pkgver}"
- python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+ cd "${srcdir}/python-${_pkgname}-${pkgver}"
+ python -m installer --destdir="${pkgdir}" dist/*.whl
# remove unused files
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
rm -rfv ${pkgdir}${site_packages}/tools
@@ -72,9 +84,10 @@ package_python-detectron2-cuda() {
)
provides=(python-detectron2=${pkgver})
conflicts=(python-detectron2)
- cd "${pkgname}-${pkgver}"
+ cd "${srcdir}/python-${_pkgname}-cuda-${pkgver}"
TORCH_CUDA_ARCH_LIST=${_CUDA_ARCH_LIST} \
- FORCE_CUDA=1 python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+ FORCE_CUDA=1 \
+ python -m installer --destdir="${pkgdir}" dist/*.whl
# remove unused files
local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
rm -rfv ${pkgdir}${site_packages}/tools