Skip to content

Instantly share code, notes, and snippets.

@cboylan
Created October 19, 2021 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cboylan/a14e3458f187ccd3561c8fe96b82509b to your computer and use it in GitHub Desktop.
Save cboylan/a14e3458f187ccd3561c8fe96b82509b to your computer and use it in GitHub Desktop.
Installing updated bindep with pip 8.1.1
root@7e6030e17519:~# git clone https://opendev.org/opendev/bindep
Cloning into 'bindep'...
remote: Enumerating objects: 426, done.
remote: Counting objects: 100% (426/426), done.
remote: Compressing objects: 100% (135/135), done.
remote: Total 1061 (delta 398), reused 291 (delta 291), pack-reused 635
Receiving objects: 100% (1061/1061), 213.10 KiB | 0 bytes/s, done.
Resolving deltas: 100% (593/593), done.
Checking connectivity... done.
root@7e6030e17519:~# cd bindep/
root@7e6030e17519:~/bindep# pwd
/root/bindep
root@7e6030e17519:~/bindep# git fetch https://review.opendev.org/opendev/bindep refs/changes/47/814647/2 && git checkout FETCH_HEAD
remote: Counting objects: 103, done
remote: Finding sources: 100% (3/3)
remote: Total 3 (delta 1), reused 3 (delta 1)
Unpacking objects: 100% (3/3), done.
From https://review.opendev.org/opendev/bindep
* branch refs/changes/47/814647/2 -> FETCH_HEAD
Note: checking out 'FETCH_HEAD'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at 0bd79b1... Add old python packaging pin
root@7e6030e17519:~/bindep# git log -1
commit 0bd79b1d5dd94570f8e3629b991642e919acdb94
Author: Clark Boylan <clark.boylan@gmail.com>
Date: Tue Oct 19 13:32:00 2021 -0700
Add old python packaging pin
The packaging package doesn't support python3.5 or older anymore. Bindep
is still occasionally used on systems without newer python. Add an
environment marker to our requirements to install older packaging on
those systems.
Change-Id: I28949b0bb7d4978fc7f71109d0c65b9b76d6563f
root@7e6030e17519:~/bindep# git diff HEAD^
diff --git a/requirements.txt b/requirements.txt
index 6ab819d..18ad23b 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,5 @@
distro
pbr>=2.0.0 # Apache-2.0
Parsley
-packaging
+packaging ; python_version >= '3.6'
+packaging<21.0 ; python_version < '3.6'
root@7e6030e17519:~/bindep# cd
root@7e6030e17519:~# pip --version
bash: pip: command not found
root@7e6030e17519:~# pip3 --version
pip 8.1.1 from /usr/lib/python3/dist-packages (python 3.5)
root@7e6030e17519:~# pip3 install -U /root/bindep
Processing ./bindep
Complete output from command python setup.py egg_info:
Couldn't find index page for 'pbr' (maybe misspelled?)
No local packages or download links found for pbr
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-loubpi_8-build/setup.py", line 29, in <module>
pbr=True)
File "/usr/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 269, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 826, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1092, in best_match
return self.obtain(req, installer)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1104, in obtain
return installer(requirement)
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/lib/python3/dist-packages/setuptools/command/easy_install.py", line 657, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('pbr')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-loubpi_8-build/
You are using pip version 8.1.1, however version 21.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@7e6030e17519:~# pip3 install pbr
Collecting pbr
Downloading https://files.pythonhosted.org/packages/18/e0/1d4702dd81121d04a477c272d47ee5b6bc970d1a0990b11befa275c55cf2/pbr-5.6.0-py2.py3-none-any.whl (111kB)
100% |################################| 112kB 2.3MB/s
Installing collected packages: pbr
Successfully installed pbr-5.6.0
You are using pip version 8.1.1, however version 21.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@7e6030e17519:~# pip3 install -U /root/bindep
Processing ./bindep
Collecting distro (from bindep===2.10.1.dev1)
Downloading https://files.pythonhosted.org/packages/b3/8d/a0a5c389d76f90c766e956515d34c3408a1e18f60fbaa08221d1f6b87490/distro-1.6.0-py2.py3-none-any.whl
Requirement already up-to-date: pbr>=2.0.0 in /usr/local/lib/python3.5/dist-packages (from bindep===2.10.1.dev1)
Collecting Parsley (from bindep===2.10.1.dev1)
Downloading https://files.pythonhosted.org/packages/2b/d6/4fed8d65e28a970e1c5cb33ce9c7e22e3de745e1b2ae37af051ef16aea3b/Parsley-1.3-py2.py3-none-any.whl (88kB)
100% |################################| 92kB 3.0MB/s
Collecting packaging<21.0 (from bindep===2.10.1.dev1)
Downloading https://files.pythonhosted.org/packages/3e/89/7ea760b4daa42653ece2380531c90f64788d979110a2ab51049d92f408af/packaging-20.9-py2.py3-none-any.whl (40kB)
100% |################################| 40kB 3.7MB/s
Collecting pyparsing>=2.0.2 (from packaging<21.0->bindep===2.10.1.dev1)
Downloading https://files.pythonhosted.org/packages/8a/bb/488841f56197b13700afd5658fc279a2025a39e22449b7cf29864669b15d/pyparsing-2.4.7-py2.py3-none-any.whl (67kB)
100% |################################| 71kB 7.3MB/s
Installing collected packages: distro, Parsley, pyparsing, packaging, bindep
Running setup.py install for bindep ... done
Successfully installed Parsley-1.3 bindep-2.10.1.dev1 distro-1.6.0 packaging-20.9 pyparsing-2.4.7
You are using pip version 8.1.1, however version 21.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@7e6030e17519:~# bind
bind bindep/
root@7e6030e17519:~# which bindep
/usr/local/bin/bindep
root@7e6030e17519:~# bindep --version
bindep 2.10.1.dev1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment