Github messages for voidlinux
 help / color / mirror / Atom feed
* [ISSUE] Package Request: python3-hidapi (arch) or python3-hid (ubuntu)
@ 2020-03-02  5:29 Frick-David
  2020-03-02  9:35 ` xtraeme
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Frick-David @ 2020-03-02  5:29 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 688 bytes --]

New issue by Frick-David on void-packages repository

https://github.com/void-linux/void-packages/issues/19670

Description:
Hey there,

I am using void linux (non-musl). I am trying to build [this](https://github.com/jonasmalacofilho/liquidctl)
repo for use on my computer. However, it fails with an error about missing Python.h header for hidapi, which I did not see a package for. Is there any chance this can be added for me. It would be sweet to get some RGB with my void linux.

In addition, is there any way I can also help build packages for others that need help. I want to help void linux grow, but am unsure how. For now, I am just trying to make PR's for documentation. 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Package Request: python3-hidapi (arch) or python3-hid (ubuntu)
  2020-03-02  5:29 [ISSUE] Package Request: python3-hidapi (arch) or python3-hid (ubuntu) Frick-David
@ 2020-03-02  9:35 ` xtraeme
  2020-03-02 21:44 ` Frick-David
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: xtraeme @ 2020-03-02  9:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 211 bytes --]

New comment by xtraeme on void-packages repository

https://github.com/void-linux/void-packages/issues/19670#issuecomment-593309620

Comment:
`Python.h` is part of `python-devel` (2.7) or `python3-devel` (3.8).

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Package Request: python3-hidapi (arch) or python3-hid (ubuntu)
  2020-03-02  5:29 [ISSUE] Package Request: python3-hidapi (arch) or python3-hid (ubuntu) Frick-David
  2020-03-02  9:35 ` xtraeme
@ 2020-03-02 21:44 ` Frick-David
  2020-03-03 13:59 ` jrigg
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Frick-David @ 2020-03-02 21:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

New comment by Frick-David on void-packages repository

https://github.com/void-linux/void-packages/issues/19670#issuecomment-593639027

Comment:
Okay sweet, got it working. Thanks!
I will let the repo owners know as well!

Would this also build on musl?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Package Request: python3-hidapi (arch) or python3-hid (ubuntu)
  2020-03-02  5:29 [ISSUE] Package Request: python3-hidapi (arch) or python3-hid (ubuntu) Frick-David
  2020-03-02  9:35 ` xtraeme
  2020-03-02 21:44 ` Frick-David
@ 2020-03-03 13:59 ` jrigg
  2020-03-03 14:12 ` jrigg
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jrigg @ 2020-03-03 13:59 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 555 bytes --]

New comment by jrigg on void-packages repository

https://github.com/void-linux/void-packages/issues/19670#issuecomment-593963982

Comment:
> I will let the repo owners know as well!

From the  linked page:
If cython-hidapi is to be installed from sources or directly from PyPI, then build tools and **development headers for Python**, libusb-1.0 and libudev are also needed.

> Would this also build on musl?

"Packages are available for certain Linux distributions and package managers:
Alpine Linux: liquidctl"

Alpine uses musl, so yes.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Package Request: python3-hidapi (arch) or python3-hid (ubuntu)
  2020-03-02  5:29 [ISSUE] Package Request: python3-hidapi (arch) or python3-hid (ubuntu) Frick-David
                   ` (2 preceding siblings ...)
  2020-03-03 13:59 ` jrigg
@ 2020-03-03 14:12 ` jrigg
  2020-03-06 21:18 ` Frick-David
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: jrigg @ 2020-03-03 14:12 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 571 bytes --]

New comment by jrigg on void-packages repository

https://github.com/void-linux/void-packages/issues/19670#issuecomment-593963982

Comment:
> I will let the repo owners know as well!

I would guess they already know :-) 
"If cython-hidapi is to be installed from sources or directly from PyPI, then build tools and **development headers for Python**, libusb-1.0 and libudev are also needed."

> Would this also build on musl?

"Packages are available for certain Linux distributions and package managers:
Alpine Linux: liquidctl"

Alpine uses musl, so yes.



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Package Request: python3-hidapi (arch) or python3-hid (ubuntu)
  2020-03-02  5:29 [ISSUE] Package Request: python3-hidapi (arch) or python3-hid (ubuntu) Frick-David
                   ` (3 preceding siblings ...)
  2020-03-03 14:12 ` jrigg
@ 2020-03-06 21:18 ` Frick-David
  2020-12-03  2:04 ` [ISSUE] [CLOSED] " Frick-David
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Frick-David @ 2020-03-06 21:18 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 268 bytes --]

New comment by Frick-David on void-packages repository

https://github.com/void-linux/void-packages/issues/19670#issuecomment-595969353

Comment:
@jrigg Thanks, I did not see that. Very nice. This is a great little library. Is there any chance it could get packaged? 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [ISSUE] [CLOSED] Package Request: python3-hidapi (arch) or python3-hid (ubuntu)
  2020-03-02  5:29 [ISSUE] Package Request: python3-hidapi (arch) or python3-hid (ubuntu) Frick-David
                   ` (4 preceding siblings ...)
  2020-03-06 21:18 ` Frick-David
@ 2020-12-03  2:04 ` Frick-David
  2020-12-04  2:22 ` Frick-David
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Frick-David @ 2020-12-03  2:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 691 bytes --]

Closed issue by Frick-David on void-packages repository

https://github.com/void-linux/void-packages/issues/19670

Description:
Hey there,

I am using void linux (non-musl). I am trying to build [this](https://github.com/jonasmalacofilho/liquidctl)
repo for use on my computer. However, it fails with an error about missing Python.h header for hidapi, which I did not see a package for. Is there any chance this can be added for me. It would be sweet to get some RGB with my void linux.

In addition, is there any way I can also help build packages for others that need help. I want to help void linux grow, but am unsure how. For now, I am just trying to make PR's for documentation. 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Package Request: python3-hidapi (arch) or python3-hid (ubuntu)
  2020-03-02  5:29 [ISSUE] Package Request: python3-hidapi (arch) or python3-hid (ubuntu) Frick-David
                   ` (5 preceding siblings ...)
  2020-12-03  2:04 ` [ISSUE] [CLOSED] " Frick-David
@ 2020-12-04  2:22 ` Frick-David
  2020-12-04 13:38 ` Frick-David
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Frick-David @ 2020-12-04  2:22 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 331 bytes --]

New comment by Frick-David on void-packages repository

https://github.com/void-linux/void-packages/issues/19670#issuecomment-738515762

Comment:
I am seeing that `python3-hidapi` or `python3-hid` were not previously packaged. I will probably go ahead and package it. Link to the repo here: https://github.com/trezor/cython-hidapi

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Package Request: python3-hidapi (arch) or python3-hid (ubuntu)
  2020-03-02  5:29 [ISSUE] Package Request: python3-hidapi (arch) or python3-hid (ubuntu) Frick-David
                   ` (6 preceding siblings ...)
  2020-12-04  2:22 ` Frick-David
@ 2020-12-04 13:38 ` Frick-David
  2020-12-04 14:25 ` Frick-David
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Frick-David @ 2020-12-04 13:38 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1617 bytes --]

New comment by Frick-David on void-packages repository

https://github.com/void-linux/void-packages/issues/19670#issuecomment-738788306

Comment:
Per my discussion to package it:
```
- for a linux distro, you're going to need to build it linking to system hidapi (which is not its default)
- you need to pick which backends to enable (hidraw, libusb, or both)... default is both, but some distros may prefer only hidraw (which is the better one, unless hidraw is not available on that kernel for some reason)
- finally, if for some reason you need to override CFLAGS or anything like that, well, you may have issues with stuff being hardcoded in cython-hidapi's setup.py
again, the Arch PKGBUILD is a good reference, although they only build the hidraw backend and, like i mentined, this may not be the correct choice for void
regardless, be very careful that the build phase and the install phase are in sync in terms of which options you're sending to cython-hidapi's setup.py
(this is probably already handled by void, like options are only passed to build, and install uses the skip-build option... still, this is a common source of issues when building that lib with anything but its defaults options, which are not suitable for linux distros)
oh, the reason why you want to use system hidapi, instead of the default, is that the default is whatever hidapi version the project has pulled in... and no, then don't always stick to hidapi releases, in the past they have started to use a random commit
anyway: https://github.com/archlinux/svntogit-community/blob/packages/python-hidapi/trunk/PKGBUILD
```

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Package Request: python3-hidapi (arch) or python3-hid (ubuntu)
  2020-03-02  5:29 [ISSUE] Package Request: python3-hidapi (arch) or python3-hid (ubuntu) Frick-David
                   ` (7 preceding siblings ...)
  2020-12-04 13:38 ` Frick-David
@ 2020-12-04 14:25 ` Frick-David
  2020-12-04 19:13 ` Frick-David
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Frick-David @ 2020-12-04 14:25 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1617 bytes --]

New comment by Frick-David on void-packages repository

https://github.com/void-linux/void-packages/issues/19670#issuecomment-738788306

Comment:
Per my discussion to package it:
```
- for a linux distro, you're going to need to build it linking to system hidapi (which is not its default)
- you need to pick which backends to enable (hidraw, libusb, or both)... default is both, but some distros may prefer only hidraw (which is the better one, unless hidraw is not available on that kernel for some reason)
- finally, if for some reason you need to override CFLAGS or anything like that, well, you may have issues with stuff being hardcoded in cython-hidapi's setup.py
again, the Arch PKGBUILD is a good reference, although they only build the hidraw backend and, like i mentined, this may not be the correct choice for void
regardless, be very careful that the build phase and the install phase are in sync in terms of which options you're sending to cython-hidapi's setup.py
(this is probably already handled by void, like options are only passed to build, and install uses the skip-build option... still, this is a common source of issues when building that lib with anything but its defaults options, which are not suitable for linux distros)
oh, the reason why you want to use system hidapi, instead of the default, is that the default is whatever hidapi version the project has pulled in... and no, then don't always stick to hidapi releases, in the past they have started to use a random commit
anyway: https://github.com/archlinux/svntogit-community/blob/packages/python-hidapi/trunk/PKGBUILD
```

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Package Request: python3-hidapi (arch) or python3-hid (ubuntu)
  2020-03-02  5:29 [ISSUE] Package Request: python3-hidapi (arch) or python3-hid (ubuntu) Frick-David
                   ` (8 preceding siblings ...)
  2020-12-04 14:25 ` Frick-David
@ 2020-12-04 19:13 ` Frick-David
  2020-12-04 19:13 ` Frick-David
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: Frick-David @ 2020-12-04 19:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 903 bytes --]

New comment by Frick-David on void-packages repository

https://github.com/void-linux/void-packages/issues/19670#issuecomment-738966002

Comment:
``- Build it, linking to system hadapi
- Pick what backends to enable (hidraw, libusb, or both). Default is both, but some distros may use only hidraw.
- Look through cythonhidapi's setup.py if CFLAGS need to be overwritten
- Be careful that the build phase and the install phase are in sync in terms of which options being sent to cython-hidapi's setup.py to make sure it works (pretty new at this sort of thing, so will need to watch out as I feel this could be easy to mess up. )

- See Arch PKGBUILD for Cython-Hidapi (this does use the hidraw backend however, which Void may or may not follow) and other Void's package templates for examples
- Link: https://github.com/archlinux/svntogit-community/blob/packages/python-hidapi/trunk/PKGBUILD
```

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Package Request: python3-hidapi (arch) or python3-hid (ubuntu)
  2020-03-02  5:29 [ISSUE] Package Request: python3-hidapi (arch) or python3-hid (ubuntu) Frick-David
                   ` (9 preceding siblings ...)
  2020-12-04 19:13 ` Frick-David
@ 2020-12-04 19:13 ` Frick-David
  2020-12-14  0:39 ` Frick-David
  2020-12-14  0:39 ` Frick-David
  12 siblings, 0 replies; 14+ messages in thread
From: Frick-David @ 2020-12-04 19:13 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 898 bytes --]

New comment by Frick-David on void-packages repository

https://github.com/void-linux/void-packages/issues/19670#issuecomment-738966002

Comment:
- Build it, linking to system hadapi
- Pick what backends to enable (hidraw, libusb, or both). Default is both, but some distros may use only hidraw.
- Look through cythonhidapi's setup.py if CFLAGS need to be overwritten
- Be careful that the build phase and the install phase are in sync in terms of which options being sent to cython-hidapi's setup.py to make sure it works (pretty new at this sort of thing, so will need to watch out as I feel this could be easy to mess up. )

- See Arch PKGBUILD for Cython-Hidapi (this does use the hidraw backend however, which Void may or may not follow) and other Void's package templates for examples
- Link: https://github.com/archlinux/svntogit-community/blob/packages/python-hidapi/trunk/PKGBUILD


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Package Request: python3-hidapi (arch) or python3-hid (ubuntu)
  2020-03-02  5:29 [ISSUE] Package Request: python3-hidapi (arch) or python3-hid (ubuntu) Frick-David
                   ` (10 preceding siblings ...)
  2020-12-04 19:13 ` Frick-David
@ 2020-12-14  0:39 ` Frick-David
  2020-12-14  0:39 ` Frick-David
  12 siblings, 0 replies; 14+ messages in thread
From: Frick-David @ 2020-12-14  0:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2342 bytes --]

New comment by Frick-David on void-packages repository

https://github.com/void-linux/void-packages/issues/19670#issuecomment-744100645

Comment:
Attaching the Arch built:
```
# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: Andy Weidenbaum <archbaum@gmail.com>
# Contributor: Kevin Azzam <arch@kevin.azz.am>

pkgname=python-hidapi
_pipname=hidapi
pkgver=0.10.1
#_pkgver=${pkgver%.*}.post${pkgver##*.}
_pkgver="$pkgver"
pkgrel=1
arch=('x86_64')
pkgdesc="A Cython interface to the hidapi from signal11/hidapi"
url="https://github.com/trezor/cython-hidapi"
depends=('python' 'hidapi')
makedepends=('cython' 'python-setuptools' 'udev')
license=('custom')
source=("https://pypi.org/packages/source/${_pipname:0:1}/$_pipname/$_pipname-$_pkgver.tar.gz")
sha512sums=('681e3691a4b05b13abc38d305c68e448728612442d0ef12ce54d12eeebee6e18d33566c462a276d18ce5e29fad208e6fcde49bbe4b162eae5cd72ce37dea880b')

build() {
  cd "$_pipname-$_pkgver"

  python setup.py build \
        --without-libusb --with-system-hidapi
}

check() {
  cd "$_pipname-$_pkgver"

  local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
  PYTHONPATH="$PWD/build/lib.linux-$CARCH-${python_version}" python tests.py
}

package_python-hidapi() {
  cd "$_pipname-$_pkgver"

  python setup.py install --root="$pkgdir" --optimize=1 --skip-build \
        --without-libusb --with-system-hidapi

  install -Dm 755 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
  install -Dm 755 LICENSE-bsd.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-bsd.txt
  install -Dm 755 LICENSE-gpl3.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-gpl3.txt
  install -Dm 755 LICENSE-orig.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-orig.txt
}
```

I know void does not need the arch anymore.
This is a python package so, I should reference a void python package for reference.
I can see it relies on udev, which might be tricky. I know void uses `eudev` and I am not sure if there is easy crossover there.
The license says `custom` I will need to look more into this.

The rest looks pretty straight forward unless I run into a problem with `eudev` or void does something entirely differently. We shall see.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: Package Request: python3-hidapi (arch) or python3-hid (ubuntu)
  2020-03-02  5:29 [ISSUE] Package Request: python3-hidapi (arch) or python3-hid (ubuntu) Frick-David
                   ` (11 preceding siblings ...)
  2020-12-14  0:39 ` Frick-David
@ 2020-12-14  0:39 ` Frick-David
  12 siblings, 0 replies; 14+ messages in thread
From: Frick-David @ 2020-12-14  0:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 2121 bytes --]

New comment by Frick-David on void-packages repository

https://github.com/void-linux/void-packages/issues/19670#issuecomment-744100645

Comment:
Attaching the Arch built:
```
pkgname=python-hidapi
_pipname=hidapi
pkgver=0.10.1
#_pkgver=${pkgver%.*}.post${pkgver##*.}
_pkgver="$pkgver"
pkgrel=1
arch=('x86_64')
pkgdesc="A Cython interface to the hidapi from signal11/hidapi"
url="https://github.com/trezor/cython-hidapi"
depends=('python' 'hidapi')
makedepends=('cython' 'python-setuptools' 'udev')
license=('custom')
source=("https://pypi.org/packages/source/${_pipname:0:1}/$_pipname/$_pipname-$_pkgver.tar.gz")
sha512sums=('681e3691a4b05b13abc38d305c68e448728612442d0ef12ce54d12eeebee6e18d33566c462a276d18ce5e29fad208e6fcde49bbe4b162eae5cd72ce37dea880b')

build() {
  cd "$_pipname-$_pkgver"

  python setup.py build \
        --without-libusb --with-system-hidapi
}

check() {
  cd "$_pipname-$_pkgver"

  local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
  PYTHONPATH="$PWD/build/lib.linux-$CARCH-${python_version}" python tests.py
}

package_python-hidapi() {
  cd "$_pipname-$_pkgver"

  python setup.py install --root="$pkgdir" --optimize=1 --skip-build \
        --without-libusb --with-system-hidapi

  install -Dm 755 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
  install -Dm 755 LICENSE-bsd.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-bsd.txt
  install -Dm 755 LICENSE-gpl3.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-gpl3.txt
  install -Dm 755 LICENSE-orig.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE-orig.txt
}
```

I know void does not need the arch anymore.
This is a python package so, I should reference a void python package for reference.
I can see it relies on udev, which might be tricky. I know void uses `eudev` and I am not sure if there is easy crossover there.
The license says `custom` I will need to look more into this.

The rest looks pretty straight forward unless I run into a problem with `eudev` or void does something entirely differently. We shall see.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-12-14  0:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02  5:29 [ISSUE] Package Request: python3-hidapi (arch) or python3-hid (ubuntu) Frick-David
2020-03-02  9:35 ` xtraeme
2020-03-02 21:44 ` Frick-David
2020-03-03 13:59 ` jrigg
2020-03-03 14:12 ` jrigg
2020-03-06 21:18 ` Frick-David
2020-12-03  2:04 ` [ISSUE] [CLOSED] " Frick-David
2020-12-04  2:22 ` Frick-David
2020-12-04 13:38 ` Frick-David
2020-12-04 14:25 ` Frick-David
2020-12-04 19:13 ` Frick-David
2020-12-04 19:13 ` Frick-David
2020-12-14  0:39 ` Frick-David
2020-12-14  0:39 ` Frick-David

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).