acxz / pkgbuilds

PKGBUILDs for Arch Linux
25 stars 46 forks source link

[python-ray] use pacman instead of pip to install psutil and setproctitle #119

Closed pirofti closed 2 years ago

pirofti commented 3 years ago

Any reason we don't use pacman to fetch these packages? The setup.py script installs them via pip if SKIP_THIRDPARTY_INSTALL is not defined.

diff --git PKGBUILD PKGBUILD
index 2b1359c..3392296 100644
--- PKGBUILD
+++ PKGBUILD
@@ -12,7 +12,8 @@ depends=(psmisc python python-aiohttp python-aiohttp-cors python-aioredis
          python-click python-colorama python-colorful python-filelock
          python-google python-gpustat python-grpcio python-jsonschema
          python-msgpack python-numpy python-protobuf py-spy python-pyaml
-         python-requests python-redis python-opencensus python-prometheus_client)
+         python-requests python-redis python-opencensus python-prometheus_client
+         python-psutil python-setproctitle)
 optdepends=(
             'uvicorn: for ray[serve] module'
             'python-flask: for ray[serve] module'
@@ -46,7 +47,8 @@ prepare() {

 build() {
   cd "${srcdir}/${_pkgname}-${_pkgname}-${pkgver}/python"
-  python setup.py build
+  # Do not manually install pip packages psutil and setproctitle
+  ( export SKIP_THIRDPARTY_INSTALL=Yes; python setup.py build )
 }

 package() {
acxz commented 3 years ago

That's a good idea, I haven't mostly since I just want to maintain default behavior. If you send a PR my way and it builds I'll merge it in. Ideally though, I would like the behavior to be default upstream first.

acxz commented 2 years ago

Closing this issue due to inactivity.