docker/pip install fails from master/main due to PEP440
paddy01 opened this issue Β· comments
** Bug Report **
Describe the bug
Trying to install exabgp from pip or docker
To Reproduce
Follow suggested install from master/main branch
Expected behavior
Working exabgp build
Environment (please complete the following information):
- OS: Debian
- Version master/main
Additional context
This seem to be due to PEP440 requirement. Can't find a way to allow it so opening this bug request due to that.
Building from any release version(like 4.2.21) works perfectly.
(other issue that exist in master/main branched for docker build fixed in pull request #1133)
As the information provided is unclear on what was done - works for me (mac) ...
user: thomas zsh 2~ via π v3.10.9 (zeicon-py3.10)
at 14:04:47 β― pip install exabgp
Collecting exabgp
Downloading exabgp-4.2.21.tar.gz (408 kB)
ββββββββββββββββββββββββββββββββββββββββ 408.1/408.1 kB 9.5 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Requirement already satisfied: setuptools in ./Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/lib/python3.10/site-packages (from exabgp) (60.6.0)
Building wheels for collected packages: exabgp
Building wheel for exabgp (setup.py) ... done
Created wheel for exabgp: filename=exabgp-4.2.21-py3-none-any.whl size=575003 sha256=cea07e6a25e6cbd6dff80eb32d36f576eeedbd8f0e7693e3d579552accc926ac
Stored in directory: /Users/thomas/Library/Caches/pip/wheels/4d/b3/9b/fc904de651c2488e25395ab3bf5d3ed735647d943aae7eb8f9
Successfully built exabgp
Installing collected packages: exabgp
Successfully installed exabgp-4.2.21
user: thomas zsh 2~ via π v3.10.9 (zeicon-py3.10) took 1s
at 14:04:50 β― pip uninstall exabgp
Found existing installation: exabgp 4.2.21
Uninstalling exabgp-4.2.21:
Would remove:
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/bin/exabgp
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/bin/exabgp-cli
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/bin/exabgp-healthcheck
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/bin/exabgpcli
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-add-remove.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-announce.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-announcement.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-api.nothing.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-api.receive.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-attributes-vpn.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-attributes.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-broken-flow.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-check.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-eor.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-fast.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-flow.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-manual-eor.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-multi-neighbor.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-multisession.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-nexthop-self.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-nexthop.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-no-respawn-1.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-no-respawn-2.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-notification.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-open.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-reload.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-teardown.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-vpls.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/api-vpnv4.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/dynamic-1.pl
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/dynamic-1.sh
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/stderr-1.py
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/syslog-1.py
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/watchdog-1.pl
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/watchdog-1.sh
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/etc/exabgp/examples/watchdog.run
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/lib/python3.10/site-packages/exabgp-4.2.21.dist-info/*
/Users/thomas/Library/Caches/pypoetry/virtualenvs/zeicon-JzXdrzqt-py3.10/lib/python3.10/site-packages/exabgp/*
Proceed (Y/n)? y
Successfully uninstalled exabgp-4.2.21
I can only run multipass easily ATM but works on Ubuntu (Debian derivative) too.
ubuntu@overriding-robin:~$ pip3 install exabgp
Defaulting to user installation because normal site-packages is not writeable
Collecting exabgp
Downloading exabgp-4.2.21.tar.gz (408 kB)
ββββββββββββββββββββββββββββββββββββββββ 408.1/408.1 KB 7.8 MB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from exabgp) (59.6.0)
Building wheels for collected packages: exabgp
Building wheel for exabgp (setup.py) ... done
Created wheel for exabgp: filename=exabgp-4.2.21-py3-none-any.whl size=575004 sha256=68e9cbf72895978729f63a622e8e3fed9e3614e94ef8731edab910cf73a5e0c9
Stored in directory: /home/ubuntu/.cache/pip/wheels/ea/3c/e9/f1a4589702b0bfa7723e1255e680e029d863bba949536a40a3
Successfully built exabgp
Installing collected packages: exabgp
WARNING: The scripts exabgp, exabgp-cli, exabgp-healthcheck and exabgpcli are installed in '/home/ubuntu/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed exabgp-4.2.21
I "just" installed pip on that VM
sudo apt update
sudo apt install python3-pip
It does work when running towards a specific release but not master or main.
I haven't tried on a vanilla OS just under docker(from Dockerfile.remote)
Requirement already satisfied: setuptools in /usr/local/lib/python3.11/site-packages (65.5.0)
Collecting setuptools
Downloading setuptools-65.6.3-py3-none-any.whl (1.2 MB)
ββββββββββββββββββββββββββββββββββββββββ 1.2/1.2 MB 24.9 MB/s eta 0:00:00
Installing collected packages: setuptools
Attempting uninstall: setuptools
Found existing installation: setuptools 65.5.0
Uninstalling setuptools-65.5.0:
Successfully uninstalled setuptools-65.5.0
Successfully installed setuptools-65.6.3
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Collecting git+https://github.com/Exa-Networks/exabgp.git@master
Cloning https://github.com/Exa-Networks/exabgp.git (to revision master) to ./pip-req-build-943p0nx9
Running command git clone --filter=blob:none --quiet https://github.com/Exa-Networks/exabgp.git /tmp/pip-req-build-943p0nx9
Running command git checkout -b master --track origin/master
Switched to a new branch 'master'
Branch 'master' set up to track remote branch 'master' from 'origin'.
Resolved https://github.com/Exa-Networks/exabgp.git to commit 79e1bc699edf69b3a4682ab572e2a092bd946478
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
Requirement already satisfied: setuptools in /usr/local/lib/python3.11/site-packages (from exabgp===master) (65.6.3)
Building wheels for collected packages: exabgp
Building wheel for exabgp (pyproject.toml): started
Building wheel for exabgp (pyproject.toml): finished with status 'done'
Created wheel for exabgp: filename=exabgp-master-py3-none-any.whl size=518023 sha256=bd1a5ac594ddfdc16ef1a71bc703ecee9432a4f38a555e7aaf69435d59f6ad3c
Stored in directory: /tmp/pip-ephem-wheel-cache-j25qlxun/wheels/3c/37/34/6d89cdd496e1a02832fd38106097387f931cb795b35d0926f5
WARNING: Built wheel for exabgp is invalid: Metadata 1.2 mandates PEP 440 version, but 'master' is not
Failed to build exabgp
ERROR: Could not build wheels for exabgp, which is required to install pyproject.toml-based projects
The command '/bin/sh -c cd /tmp && echo Building ${version} && pip install -U setuptools && pip install git+https://github.com/Exa-Networks/exabgp.git@${version}' returned a non-zero code: 1
The command run is not presented. Was it using https:// or a local installation?
tried pip install .
which failed so ran poetry update
seems to work now.
updated the poetry file, can not reproduce, AFAICS works.
pip install --user git+https://github.com/exa-networks/exabgp@4.2.18
works too but pip install --user git+https://github.com/exa-networks/exabgp
or pip install --user git+https://github.com/exa-networks/exabgp@main
does not and there is nothing I can think I could do to resolve this issue.