pipman icon indicating copy to clipboard operation
pipman copied to clipboard

Can't generate PKGBUILD from a git repository

Open terencode opened this issue 6 years ago • 12 comments

I use pipman git+https://github.com/amezin/powerplay-table-editor.git and I get the following:

pipman: Preparing virtualenv
pipman: checking for pip upgrade
Collecting pip
  Using cached https://files.pythonhosted.org/packages/62/ca/94d32a6516ed197a491d17d46595ce58a83cbb2fca280414e57cd86b84dc/pip-19.2.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 19.0.3
    Uninstalling pip-19.0.3:
      Successfully uninstalled pip-19.0.3
Successfully installed pip-19.2.1
pipman: Installing 'git+https://github.com/amezin/powerplay-table-editor.git' in virtualenv
Collecting git+https://github.com/amezin/powerplay-table-editor.git
  Cloning https://github.com/amezin/powerplay-table-editor.git to /tmp/pip-req-build-htiu91uw
  Running command git clone -q https://github.com/amezin/powerplay-table-editor.git /tmp/pip-req-build-htiu91uw
Collecting PyQt5 (from amdgpu-pptable==0.1.dev18+g3e568fc)
  Using cached https://files.pythonhosted.org/packages/85/bd/8a0c863802449f35ad9ca21a1b73190639c206758b4b5e2425617fc99ce9/PyQt5-5.13.0-5.13.0-cp35.cp36.cp37.cp38-abi3-manylinux1_x86_64.whl
Collecting PyQt5_sip<13,>=4.19.14 (from PyQt5->amdgpu-pptable==0.1.dev18+g3e568fc)
  Using cached https://files.pythonhosted.org/packages/ec/7d/c8d2326c405cfed1858af83915fa02ba9e9722ae3e0343df0950fd900039/PyQt5_sip-4.19.18-cp37-cp37m-manylinux1_x86_64.whl
Installing collected packages: PyQt5-sip, PyQt5, amdgpu-pptable
  Running setup.py install for amdgpu-pptable ... done
Successfully installed PyQt5-5.13.0 PyQt5-sip-4.19.18 amdgpu-pptable-0.1.dev18+g3e568fc
Traceback (most recent call last):
  File "/usr/bin/pipman", line 109, in <module>
    action(args, quiet)
  File "/usr/bin/pipman", line 41, in generate
    Pip2Pkgbuild(packages, quiet=quiet).generate_all(dir)
  File "/usr/lib/python3.7/site-packages/pipman/pip2pkgbuild.py", line 90, in __init__
    self.setup_packages(packages, quiet)
  File "/usr/lib/python3.7/site-packages/pipman/pip2pkgbuild.py", line 116, in setup_packages
    self.install_in_venv(pack)
  File "/usr/lib/python3.7/site-packages/pipman/pip2pkgbuild.py", line 229, in install_in_venv
    dependencies = subprocess.check_output([VENV_PIP, 'show', package])
  File "/usr/lib/python3.7/subprocess.py", line 395, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.7/subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/tmp/pipman/pipman-venv/bin/pip', 'show', 'git+https://github.com/amezin/powerplay-table-editor.git']' returned non-zero exit status 1.

terencode avatar Jul 31 '19 16:07 terencode

pipman doesn't currently support installing from a git repository. I'll look into it and verify if it can be implemented.

sollidsnake avatar Aug 06 '19 21:08 sollidsnake

Ok thanks! What is the other way to install this particular program?

terencode avatar Aug 06 '19 23:08 terencode

You mean to install on Arch Linux? You can create a PKGBUILD for that. Arch Linux's wiki explains the process very well. You can also some other PKGBUILD as a base. You can download the for any package with yay -G package, either from AUR or the main repositories.

sollidsnake avatar Aug 07 '19 02:08 sollidsnake

Well not really to install it then, just have a directory with the deps needed to execute it locally.

terencode avatar Aug 07 '19 02:08 terencode

Did you try following the instructions on the project's repository? It worked for me. The following command should do it: pip3 install --user git+https://github.com/amezin/powerplay-table-editor.git

And then you run with amdgpu-pptable-editor

sollidsnake avatar Aug 07 '19 02:08 sollidsnake

Well it does work, but I want to have it on a local folder.

terencode avatar Aug 07 '19 02:08 terencode

The executable should be located in ~/.local/bin/amdgpu-pptable-editor if you installed with the --user option. You can create a .desktop file for it and place it in your ~/.local/share/applications, then it will appear in your menu just like any other application. Just grab some .desktop file on that directory and edit the run command and the icon if you wish, and save it as a new file on that directory. If you have a hard time doing that let me know and I'll help you creating a .desktop file for you.

Otherwise you can just symlink it to your local folder (ln -s ~/.local/bin/amdgpu-pptable-editor /path/to/your/local/folder) and mark it as executable with you file manager.

sollidsnake avatar Aug 07 '19 02:08 sollidsnake

Ok, this sounds good, thanks. If I remove the executable, does it remove everything that was installed by pip install --user ?

terencode avatar Aug 07 '19 02:08 terencode

No, you should uninstall it with pip uninstall amdgpu_pptable

sollidsnake avatar Aug 07 '19 02:08 sollidsnake

Alright, and if I really want one folder containing everything, I can just use virtualenv I guess. I I'll leave the issue open if you think you can implement generating a PKGBUILD from a git repo.

terencode avatar Aug 07 '19 02:08 terencode

Ok, thanks. Good luck!

sollidsnake avatar Aug 07 '19 02:08 sollidsnake

Thank you for your help :1st_place_medal:

terencode avatar Aug 07 '19 02:08 terencode