Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

package "tests" in Python path? #957

Open
dodotronix opened this issue Sep 18, 2023 · 0 comments
Open

package "tests" in Python path? #957

dodotronix opened this issue Sep 18, 2023 · 0 comments

Comments

@dodotronix
Copy link

Vunit seems to install its tests into "test" in the Python path.

I found out that, if i create my own archlinux package according to the pkgbuild guidelines from archwiki, i get following error when i run makepkg -si

error: failed to commit transaction (conflicting files)
vunit-hdl-git: /usr/lib/python3.11/site-packages/tests/__init__.py exists in filesystem (owned by python-protonvpn-nm-lib)
vunit-hdl-git: /usr/lib/python3.11/site-packages/tests/__pycache__/__init__.cpython-311.opt-1.pyc exists in filesystem (owned by python-protonvpn-nm-lib)
vunit-hdl-git: /usr/lib/python3.11/site-packages/tests/__pycache__/__init__.cpython-311.pyc exists in filesystem (owned by python-protonvpn-nm-lib)

Here is my package

#ARCH PKGBUILD

_gitrepo='vunit'
pkgname='vunit-hdl-git'
pkgver=4.7.0.40
pkgrel=1
pkgdesc="Vunit framework for writing automated HDL testbenches"
arch=('any')
url="https://github.com/VUnit/vunit.git"
license=('GPL3')
makedepends=('python-build' 'python-installer' 'python-setuptools-scm' 'python-setuptools' 'python-wheel')
depends=('python-colorama')
conflicts=($pkgname)
source=("git+https://github.com/VUnit/$_gitrepo.git")
sha384sums=('SKIP')

pkgver() {
  cd "$srcdir/$_gitrepo"
  sed -i 's/\(setuptools_scm\).*/\1 >= 2.0.0"/g' pyproject.toml
 git describe --tags --long | sed 's/^v\([^-]*-[^-]*\)-g.*/\1/;s/-/./g'
}

build() {
  cd "$srcdir/$_gitrepo"
  python -m build --wheel --no-isolation
}

package() {
  cd "$srcdir/$_gitrepo"
  python -m installer --destdir="$pkgdir" dist/*.whl
}

According to the archwiki in the chapter "Test directory in site-package" it is not recommended practice to install tests in /usr/lib/pythonX.Y/site-packages/tests/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant