-
Notifications
You must be signed in to change notification settings - Fork 7
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
pypi2pkgbuild not found in PATH after pacman/yay installation #9
Comments
Hi, Try with this package: https://aur.archlinux.org/packages/python-pypi2pkgbuild-git I've just updated the script to build that package - hopefully it solves the issue. $ yay -Syyy
$ yay -S python-pypi2pkgbuild-git |
I think the problem is in the reference to the When I run the script as of commit I can resolve the binary only in the following ways: Command output[user@hostname Arch-GNS3-Helper]$ which pypi2pkgbuild.py
/usr/bin/pypi2pkgbuild.py
[user@hostname Arch-GNS3-Helper]$ pypi2pkgbuild.py --version
pypi2pkgbuild.py 0.3.post5+g96f95c6
[user@hostname Arch-GNS3-Helper]$ pypi2pkgbuild.py --help
usage: pypi2pkgbuild.py [-h] [--version] [-v] [-o] [-u] [-i NAME,...] [-b BASE_PATH] [-f] [--pre] [-n PKGNAME] [-r PKGREL] [-g MAKEDEPENDS,...] [-s PYPI_NAME,...] [-t PKGTYPES] [-D] [-e PKGBUILD_EXTRAS] [-m MAKEPKG_OPTS] [-I]
[-p PACMAN_OPTS]
[name ...]
Create a PKGBUILD for a PyPI package and run makepkg.
positional arguments:
name The PyPI package names. (default: None)
options:
-h, --help show this help message and exit
--version show program's version number and exit
-v, --verbose Log at DEBUG level. (default: False)
-o, --outdated Find outdated packages. (default: False)
-u, --upgrade Find and build outdated packages. (default: False)
-i NAME,..., --ignore NAME,...
Comma-separated list of packages not to be upgrade. This flag can be passed multiple times; passing an empty flag ('-i=') can be used to strip out values passed so far. (default: ())
-b BASE_PATH, --base-path BASE_PATH
Base path where the packages directories are created. (default: .)
-f, --force Overwrite a previously existing PKGBUILD. (default: False)
--pre Include pre-releases. (default: False)
-n PKGNAME, --pkgname PKGNAME
Force $pkgname. (default: None)
-r PKGREL, --pkgrel PKGREL
Force value of $pkgrel (not applicable to metapackages). Set e.g. to 99 to override AUR packages. (default: 00)
-g MAKEDEPENDS,..., --guess-makedepends MAKEDEPENDS,...
Comma-separated list of makedepends that will be guessed. Allowed values: cython, swig. (default: ('cython', 'swig'))
-s PYPI_NAME,..., --setup-requires PYPI_NAME,...
Comma-separated list of setup_requires that will be forced. (default: ())
-t PKGTYPES, --pkgtypes PKGTYPES
Comma-separated preference order for dists. (default: ('anywheel', 'sdist', 'manylinuxwheel'))
-D, --no-deps Don't generate PKGBUILD for dependencies. (default: True)
-e PKGBUILD_EXTRAS, --pkgbuild-extras PKGBUILD_EXTRAS
Either contents of PKGBUILD_EXTRAS, or path to a patch directory (if a valid path). A patch directory should contain files of the form $pkgname.PKGBUILD_EXTRAS, which are used as PKGBUILD_EXTRAS. (default: )
-m MAKEPKG_OPTS, --makepkg MAKEPKG_OPTS
Additional arguments to pass to `makepkg`. (default: --cleanbuild --nodeps)
-I, --no-install Don't install the built packages. (default: True)
-p PACMAN_OPTS, --pacman PACMAN_OPTS
Additional arguments to pass to `pacman -U`. (default: )
[user@hostname Arch-GNS3-Helper]$ which pip2pkgbuild
which: no pip2pkgbuild in (/home/user/Applications/GNS3-Dev/venv/bin:/home/user/.asdf/shims:/opt/asdf-vm/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin)
[user@hostname Arch-GNS3-Helper]$ python-pypi2pkgbuild-git
bash: python-pypi2pkgbuild-git: command not found
[user@hostname Arch-GNS3-Helper]$ which python-pypi2pkgbuild-git
which: no python-pypi2pkgbuild-git in (/home/user/Applications/GNS3-Dev/venv/bin:/home/user/.asdf/shims:/opt/asdf-vm/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin) I tried simply replacing Truncated command output+----------------------------------------+
Installing GNS3 dependencies
+----------------------------------------+
warning: qt5-svg-5.15.3+kde+r12-1 is up to date -- skipping
warning: qt5-websockets-5.15.3+kde+r3-1 is up to date -- skipping
warning: python-pip-21.0-1 is up to date -- skipping
warning: python-pyqt5-5.15.6-7 is up to date -- skipping
warning: python-sip4-4.19.25-3 is up to date -- skipping
warning: python-async_generator-1.10-7 is up to date -- skipping
warning: python-jinja-3.0.3-3 is up to date -- skipping
warning: python-distro-1.7.0-1 is up to date -- skipping
warning: python-jsonschema-3.2.0-6 is up to date -- skipping
warning: python-aiohttp-cors-0.7.0-7 is up to date -- skipping
there is nothing to do
warning: git-2.35.1-1 is up to date -- skipping
there is nothing to do
usage: pypi2pkgbuild.py [-h] [--version] [-v] [-o] [-u] [-i NAME,...]
[-b BASE_PATH] [-f] [--pre] [-n PKGNAME] [-r PKGREL]
[-g MAKEDEPENDS,...] [-s PYPI_NAME,...] [-t PKGTYPES]
[-D] [-e PKGBUILD_EXTRAS] [-m MAKEPKG_OPTS] [-I]
[-p PACMAN_OPTS]
[name ...]
pypi2pkgbuild.py: error: unrecognized arguments: 3.6.2
usage: pypi2pkgbuild.py [-h] [--version] [-v] [-o] [-u] [-i NAME,...]
[-b BASE_PATH] [-f] [--pre] [-n PKGNAME] [-r PKGREL]
[-g MAKEDEPENDS,...] [-s PYPI_NAME,...] [-t PKGTYPES]
[-D] [-e PKGBUILD_EXTRAS] [-m MAKEPKG_OPTS] [-I]
[-p PACMAN_OPTS]
[name ...]
pypi2pkgbuild.py: error: unrecognized arguments: 1.3.0
usage: pypi2pkgbuild.py [-h] [--version] [-v] [-o] [-u] [-i NAME,...]
[-b BASE_PATH] [-f] [--pre] [-n PKGNAME] [-r PKGREL]
[-g MAKEDEPENDS,...] [-s PYPI_NAME,...] [-t PKGTYPES]
[-D] [-e PKGBUILD_EXTRAS] [-m MAKEPKG_OPTS] [-I]
[-p PACMAN_OPTS]
[name ...]
pypi2pkgbuild.py: error: unrecognized arguments: 0.4.0
usage: pypi2pkgbuild.py [-h] [--version] [-v] [-o] [-u] [-i NAME,...]
[-b BASE_PATH] [-f] [--pre] [-n PKGNAME] [-r PKGREL]
[-g MAKEDEPENDS,...] [-s PYPI_NAME,...] [-t PKGTYPES]
[-D] [-e PKGBUILD_EXTRAS] [-m MAKEPKG_OPTS] [-I]
[-p PACMAN_OPTS]
[name ...]
pypi2pkgbuild.py: error: unrecognized arguments: 5.6.6
usage: pypi2pkgbuild.py [-h] [--version] [-v] [-o] [-u] [-i NAME,...]
[-b BASE_PATH] [-f] [--pre] [-n PKGNAME] [-r PKGREL]
[-g MAKEDEPENDS,...] [-s PYPI_NAME,...] [-t PKGTYPES]
[-D] [-e PKGBUILD_EXTRAS] [-m MAKEPKG_OPTS] [-I]
[-p PACMAN_OPTS]
[name ...]
pypi2pkgbuild.py: error: unrecognized arguments: 3.0.1
usage: pypi2pkgbuild.py [-h] [--version] [-v] [-o] [-u] [-i NAME,...]
[-b BASE_PATH] [-f] [--pre] [-n PKGNAME] [-r PKGREL]
[-g MAKEDEPENDS,...] [-s PYPI_NAME,...] [-t PKGTYPES]
[-D] [-e PKGBUILD_EXTRAS] [-m MAKEPKG_OPTS] [-I]
[-p PACMAN_OPTS]
[name ...]
pypi2pkgbuild.py: error: unrecognized arguments: 5.0.0
+----------------------------------------+
Preparing to install GNS3-server
+----------------------------------------+
install-gns3.sh: line 251: pip2pkgbuild: command not found
+----------------------------------------+
Installing GNS3-server
+----------------------------------------+
==> ERROR: PKGBUILD does not exist.
+----------------------------------------+
Installing GNS3-GUI
+----------------------------------------+
install-gns3.sh: line 271: pip2pkgbuild: command not found
==> ERROR: PKGBUILD does not exist.
+----------------------------------------+
Verifying the installation
+----------------------------------------+
It appears the installation was either completed partially or has not been completed at all....
Checking further
which: no python-gns3-gui in (/home/user/Applications/GNS3-Dev/venv/bin:/home/user/.asdf/shims:/opt/asdf-vm/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin)
GNS3-GUI was not installed...
attempting to re-install
Cloning into 'gns3-gui'...
fatal: '/home/user/Applications/GNS3-Dev/gns3-server/gns3-gui' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ERROR: Invalid requirement: '/dev/null'
Hint: It looks like a path. The path does exist. The argument you provided (/dev/null) appears to be a requirements file. If that is the case, use the '-r' flag to install the packages specified within it.
ERROR: Invalid requirement: '/dev/null'
Hint: It looks like a path. The path does exist. The argument you provided (/dev/null) appears to be a requirements file. If that is the case, use the '-r' flag to install the packages specified within it.
ERROR:pypi2pkgbuild:Failed to obtain metadata for git+file:///home/user/Applications/GNS3-Dev/gns3-server/gns3-gui.
which: no python-gns3-server in (/home/user/Applications/GNS3-Dev/venv/bin:/home/user/.asdf/shims:/opt/asdf-vm/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/var/lib/flatpak/exports/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin)
GNS3-server was not installed...
attempting to re-install
Cloning into 'gns3-server'...
fatal: '/home/user/Applications/GNS3-Dev/gns3-server' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ERROR: Invalid requirement: '/dev/null'
Hint: It looks like a path. The path does exist. The argument you provided (/dev/null) appears to be a requirements file. If that is the case, use the '-r' flag to install the packages specified within it.
ERROR: Invalid requirement: '/dev/null'
Hint: It looks like a path. The path does exist. The argument you provided (/dev/null) appears to be a requirements file. If that is the case, use the '-r' flag to install the packages specified within it.
ERROR:pypi2pkgbuild:Failed to obtain metadata for git+file:///home/user/Applications/GNS3-Dev/gns3-server.
If you are using Gnome or Budgie, the script can make a launcher icon for you.
1 = yes, 2 = no
2
Done! Please remember to reboot your PC. Hopefully this is simply an environment issue. I am new to Arch-like distros and would appreciate your help in troubleshooting. |
Heya! I've taken another look - it's been a while and to say the very least - script is a bit messy. I should probably re-write it to build all the packages in a clean chroot. That's a project for another day. Long story short - pypi2pkgbuild was not required at all for this script. I've removed it completely. Instead, pip2pkgbuild should be used only. I've done a test run and everything built and installed correctly. I've not had a chance to actually launch and test the GUI though. Give it another go and let me know if any troubles. |
Hey, thanks for all your help! It appears that the changes since my last comment have indeed fixed the I am now experiencing a different issue, a Command outputTraceback (most recent call last):
File "/home/user/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 573, in _build_master
ws.require(__requires__)
File "/home/user/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 891, in require
needed = self.resolve(parse_requirements(requirements))
File "/home/user/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 782, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (distro 1.7.0 (/usr/lib/python3.10/site-packages), Requirement.parse('distro==1.6.0'), {'gns3-gui'})
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/gns3", line 33, in <module>
sys.exit(load_entry_point('gns3-gui==2.2.31', 'gui_scripts', 'gns3')())
File "/usr/bin/gns3", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib/python3.10/importlib/metadata/__init__.py", line 162, in load
module = import_module(match.group('module'))
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.10/site-packages/gns3/main.py", line 40, in <module>
from gns3.utils.get_resource import get_resource
File "/usr/lib/python3.10/site-packages/gns3/utils/get_resource.py", line 21, in <module>
import pkg_resources
File "/home/user/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3317, in <module>
def _initialize_master_working_set():
File "/home/user/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3291, in _call_aside
f(*args, **kwargs)
File "/home/user/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3329, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/home/user/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 575, in _build_master
return cls._build_from_requirements(__requires__)
File "/home/user/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 588, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/home/user/.local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 777, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'distro==1.6.0' distribution was not found and is required by gns3-gui Have you run into this? Could you please tell me what version of the In my limited understanding which may be inaccurate, Arch's rolling release nature does not support version pinning in AUR. We could probably just pin the version using a |
Environment
pacman
andpamac
andyay
AUR helperzsh
5.8.1bash
5.1.16/home/user/.asdf/shims:/opt/asdf-vm/bin:/home/user/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/var/lib/snapd/snap/bin
/usr/bin/python
installed on system viapacman
/home/user/.asdf/shims/python
installed viaasdf
version manager/usr/bin/python
/home/user/.asdf/shims/python
Behavior
After installing
pypi2pkgbuild
via package manager, the executablespypi2pkgbuild
orpypi2pkgbuild.py
are not in my PATH.Issue encountered at this step.
Issue persists in every combination of tools listed in my environment.
Attempting to install simply with
yay
Output
Whether I run the following as the very next commands, or in a freshly
source
d terminal instance, I can't find the executable.I can successfully install the package with
pip
.Installing with pip
The package python-pypi2pkgbuild does appear in Octopi package manager, but in the shell
which python-pypi2pkgbuild
saysnot found
.Attached log of full execution of the Arch-GNS3-Helper script.
2022-03-19.log
The text was updated successfully, but these errors were encountered: