kinu-garage / docker_vcs

Tool to support building Container/Images using VCS
Apache License 2.0
2 stars 0 forks source link

Feature: distribution of the package is cumbersome #17

Open 130s opened 1 year ago

130s commented 1 year ago

Issue aimed to address

Review items

130s commented 1 year ago
Got installed, but not executable :/ ``` # pip3 install -i https://test.pypi.org/simple/ docker-vcs-tools Looking in indexes: https://test.pypi.org/simple/ Requirement already satisfied: docker-vcs-tools in /usr/local/lib/python3.9/site-packages (0.1.0) Requirement already satisfied: docker>=5.0.3 in /usr/local/lib/python3.9/site-packages (from docker-vcs-tools) (6.1.3) Requirement already satisfied: vcstool>=0.3.0 in /usr/local/lib/python3.9/site-packages (from docker-vcs-tools) (0.3.0) Requirement already satisfied: packaging>=14.0 in /usr/local/lib/python3.9/site-packages (from docker>=5.0.3->docker-vcs-tools) (23.1) Requirement already satisfied: requests>=2.26.0 in /usr/local/lib/python3.9/site-packages (from docker>=5.0.3->docker-vcs-tools) (2.31.0) Requirement already satisfied: urllib3>=1.26.0 in /usr/local/lib/python3.9/site-packages (from docker>=5.0.3->docker-vcs-tools) (2.0.4) Requirement already satisfied: websocket-client>=0.32.0 in /usr/local/lib/python3.9/site-packages (from docker>=5.0.3->docker-vcs-tools) (1.6.3) Requirement already satisfied: PyYAML in /usr/local/lib/python3.9/site-packages (from vcstool>=0.3.0->docker-vcs-tools) (6.0.1) Requirement already satisfied: setuptools in /usr/local/lib/python3.9/site-packages (from vcstool>=0.3.0->docker-vcs-tools) (68.2.2) Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker>=5.0.3->docker-vcs-tools) (3.2.0) Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker>=5.0.3->docker-vcs-tools) (3.4) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker>=5.0.3->docker-vcs-tools) (2023.7.22) 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 # find / -iname docker-vcs-tools # find / -iname docker_vcs_tools /usr/local/lib/python3.9/site-packages/docker_vcs_tools # ll /usr/local/lib/python3.9/site-packages/docker_vcs_tools bash: ll: command not found # ls -lath /usr/local/lib/python3.9/site-packages/docker_vcs_tools total 44K drwxr-xr-x 1 root root 4.0K Sep 14 20:53 .. drwxr-xr-x 3 root root 4.0K Sep 13 14:53 . -rw-r--r-- 1 root root 0 Sep 13 14:53 __init__.py drwxr-xr-x 2 root root 4.0K Sep 13 14:53 __pycache__ -rw-r--r-- 1 root root 27K Sep 13 14:53 docker_builder_vcs.py ```
130s commented 1 year ago

Even though the latest is 0.1.2 defined in setup.py, I still get 0.1.0 from testpypi.

log ``` # pip install -i https://test.pypi.org/simple/ docker-vcs Looking in indexes: https://test.pypi.org/simple/ Collecting docker-vcs Obtaining dependency information for docker-vcs from https://test-files.pythonhosted.org/packages/fa/62/eb3b526b651e653ce9059f0e88988e1f2b0cfe56209b52d9ace2d36c24f6/docker_vcs-0.1.0-py3-none-any.whl.metadata Using cached https://test-files.pythonhosted.org/packages/fa/62/eb3b526b651e653ce9059f0e88988e1f2b0cfe56209b52d9ace2d36c24f6/docker_vcs-0.1.0-py3-none-any.whl.metadata (727 bytes) Requirement already satisfied: docker>=5.0.3 in /usr/local/lib/python3.9/site-packages (from docker-vcs) (6.1.3) Requirement already satisfied: vcstool>=0.3.0 in /usr/local/lib/python3.9/site-packages (from docker-vcs) (0.3.0) Requirement already satisfied: packaging>=14.0 in /usr/local/lib/python3.9/site-packages (from docker>=5.0.3->docker-vcs) (23.1) Requirement already satisfied: requests>=2.26.0 in /usr/local/lib/python3.9/site-packages (from docker>=5.0.3->docker-vcs) (2.31.0) Requirement already satisfied: urllib3>=1.26.0 in /usr/local/lib/python3.9/site-packages (from docker>=5.0.3->docker-vcs) (2.0.4) Requirement already satisfied: websocket-client>=0.32.0 in /usr/local/lib/python3.9/site-packages (from docker>=5.0.3->docker-vcs) (1.6.3) Requirement already satisfied: PyYAML in /usr/local/lib/python3.9/site-packages (from vcstool>=0.3.0->docker-vcs) (6.0.1) Requirement already satisfied: setuptools in /usr/local/lib/python3.9/site-packages (from vcstool>=0.3.0->docker-vcs) (68.2.2) Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker>=5.0.3->docker-vcs) (3.2.0) Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker>=5.0.3->docker-vcs) (3.4) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker>=5.0.3->docker-vcs) (2023.7.22) Using cached https://test-files.pythonhosted.org/packages/fa/62/eb3b526b651e653ce9059f0e88988e1f2b0cfe56209b52d9ace2d36c24f6/docker_vcs-0.1.0-py3-none-any.whl (16 kB) Installing collected packages: docker-vcs Successfully installed docker-vcs-0.1.0 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 root@130s-p16s:~# ```
130s commented 1 year ago
Verbose log ``` # pip3 cache purge && pip3 install -i https://test.pypi.org/simple/ --no-cache-dir -vvv docker-vcs WARNING: No matching packages Files removed: 0 Using pip 23.2.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9) Non-user install because site-packages writeable Created temporary directory: /tmp/pip-build-tracker-h_uw7ho_ Initialized build tracking at /tmp/pip-build-tracker-h_uw7ho_ Created build tracker: /tmp/pip-build-tracker-h_uw7ho_ Entered build tracker: /tmp/pip-build-tracker-h_uw7ho_ Created temporary directory: /tmp/pip-install-e97b0qbc Created temporary directory: /tmp/pip-ephem-wheel-cache-_590e6po Looking in indexes: https://test.pypi.org/simple/ 1 location(s) to search for versions of docker-vcs: * https://test.pypi.org/simple/docker-vcs/ Fetching project page and analyzing links: https://test.pypi.org/simple/docker-vcs/ Getting page https://test.pypi.org/simple/docker-vcs/ Found index url https://test.pypi.org/simple/ Starting new HTTPS connection (1): test.pypi.org:443 https://test.pypi.org:443 "GET /simple/docker-vcs/ HTTP/1.1" 200 408 Fetched page https://test.pypi.org/simple/docker-vcs/ as application/vnd.pypi.simple.v1+json Found link https://test-files.pythonhosted.org/packages/fa/62/eb3b526b651e653ce9059f0e88988e1f2b0cfe56209b52d9ace2d36c24f6/docker_vcs-0.1.0-py3-none-any.whl (from https://test.pypi.org/simple/docker-vcs/), version: 0.1.0 Skipping link: not a file: https://test.pypi.org/simple/docker-vcs/ Given no hashes to check 1 links for project 'docker-vcs': discarding no candidates Collecting docker-vcs Obtaining dependency information for docker-vcs from https://test-files.pythonhosted.org/packages/fa/62/eb3b526b651e653ce9059f0e88988e1f2b0cfe56209b52d9ace2d36c24f6/docker_vcs-0.1.0-py3-none-any.whl.metadata Created temporary directory: /tmp/pip-unpack-p5pu_1pd Starting new HTTPS connection (1): test-files.pythonhosted.org:443 https://test-files.pythonhosted.org:443 "GET /packages/fa/62/eb3b526b651e653ce9059f0e88988e1f2b0cfe56209b52d9ace2d36c24f6/docker_vcs-0.1.0-py3-none-any.whl.metadata HTTP/1.1" 200 727 Downloading https://test-files.pythonhosted.org/packages/fa/62/eb3b526b651e653ce9059f0e88988e1f2b0cfe56209b52d9ace2d36c24f6/docker_vcs-0.1.0-py3-none-any.whl.metadata (727 bytes) : Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker>=5.0.3->docker-vcs) (3.2.0) Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker>=5.0.3->docker-vcs) (3.4) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker>=5.0.3->docker-vcs) (2023.7.22) Created temporary directory: /tmp/pip-unpack-3q22v6oc https://test-files.pythonhosted.org:443 "GET /packages/fa/62/eb3b526b651e653ce9059f0e88988e1f2b0cfe56209b52d9ace2d36c24f6/docker_vcs-0.1.0-py3-none-any.whl HTTP/1.1" 200 16190 Downloading https://test-files.pythonhosted.org/packages/fa/62/eb3b526b651e653ce9059f0e88988e1f2b0cfe56209b52d9ace2d36c24f6/docker_vcs-0.1.0-py3-none-any.whl (16 kB) Downloading link https://test-files.pythonhosted.org/packages/fa/62/eb3b526b651e653ce9059f0e88988e1f2b0cfe56209b52d9ace2d36c24f6/docker_vcs-0.1.0-py3-none-any.whl (from https://test.pypi.org/simple/docker-vcs/) to /tmp/pip-unpack-3q22v6oc/docker_vcs-0.1.0-py3-none-any.whl Added docker-vcs from https://test-files.pythonhosted.org/packages/fa/62/eb3b526b651e653ce9059f0e88988e1f2b0cfe56209b52d9ace2d36c24f6/docker_vcs-0.1.0-py3-none-any.whl to build tracker '/tmp/pip-build-tracker-h_ uw7ho_' Removed docker-vcs from https://test-files.pythonhosted.org/packages/fa/62/eb3b526b651e653ce9059f0e88988e1f2b0cfe56209b52d9ace2d36c24f6/docker_vcs-0.1.0-py3-none-any.whl from build tracker '/tmp/pip-build-tracke r-h_uw7ho_' Installing collected packages: docker-vcs changing mode of /usr/local/bin/docker_vcs to 755 Successfully installed docker-vcs-0.1.0 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/war nings/venv 1 location(s) to search for versions of pip: * https://test.pypi.org/simple/pip/ Fetching project page and analyzing links: https://test.pypi.org/simple/pip/ Getting page https://test.pypi.org/simple/pip/ Found index url https://test.pypi.org/simple/ Starting new HTTPS connection (1): test.pypi.org:443 https://test.pypi.org:443 "GET /simple/pip/ HTTP/1.1" 200 1618 Fetched page https://test.pypi.org/simple/pip/ as application/vnd.pypi.simple.v1+json Found link https://test-files.pythonhosted.org/packages/13/41/026052a5e1f3aaf2abf250da55457769896ad09d714684ca6075813dde87/pip-8.0.0.dev0-py2.py3-none-any.whl (from https://test.pypi.org/simple/pip/), version: 8.0.0.dev0 Found link https://test-files.pythonhosted.org/packages/81/7f/84ebb5c50e0efdf746968b72e4f1e8d827d6d3f3fd7162557a38a3f6e7bd/pip-8.0.0.dev0.tar.gz (from https://test.pypi.org/simple/pip/), version: 8.0.0.dev0 Found link https://test-files.pythonhosted.org/packages/97/72/1d514201e7d7fc7fff5aac3de9c7b892cd72fb4bf23fd983630df96f7412/pip-10.0.0b2-py2.py3-none-any.whl (from https://test.pypi.org/simple/pip/) (requires-p ython:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*), version: 10.0.0b2 Found link https://test-files.pythonhosted.org/packages/32/67/572f642e6e42c580d3154964cfbab7d9322c23b0f417c6c01fdd206a2777/pip-10.0.0b2.tar.gz (from https://test.pypi.org/simple/pip/) (requires-python:>=2.7,!= 3.0.*,!=3.1.*,!=3.2.*), version: 10.0.0b2 Found link https://test-files.pythonhosted.org/packages/62/a1/0d452b6901b0157a0134fd27ba89bf95a857fbda64ba52e1ca2cf61d8412/pip-10.0.0-py2.py3-none-any.whl (from https://test.pypi.org/simple/pip/) (requires-pyt hon:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*), version: 10.0.0 Found link https://test-files.pythonhosted.org/packages/e0/69/983a8e47d3dfb51e1463c1e962b2ccd1d74ec4e236e232625e353d830ed2/pip-10.0.0.tar.gz (from https://test.pypi.org/simple/pip/) (requires-python:>=2.7,!=3. 0.*,!=3.1.*,!=3.2.*), version: 10.0.0 Found link https://test-files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl (from https://test.pypi.org/simple/pip/) (requires-pyt hon:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*), version: 10.0.1 Found link https://test-files.pythonhosted.org/packages/ae/e8/2340d46ecadb1692a1e455f13f75e596d4eab3d11a57446f08259dee8f02/pip-10.0.1.tar.gz (from https://test.pypi.org/simple/pip/) (requires-python:>=2.7,!=3. 0.*,!=3.1.*,!=3.2.*), version: 10.0.1 Found link https://test-files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl (from https://test.pypi.org/simple/pip/) (requires-pytho n:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*), version: 18.0 Found link https://test-files.pythonhosted.org/packages/69/81/52b68d0a4de760a2f1979b0931ba7889202f302072cc7a0d614211bc7579/pip-18.0.tar.gz (from https://test.pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0. *,!=3.1.*,!=3.2.*,!=3.3.*), version: 18.0 Found link https://test-files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl (from https://test.pypi.org/simple/pip/) (requires-pytho n:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*), version: 18.1 Found link https://test-files.pythonhosted.org/packages/45/ae/8a0ad77defb7cc903f09e551d88b443304a9bd6e6f124e75c0fbbf6de8f7/pip-18.1.tar.gz (from https://test.pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0. *,!=3.1.*,!=3.2.*,!=3.3.*), version: 18.1 Skipping link: not a file: https://test.pypi.org/simple/pip/ Given no hashes to check 8 links for project 'pip': discarding no candidates Remote version of pip: 18.1 Local version of pip: 23.2.1 Was pip installed by pip? True Removed build tracker: '/tmp/pip-build-tracker-h_uw7ho_' ```

Still no clue.

I even deleted the project https://test.pypi.org/project/docker-vcs/, and re-uploaded by twine with an even newer version number 0.1.3. Surprisingly, a project with the same name STILL shows in the release history that 0.1.1 and 0.1.0 (yanked), both of which were deleted, but in manage-project section those aren't listed (and only 0.1.3 is listed).

One thing I didn't log is that I uploaded a same wheel file of 0.1.0 with a hyphenated sub version number 0.1.0-1, without knowing that it will NOT break anything.

twine upload --verbose --repository testpypi  docker_vcs-0.1.0-1-py3-none-any.whl

At this point I can only assume that broke something on test.pypi so this project https://test.pypi.org/manage/project/docker-vcs is unusable for me. Since I think the pkg reached a minimally releaseable status, I'll just move on to non-test pypi repo, and hopefully in the future I won't have to need https://test.pypi.org/manage/project/docker-vcs repo.


Update 9/18

A few days later, I can now successfully pip install the latest version as intended. I also found emails from test.pypi.org came in a few hours late after my deletion operation. So maybe it just takes time.

130s commented 1 year ago
New issue (No module named 'sh') ``` # pip install -i https://test.pypi.org/simple --no-cache-dir docker-vcs Looking in indexes: https://test.pypi.org/simple Collecting docker-vcs Obtaining dependency information for docker-vcs from https://test-files.pythonhosted.org/packages/f2/f3/b5da987ebef750616dd0073da9963ee04f18ad7a8bdd9e7976d4b8c5967b/docker_vcs-0.1.3-py3-none-any.whl.metadata Downloading https://test-files.pythonhosted.org/packages/f2/f3/b5da987ebef750616dd0073da9963ee04f18ad7a8bdd9e7976d4b8c5967b/docker_vcs-0.1.3-py3-none-any.whl.metadata (727 bytes) Requirement already satisfied: docker>=5.0.3 in /usr/local/lib/python3.9/site-packages (from docker-vcs) (6.1.3) Requirement already satisfied: vcstool>=0.3.0 in /usr/local/lib/python3.9/site-packages (from docker-vcs) (0.3.0) Requirement already satisfied: packaging>=14.0 in /usr/local/lib/python3.9/site-packages (from docker>=5.0.3->docker-vcs) (23.1) Requirement already satisfied: requests>=2.26.0 in /usr/local/lib/python3.9/site-packages (from docker>=5.0.3->docker-vcs) (2.31.0) Requirement already satisfied: urllib3>=1.26.0 in /usr/local/lib/python3.9/site-packages (from docker>=5.0.3->docker-vcs) (2.0.4) Requirement already satisfied: websocket-client>=0.32.0 in /usr/local/lib/python3.9/site-packages (from docker>=5.0.3->docker-vcs) (1.6.3) Requirement already satisfied: PyYAML in /usr/local/lib/python3.9/site-packages (from vcstool>=0.3.0->docker-vcs) (6.0.1) Requirement already satisfied: setuptools in /usr/local/lib/python3.9/site-packages (from vcstool>=0.3.0->docker-vcs) (68.2.2) Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker>=5.0.3->docker-vcs) (3.2.0) Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker>=5.0.3->docker-vcs) (3.4) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker>=5.0.3->docker-vcs) (2023.7.22) Downloading https://test-files.pythonhosted.org/packages/f2/f3/b5da987ebef750616dd0073da9963ee04f18ad7a8bdd9e7976d4b8c5967b/docker_vcs-0.1.3-py3-none-any.whl (16 kB) Installing collected packages: docker-vcs Successfully installed docker-vcs-0.1.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 # docker_vcs --help Traceback (most recent call last): File "/usr/local/bin/docker_vcs", line 5, in from docker_vcs_lib.docker_vcs import main File "/usr/local/lib/python3.9/site-packages/docker_vcs_lib/docker_vcs.py", line 6, in from docker_vcs_lib.docker_builder_vcs import DockerBuilderVCS File "/usr/local/lib/python3.9/site-packages/docker_vcs_lib/docker_builder_vcs.py", line 11, in from docker_vcs_lib.os_util import OsUtil File "/usr/local/lib/python3.9/site-packages/docker_vcs_lib/os_util.py", line 16, in import sh ModuleNotFoundError: No module named 'sh' ```
130s commented 1 year ago
"package versions have conflicting dependencies."? ``` # pip3 install -i https://test.pypi.org/simple docker_vcs Looking in indexes: https://test.pypi.org/simple Collecting docker_vcs Using cached https://test-files.pythonhosted.org/packages/14/7d/2cab4e79ad78a2cd8f6bed5fc0ff1b73cb65d4393594d41efd8fb6f74301/docker_vcs-0.1.4-py3-none-any.whl (17 kB) Using cached https://test-files.pythonhosted.org/packages/f2/f3/b5da987ebef750616dd0073da9963ee04f18ad7a8bdd9e7976d4b8c5967b/docker_vcs-0.1.3-py3-none-any.whl (16 kB) ERROR: Cannot install docker-vcs==0.1.3 and docker-vcs==0.1.4 because these package versions have conflicting dependencies. The conflict is caused by: docker-vcs 0.1.4 depends on sh docker-vcs 0.1.3 depends on docker>=5.0.3 To fix this you could try to: 1. loosen the range of package versions you've specified 2. remove package versions to allow pip attempt to solve the dependency conflict ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts WARNING: You are using pip version 22.0.4; however, version 23.2.1 is available. You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command. ```
130s commented 1 year ago

Hm. Upgraded pip, updated setup.py (to remove versions from the dependencies) but still NG.

Log ``` # pip3 install -i https://test.pypi.org/simple docker_vcs==0.1.6 Looking in indexes: https://test.pypi.org/simple ERROR: Could not find a version that satisfies the requirement docker_vcs==0.1.6 (from versions: 0.1.3, 0.1.4, 0.1.5) ERROR: No matching distribution found for docker_vcs==0.1.6 root@130s-p16s:/cws# pip install -i https://test.pypi.org/simple docker_vcs==0.1.6 Looking in indexes: https://test.pypi.org/simple Collecting docker_vcs==0.1.6 Obtaining dependency information for docker_vcs==0.1.6 from https://test-files.pythonhosted.org/packages/a6/3f/0946a538cee7ab872e1d301b15abd6dd010879cb16a62fdf8a766cee0632/docker_vcs-0.1.6-py3-none-any.whl.metadata Downloading https://test-files.pythonhosted.org/packages/a6/3f/0946a538cee7ab872e1d301b15abd6dd010879cb16a62fdf8a766cee0632/docker_vcs-0.1.6-py3-none-any.whl.metadata (4.6 kB) Collecting docker (from docker_vcs==0.1.6) Using cached https://test-files.pythonhosted.org/packages/34/d8/7b1732c7e7eab550bd1ba7edeb20e52be989573d2babf55c6d0d16e7b272/docker-3.7.0.dev0-py2.py3-none-any.whl (132 kB) INFO: pip is looking at multiple versions of docker-vcs to determine which version is compatible with other requirements. This could take a while. ERROR: Could not find a version that satisfies the requirement vcstool (from docker-vcs) (from versions: none) ERROR: No matching distribution found for vcstool ```

Switching to vcstool2 with pip3.

Still the same error `No matching distribution found`. ``` # pip3 install -i https://test.pypi.org/simple docker_vcs==0.1.7 Looking in indexes: https://test.pypi.org/simple Collecting docker_vcs==0.1.7 Obtaining dependency information for docker_vcs==0.1.7 from https://test-files.pythonhosted.org/packages/04/67/743af732e2db0978e219fbfd0e6ed9027ab3ef6bccc1eda6d7bb555165d6/docker_vcs-0.1.7-py3-none-any.whl.metadata Using cached https://test-files.pythonhosted.org/packages/04/67/743af732e2db0978e219fbfd0e6ed9027ab3ef6bccc1eda6d7bb555165d6/docker_vcs-0.1.7-py3-none-any.whl.metadata (4.6 kB) Collecting docker (from docker_vcs==0.1.7) Using cached https://test-files.pythonhosted.org/packages/34/d8/7b1732c7e7eab550bd1ba7edeb20e52be989573d2babf55c6d0d16e7b272/docker-3.7.0.dev0-py2.py3-none-any.whl (132 kB) INFO: pip is looking at multiple versions of docker-vcs to determine which version is compatible with other requirements. This could take a while. ERROR: Could not find a version that satisfies the requirement vcstool2 (from docker-vcs) (from versions: none) ERROR: No matching distribution found for vcstool2 # ```

But individually it does get installed.

# pip3 install vcstool2           
Collecting vcstool2                              
  Downloading vcstool2-0.4.3-py3-none-any.whl (38 kB)
:
Installing collected packages: PyYAML, packaging, vcstool2
Successfully installed PyYAML-6.0.1 packaging-23.1 vcstool2-0.4.3
130s commented 1 year ago

Can't get around it...Nos stuck with sh.

log ``` # pip3 install -i https://test.pypi.org/simple docker_vcs==0.1.8 Looking in indexes: https://test.pypi.org/simple Collecting docker_vcs==0.1.8 Obtaining dependency information for docker_vcs==0.1.8 from https://test-files.pythonhosted.org/packages/de/96/34a094a83c4c86ac0ca958064ae514878db85804173433e31a79f0b9114f/docker_vcs-0.1.8-py3-none-any.whl.metadata Downloading https://test-files.pythonhosted.org/packages/de/96/34a094a83c4c86ac0ca958064ae514878db85804173433e31a79f0b9114f/docker_vcs-0.1.8-py3-none-any.whl.metadata (4.6 kB) Collecting docker (from docker_vcs==0.1.8) Using cached https://test-files.pythonhosted.org/packages/34/d8/7b1732c7e7eab550bd1ba7edeb20e52be989573d2babf55c6d0d16e7b272/docker-3.7.0.dev0-py2.py3-none-any.whl (132 kB) INFO: pip is looking at multiple versions of docker-vcs to determine which version is compatible with other requirements. This could take a while. ERROR: Could not find a version that satisfies the requirement sh (from docker-vcs) (from versions: none) ERROR: No matching distribution found for sh ```

Again an individual pkg gets installed via pip.

# pip3 install sh
Collecting sh
  Obtaining dependency information for sh from https://files.pythonhosted.org/packages/53/08/9de3e477ad2fd432e78ce351341686d1bbec346976b22c7cc5f81f1ff15a/sh-2.0.6-py3-none-any.whl.metadata
  Downloading sh-2.0.6-py3-none-any.whl.metadata (3.3 kB)
Downloading sh-2.0.6-py3-none-any.whl (38 kB)
Installing collected packages: sh
Successfully installed sh-2.0.6
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
# 

Can't get around it...Nos stuck with sh.

log ``` # pip3 install -i https://test.pypi.org/simple docker_vcs==0.1.8 Looking in indexes: https://test.pypi.org/simple Collecting docker_vcs==0.1.8 Obtaining dependency information for docker_vcs==0.1.8 from https://test-files.pythonhosted.org/packages/de/96/34a094a83c4c86ac0ca958064ae514878db85804173433e31a79f0b9114f/docker_vcs-0.1.8-py3-none-any.whl.metadata Downloading https://test-files.pythonhosted.org/packages/de/96/34a094a83c4c86ac0ca958064ae514878db85804173433e31a79f0b9114f/docker_vcs-0.1.8-py3-none-any.whl.metadata (4.6 kB) Collecting docker (from docker_vcs==0.1.8) Using cached https://test-files.pythonhosted.org/packages/34/d8/7b1732c7e7eab550bd1ba7edeb20e52be989573d2babf55c6d0d16e7b272/docker-3.7.0.dev0-py2.py3-none-any.whl (132 kB) INFO: pip is looking at multiple versions of docker-vcs to determine which version is compatible with other requirements. This could take a while. ERROR: Could not find a version that satisfies the requirement sh (from docker-vcs) (from versions: none) ERROR: No matching distribution found for sh ```

Again an individual pkg gets installed via pip.

# pip3 install sh
Collecting sh
  Obtaining dependency information for sh from https://files.pythonhosted.org/packages/53/08/9de3e477ad2fd432e78ce351341686d1bbec346976b22c7cc5f81f1ff15a/sh-2.0.6-py3-none-any.whl.metadata
  Downloading sh-2.0.6-py3-none-any.whl.metadata (3.3 kB)
Downloading sh-2.0.6-py3-none-any.whl (38 kB)
Installing collected packages: sh
Successfully installed sh-2.0.6
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
# 

Debugging with -vvv ``` # pip3 install -vvv -i https://test.pypi.org/simple docker_vcs==0.1.8 Using pip 23.2.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9) Non-user install because site-packages writeable Created temporary directory: /tmp/pip-build-tracker-5wsog2oa Initialized build tracking at /tmp/pip-build-tracker-5wsog2oa Created build tracker: /tmp/pip-build-tracker-5wsog2oa Entered build tracker: /tmp/pip-build-tracker-5wsog2oa Created temporary directory: /tmp/pip-install-q3rtqjsp Created temporary directory: /tmp/pip-ephem-wheel-cache-t3gvnee1 Looking in indexes: https://test.pypi.org/simple 1 location(s) to search for versions of docker-vcs: * https://test.pypi.org/simple/docker-vcs/ Fetching project page and analyzing links: https://test.pypi.org/simple/docker-vcs/ Getting page https://test.pypi.org/simple/docker-vcs/ Found index url https://test.pypi.org/simple/ Looking up "https://test.pypi.org/simple/docker-vcs/" in the cache Request header has "max_age" as 0, cache bypassed Starting new HTTPS connection (1): test.pypi.org:443 https://test.pypi.org:443 "GET /simple/docker-vcs/ HTTP/1.1" 304 0 Fetched page https://test.pypi.org/simple/docker-vcs/ as application/vnd.pypi.simple.v1+json Found link https://test-files.pythonhosted.org/packages/f2/f3/b5da987ebef750616dd0073da9963ee04f18ad7a8bdd9e7976d4b8c5967b/docker_vcs-0.1.3-py3-none-any.whl (from https://test.pypi.org/simple/docker-vcs/), version: 0.1.3 Found link https://test-files.pythonhosted.org/packages/14/7d/2cab4e79ad78a2cd8f6bed5fc0ff1b73cb65d4393594d41efd8fb6f74301/docker_vcs-0.1.4-py3-none-any.whl (from https://test.pypi.org/simple/docker-vcs/), version: 0.1.4 Found link https://test-files.pythonhosted.org/packages/13/d7/3a41dc77480db8222e03681dbf40b49ebc825be905634eebbf0aa14d03ac/docker_vcs-0.1.5-py3-none-any.whl (from https://test.pypi.org/simple/docker-vcs/), version: 0.1.5 Found link https://test-files.pythonhosted.org/packages/a6/3f/0946a538cee7ab872e1d301b15abd6dd010879cb16a62fdf8a766cee0632/docker_vcs-0.1.6-py3-none-any.whl (from https://test.pypi.org/simple/docker-vcs/), version: 0.1.6 Found link https://test-files.pythonhosted.org/packages/04/67/743af732e2db0978e219fbfd0e6ed9027ab3ef6bccc1eda6d7bb555165d6/docker_vcs-0.1.7-py3-none-any.whl (from https://test.pypi.org/simple/docker-vcs/), version: 0.1.7 Found link https://test-files.pythonhosted.org/packages/de/96/34a094a83c4c86ac0ca958064ae514878db85804173433e31a79f0b9114f/docker_vcs-0.1.8-py3-none-any.whl (from https://test.pypi.org/simple/docker-vcs/), version: 0.1.8 Skipping link: not a file: https://test.pypi.org/simple/docker-vcs/ Given no hashes to check 1 links for project 'docker-vcs': discarding no candidates Collecting docker_vcs==0.1.8 Obtaining dependency information for docker_vcs==0.1.8 from https://test-files.pythonhosted.org/packages/de/96/34a094a83c4c86ac0ca958064ae514878db85804173433e31a79f0b9114f/docker_vcs-0.1.8-py3-none-any.whl.metadata Created temporary directory: /tmp/pip-unpack-8slmtu5j Looking up "https://test-files.pythonhosted.org/packages/de/96/34a094a83c4c86ac0ca958064ae514878db85804173433e31a79f0b9114f/docker_vcs-0.1.8-py3-none-any.whl.metadata" in the cache Current age based on date: 3133 Ignoring unknown cache-control directive: immutable Freshness lifetime from max-age: 365000000 The response is "fresh", returning cached response 365000000 > 3133 Using cached https://test-files.pythonhosted.org/packages/de/96/34a094a83c4c86ac0ca958064ae514878db85804173433e31a79f0b9114f/docker_vcs-0.1.8-py3-none-any.whl.metadata (4.6 kB) 1 location(s) to search for versions of docker: * https://test.pypi.org/simple/docker/ Fetching project page and analyzing links: https://test.pypi.org/simple/docker/ Getting page https://test.pypi.org/simple/docker/ Found index url https://test.pypi.org/simple/ Looking up "https://test.pypi.org/simple/docker/" in the cache Request header has "max_age" as 0, cache bypassed https://test.pypi.org:443 "GET /simple/docker/ HTTP/1.1" 304 0 Fetched page https://test.pypi.org/simple/docker/ as application/vnd.pypi.simple.v1+json Found link https://test-files.pythonhosted.org/packages/de/50/06919bda3476d4e47571af7feb680c4e16d55e01a43c47b30d7ab82d3bb8/docker-2.0.0.dev0.tar.gz (from https://test.pypi.org/simple/docker/), version: 2.0.0.dev0 Found link https://test-files.pythonhosted.org/packages/34/d8/7b1732c7e7eab550bd1ba7edeb20e52be989573d2babf55c6d0d16e7b272/docker-3.7.0.dev0-py2.py3-none-any.whl (from https://test.pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*), version: 3.7.0.dev0 Found link https://test-files.pythonhosted.org/packages/b8/48/cbd427b3edbaba06c09ecf5c34c69aa05a3d7e1e91f0e87f3f422002f103/docker-3.7.0.dev0.tar.gz (from https://test.pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*), version: 3.7.0.dev0 Skipping link: not a file: https://test.pypi.org/simple/docker/ Given no hashes to check 3 links for project 'docker': discarding no candidates Collecting docker (from docker_vcs==0.1.8) Created temporary directory: /tmp/pip-unpack-cnszg8dt Looking up "https://test-files.pythonhosted.org/packages/34/d8/7b1732c7e7eab550bd1ba7edeb20e52be989573d2babf55c6d0d16e7b272/docker-3.7.0.dev0-py2.py3-none-any.whl" in the cache Current age based on date: 69227 Ignoring unknown cache-control directive: immutable Freshness lifetime from max-age: 365000000 The response is "fresh", returning cached response 365000000 > 69227 Using cached https://test-files.pythonhosted.org/packages/34/d8/7b1732c7e7eab550bd1ba7edeb20e52be989573d2babf55c6d0d16e7b272/docker-3.7.0.dev0-py2.py3-none-any.whl (132 kB) Added docker from https://test-files.pythonhosted.org/packages/34/d8/7b1732c7e7eab550bd1ba7edeb20e52be989573d2babf55c6d0d16e7b272/docker-3.7.0.dev0-py2.py3-none-any.whl (from docker_vcs==0.1.8) to build tracker '/tmp/pip-build-tracker-5wsog2oa' Removed docker from https://test-files.pythonhosted.org/packages/34/d8/7b1732c7e7eab550bd1ba7edeb20e52be989573d2babf55c6d0d16e7b272/docker-3.7.0.dev0-py2.py3-none-any.whl (from docker_vcs==0.1.8) from build tracker '/tmp/pip-build-tracker-5wsog2oa' 1 location(s) to search for versions of sh: Found index url https://test.pypi.org/simple/ Looking up "https://test.pypi.org/simple/sh/" in the cache Request header has "max_age" as 0, cache bypassed https://test.pypi.org:443 "GET /simple/sh/ HTTP/1.1" 404 13 Status code 404 not in (200, 203, 300, 301, 308) Could not fetch URL https://test.pypi.org/simple/sh/: 404 Client Error: Not Found for url: https://test.pypi.org/simple/sh/ - skipping Skipping link: not a file: https://test.pypi.org/simple/sh/ Given no hashes to check 0 links for project 'sh': discarding no candidates INFO: pip is looking at multiple versions of docker-vcs to determine which version is compatible with other requirements. This could take a while. Will try a different candidate, due to conflict: docker-vcs 0.1.8 depends on sh ERROR: Could not find a version that satisfies the requirement sh (from docker-vcs) (from versions: none) ERROR: No matching distribution found for sh Exception information: Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve result = self._result = resolver.resolve( File "/usr/local/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 546, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "/usr/local/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 439, in resolve raise ResolutionImpossible(self.state.backtrack_causes) pip._vendor.resolvelib.resolvers.ResolutionImpossible: [RequirementInformation(requirement=SpecifierRequirement('sh'), parent=LinkCandidate('https://test-files.pythonhosted.org/packages/de/96/34a094a83c4c86ac0ca958064ae514878db85804173433e31a79f0b9114f/docker_vcs-0.1.8-py3-none-any .whl (from https://test.pypi.org/simple/docker-vcs/)'))] The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper status = run_func(*args) File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper return func(self, options, args) File "/usr/local/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 377, in run requirement_set = resolver.resolve( File "/usr/local/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 101, in resolve raise error from e pip._internal.exceptions.DistributionNotFound: No matching distribution found for sh Remote version of pip: 23.2.1 Local version of pip: 23.2.1 Was pip installed by pip? True Removed build tracker: '/tmp/pip-build-tracker-5wsog2oa' ```

Ok, those pkgs that are failing do NOT exist on https://test.pypi.org (test site). Workaround is as in https://stackoverflow.com/a/56449789/577001, have those deps already installed.

130s commented 1 year ago
New issue. ``` # pip3 install -v -i https://test.pypi.org/simple docker_vcs==0.1.8 Using pip 23.2.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9) Looking in indexes: https://test.pypi.org/simple Collecting docker_vcs==0.1.8 Obtaining dependency information for docker_vcs==0.1.8 from https://test-files.pythonhosted.org/packages/de/96/34a094a83c4c86ac0ca958064ae514878db85804173433e31a79f0b9114f/docker_vcs-0.1.8-py3-none-any.whl.metadata Using cached https://test-files.pythonhosted.org/packages/de/96/34a094a83c4c86ac0ca958064ae514878db85804173433e31a79f0b9114f/docker_vcs-0.1.8-py3-none-any.whl.metadata (4.6 kB) Collecting docker (from docker_vcs==0.1.8) Using cached https://test-files.pythonhosted.org/packages/34/d8/7b1732c7e7eab550bd1ba7edeb20e52be989573d2babf55c6d0d16e7b272/docker-3.7.0.dev0-py2.py3-none-any.whl (132 kB) Requirement already satisfied: sh in /usr/local/lib/python3.9/site-packages (from docker_vcs==0.1.8) (2.0.6) Requirement already satisfied: vcstool in /usr/local/lib/python3.9/site-packages (from docker_vcs==0.1.8) (0.3.0) Collecting six>=1.4.0 (from docker->docker_vcs==0.1.8) Using cached https://test-files.pythonhosted.org/packages/b3/b2/238e2590826bfdd113244a40d9d3eb26918bd798fc187e2360a8367068db/six-1.10.0.tar.gz (29 kB) Running command python setup.py egg_info running egg_info creating /tmp/pip-pip-egg-info-txv4anlx/six.egg-info writing /tmp/pip-pip-egg-info-txv4anlx/six.egg-info/PKG-INFO writing dependency_links to /tmp/pip-pip-egg-info-txv4anlx/six.egg-info/dependency_links.txt writing top-level names to /tmp/pip-pip-egg-info-txv4anlx/six.egg-info/top_level.txt writing manifest file '/tmp/pip-pip-egg-info-txv4anlx/six.egg-info/SOURCES.txt' reading manifest file '/tmp/pip-pip-egg-info-txv4anlx/six.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' no previously-included directories found matching 'documentation/_build' adding license file 'LICENSE' writing manifest file '/tmp/pip-pip-egg-info-txv4anlx/six.egg-info/SOURCES.txt' Preparing metadata (setup.py) ... done Collecting websocket-client>=0.32.0 (from docker->docker_vcs==0.1.8) Obtaining dependency information for websocket-client>=0.32.0 from https://test-files.pythonhosted.org/packages/0b/50/49e0d7342e5d441d43b525d6c84656ea40aea3e58d530004d07b22bc9b04/websocket_client-1.6.3-py3-none-any.whl.metadata Using cached https://test-files.pythonhosted.org/packages/0b/50/49e0d7342e5d441d43b525d6c84656ea40aea3e58d530004d07b22bc9b04/websocket_client-1.6.3-py3-none-any.whl.metadata (7.7 kB) INFO: pip is looking at multiple versions of docker to determine which version is compatible with other requirements. This could take a while. Collecting docker (from docker_vcs==0.1.8) Using cached https://test-files.pythonhosted.org/packages/de/50/06919bda3476d4e47571af7feb680c4e16d55e01a43c47b30d7ab82d3bb8/docker-2.0.0.dev0.tar.gz (134 kB) Running command python setup.py egg_info /usr/local/lib/python3.9/site-packages/setuptools/dist.py:487: UserWarning: Normalizing '2.0.0-dev' to '2.0.0.dev0' warnings.warn(tmpl.format(**locals())) running egg_info creating /tmp/pip-pip-egg-info-p01y7wke/docker.egg-info writing /tmp/pip-pip-egg-info-p01y7wke/docker.egg-info/PKG-INFO writing dependency_links to /tmp/pip-pip-egg-info-p01y7wke/docker.egg-info/dependency_links.txt writing requirements to /tmp/pip-pip-egg-info-p01y7wke/docker.egg-info/requires.txt writing top-level names to /tmp/pip-pip-egg-info-p01y7wke/docker.egg-info/top_level.txt writing manifest file '/tmp/pip-pip-egg-info-p01y7wke/docker.egg-info/SOURCES.txt' reading manifest file '/tmp/pip-pip-egg-info-p01y7wke/docker.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE' writing manifest file '/tmp/pip-pip-egg-info-p01y7wke/docker.egg-info/SOURCES.txt' Preparing metadata (setup.py) ... done Requirement already satisfied: requests!=2.11.0,!=2.12.2,>=2.5.2 in /usr/local/lib/python3.9/site-packages (from docker->docker_vcs==0.1.8) (2.31.0) ERROR: Cannot install docker_vcs because these package versions have conflicting dependencies. The conflict is caused by: docker 3.7.0.dev0 depends on docker-pycreds>=0.4.0 docker 2.0.0.dev0 depends on docker-pycreds>=0.2.1 To fix this you could try to: 1. loosen the range of package versions you've specified 2. remove package versions to allow pip attempt to solve the dependency conflict ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts ```

docker isn't installed so collision is not with the one already installed.

# pip3 uninstall docker
WARNING: Skipping docker as it is not installed.

# pip uninstall docker
WARNING: Skipping docker as it is not installed.
Trying to install it manually, same as the workaround for 1 issue back. ``` # pip3 install docker Collecting docker Obtaining dependency information for docker from https://files.pythonhosted.org/packages/db/be/3032490fa33b36ddc8c4b1da3252c6f974e7133f1a50de00c6b85cca203a/docker-6.1.3-py3-none-any.whl.metadata Downloading docker-6.1.3-py3-none-any.whl.metadata (3.5 kB) Requirement already satisfied: packaging>=14.0 in /usr/local/lib/python3.9/site-packages (from docker) (23.1) Requirement already satisfied: requests>=2.26.0 in /usr/local/lib/python3.9/site-packages (from docker) (2.31.0) Requirement already satisfied: urllib3>=1.26.0 in /usr/local/lib/python3.9/site-packages (from docker) (2.0.4) Collecting websocket-client>=0.32.0 (from docker) Obtaining dependency information for websocket-client>=0.32.0 from https://files.pythonhosted.org/packages/0b/50/49e0d7342e5d441d43b525d6c84656ea40aea3e58d530004d07b22bc9b04/websocket_client-1.6.3-py3-none-any.whl.metadata Downloading websocket_client-1.6.3-py3-none-any.whl.metadata (7.7 kB) Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker) (3.2.0) Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker) (3.4) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker) (2023.7.22) Downloading docker-6.1.3-py3-none-any.whl (148 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 148.1/148.1 kB 2.2 MB/s eta 0:00:00 Downloading websocket_client-1.6.3-py3-none-any.whl (57 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.3/57.3 kB 11.5 MB/s eta 0:00:00 Installing collected packages: websocket-client, docker Successfully installed docker-6.1.3 websocket-client-1.6.3 ```
Went well!... ``` # pip3 install -v -i https://test.pypi.org/simple docker_vcs==0.1.8 Using pip 23.2.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9) Looking in indexes: https://test.pypi.org/simple Collecting docker_vcs==0.1.8 Obtaining dependency information for docker_vcs==0.1.8 from https://test-files.pythonhosted.org/packages/de/96/34a094a83c4c86ac0ca958064ae514878db85804173433e31a79f0b9114f/docker_vcs-0.1.8-py3-none-any.whl.metadata Using cached https://test-files.pythonhosted.org/packages/de/96/34a094a83c4c86ac0ca958064ae514878db85804173433e31a79f0b9114f/docker_vcs-0.1.8-py3-none-any.whl.metadata (4.6 kB) Requirement already satisfied: docker in /usr/local/lib/python3.9/site-packages (from docker_vcs==0.1.8) (6.1.3) Requirement already satisfied: sh in /usr/local/lib/python3.9/site-packages (from docker_vcs==0.1.8) (2.0.6) Requirement already satisfied: vcstool in /usr/local/lib/python3.9/site-packages (from docker_vcs==0.1.8) (0.3.0) Requirement already satisfied: packaging>=14.0 in /usr/local/lib/python3.9/site-packages (from docker->docker_vcs==0.1.8) (23.1) Requirement already satisfied: requests>=2.26.0 in /usr/local/lib/python3.9/site-packages (from docker->docker_vcs==0.1.8) (2.31.0) Requirement already satisfied: urllib3>=1.26.0 in /usr/local/lib/python3.9/site-packages (from docker->docker_vcs==0.1.8) (2.0.4) Requirement already satisfied: websocket-client>=0.32.0 in /usr/local/lib/python3.9/site-packages (from docker->docker_vcs==0.1.8) (1.6.3) Requirement already satisfied: PyYAML in /usr/local/lib/python3.9/site-packages (from vcstool->docker_vcs==0.1.8) (6.0.1) Requirement already satisfied: setuptools in /usr/local/lib/python3.9/site-packages (from vcstool->docker_vcs==0.1.8) (58.1.0) Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker->docker_vcs==0.1.8) (3.2.0) Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker->docker_vcs==0.1.8) (3.4) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker->docker_vcs==0.1.8) (2023.7.22) Downloading https://test-files.pythonhosted.org/packages/de/96/34a094a83c4c86ac0ca958064ae514878db85804173433e31a79f0b9114f/docker_vcs-0.1.8-py3-none-any.whl (17 kB) Installing collected packages: docker_vcs changing mode of /usr/local/bin/docker_vcs to 755 Successfully installed docker_vcs-0.1.8 ```
130s commented 1 year ago

Packaging might have been settled. Now, importing.

# docker_vcs --help
Traceback (most recent call last):
  File "/usr/local/bin/docker_vcs", line 5, in <module>
    from docker_vcs_lib.docker_vcs import main
ImportError: cannot import name 'main' from 'docker_vcs_lib.docker_vcs' (/usr/local/lib/python3.9/site-packages/docker_vcs_lib/docker_vcs.py)

Just for now, (manually) setting PYTHONPATH lets Python find our module.

export PYTHONPATH=/usr/local/lib/python3.9/site-packages

PYTHONPATH shouldn't be the solution though.

130s commented 1 year ago

Just for now, (manually) setting PYTHONPATH lets Python find our module.

export PYTHONPATH=/usr/local/lib/python3.9/site-packages

PYTHONPATH shouldn't be the solution though.

130s commented 1 year ago

Exec runtime error. Maybe main issue: DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')).

Log ``` # ipython3 Python 3.9.2 (default, Feb 28 2021, 17:03:44) Type 'copyright', 'credits' or 'license' for more information IPython 7.20.0 -- An enhanced Interactive Python. Type '?' for help. In [1]: from docker_vcs_lib.docker_vcs import main --------------------------------------------------------------------------- : In [2]: from docker_vcs_lib.docker_builder_vcs import DockerBuilderVCS ...: In [3]: dbv = DockerBuilderVCS() --------------------------------------------------------------------------- FileNotFoundError Traceback (most recent call last) /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw) 789 # Make the request on the HTTPConnection object --> 790 response = self._make_request( 791 conn, /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length) 495 try: --> 496 conn.request( 497 method, /usr/local/lib/python3.9/site-packages/urllib3/connection.py in request(self, method, url, body, headers, chunked, preload_content, decode_content, enforce_content_length) 394 self.putheader(header, value) --> 395 self.endheaders() 396 /usr/lib/python3.9/http/client.py in endheaders(self, message_body, encode_chunked) 1249 raise CannotSendHeader() -> 1250 self._send_output(message_body, encode_chunked=encode_chunked) 1251 /usr/lib/python3.9/http/client.py in _send_output(self, message_body, encode_chunked) 1009 del self._buffer[:] -> 1010 self.send(msg) 1011 /usr/lib/python3.9/http/client.py in send(self, data) 949 if self.auto_open: --> 950 self.connect() 951 else: /usr/local/lib/python3.9/site-packages/docker/transport/unixconn.py in connect(self) 26 sock.settimeout(self.timeout) ---> 27 sock.connect(self.unix_socket) 28 self.sock = sock FileNotFoundError: [Errno 2] No such file or directory During handling of the above exception, another exception occurred: ProtocolError Traceback (most recent call last) /usr/local/lib/python3.9/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 485 try: --> 486 resp = conn.urlopen( 487 method=request.method, /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw) 843 --> 844 retries = retries.increment( 845 method, url, error=new_e, _pool=self, _stacktrace=sys.exc_info()[2] /usr/local/lib/python3.9/site-packages/urllib3/util/retry.py in increment(self, method, url, response, error, _pool, _stacktrace) 469 if read is False or method is None or not self._is_method_retryable(method): --> 470 raise reraise(type(error), error, _stacktrace) 471 elif read is not None: /usr/local/lib/python3.9/site-packages/urllib3/util/util.py in reraise(tp, value, tb) 37 if value.__traceback__ is not tb: ---> 38 raise value.with_traceback(tb) 39 raise value /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, preload_content, decode_content, **response_kw) 789 # Make the request on the HTTPConnection object --> 790 response = self._make_request( 791 conn, /usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py in _make_request(self, conn, method, url, body, headers, retries, timeout, chunked, response_conn, preload_content, decode_content, enforce_content_length) 495 try: --> 496 conn.request( 497 method, /usr/local/lib/python3.9/site-packages/urllib3/connection.py in request(self, method, url, body, headers, chunked, preload_content, decode_content, enforce_content_length) 394 self.putheader(header, value) --> 395 self.endheaders() 396 /usr/lib/python3.9/http/client.py in endheaders(self, message_body, encode_chunked) 1249 raise CannotSendHeader() -> 1250 self._send_output(message_body, encode_chunked=encode_chunked) 1251 /usr/lib/python3.9/http/client.py in _send_output(self, message_body, encode_chunked) 1009 del self._buffer[:] -> 1010 self.send(msg) 1011 /usr/lib/python3.9/http/client.py in send(self, data) 949 if self.auto_open: --> 950 self.connect() 951 else: /usr/local/lib/python3.9/site-packages/docker/transport/unixconn.py in connect(self) 26 sock.settimeout(self.timeout) ---> 27 sock.connect(self.unix_socket) 28 self.sock = sock ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) During handling of the above exception, another exception occurred: ConnectionError Traceback (most recent call last) /usr/local/lib/python3.9/site-packages/docker/api/client.py in _retrieve_server_version(self) 213 try: --> 214 return self.version(api_version=False)["ApiVersion"] 215 except KeyError: /usr/local/lib/python3.9/site-packages/docker/api/daemon.py in version(self, api_version) 180 url = self._url("/version", versioned_api=api_version) --> 181 return self._result(self._get(url), json=True) /usr/local/lib/python3.9/site-packages/docker/utils/decorators.py in inner(self, *args, **kwargs) 45 kwargs['headers'].update(self._general_configs['HttpHeaders']) ---> 46 return f(self, *args, **kwargs) 47 return inner /usr/local/lib/python3.9/site-packages/docker/api/client.py in _get(self, url, **kwargs) 236 def _get(self, url, **kwargs): --> 237 return self.get(url, **self._set_request_timeout(kwargs)) 238 /usr/local/lib/python3.9/site-packages/requests/sessions.py in get(self, url, **kwargs) 601 kwargs.setdefault("allow_redirects", True) --> 602 return self.request("GET", url, **kwargs) 603 /usr/local/lib/python3.9/site-packages/requests/sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json) 588 send_kwargs.update(settings) --> 589 resp = self.send(prep, **send_kwargs) 590 /usr/local/lib/python3.9/site-packages/requests/sessions.py in send(self, request, **kwargs) 702 # Send the request --> 703 r = adapter.send(request, **kwargs) 704 /usr/local/lib/python3.9/site-packages/requests/adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 500 except (ProtocolError, OSError) as err: --> 501 raise ConnectionError(err, request=request) 502 ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) During handling of the above exception, another exception occurred: DockerException Traceback (most recent call last) in ----> 1 dbv = DockerBuilderVCS() /usr/local/lib/python3.9/site-packages/docker_vcs_lib/docker_builder_vcs.py in __init__(self) 42 def __init__(self): 43 try: ---> 44 self._docker_client = docker.from_env() 45 except (docker.errors.APIError, docker.errors.TLSParameterError) as e: 46 logging.error(str(e)) /usr/local/lib/python3.9/site-packages/docker/client.py in from_env(cls, **kwargs) 94 version = kwargs.pop('version', None) 95 use_ssh_client = kwargs.pop('use_ssh_client', False) ---> 96 return cls( 97 timeout=timeout, 98 max_pool_size=max_pool_size, /usr/local/lib/python3.9/site-packages/docker/client.py in __init__(self, *args, **kwargs) 43 """ 44 def __init__(self, *args, **kwargs): ---> 45 self.api = APIClient(*args, **kwargs) 46 47 @classmethod /usr/local/lib/python3.9/site-packages/docker/api/client.py in __init__(self, base_url, version, timeout, tls, user_agent, num_pools, credstore_env, use_ssh_client, max_pool_size) 195 str 196 ) and version.lower() == 'auto'): --> 197 self._version = self._retrieve_server_version() 198 else: 199 self._version = version /usr/local/lib/python3.9/site-packages/docker/api/client.py in _retrieve_server_version(self) 219 ) 220 except Exception as e: --> 221 raise DockerException( 222 f'Error while fetching server API version: {e}' 223 ) DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) ```

Ignoring this error for now.

That happened inside of ipython3 so maybe missing some initializing process.


That happened inside of ipython3 so maybe missing some initializing process.

Unlikely, it's probably due to the executable being executed inside of a Docker container (which is NOT an intended usecase).

Indeed, on a host this prints. Yay! ``` $ docker_vcs --help usage: docker_vcs [-h] [--debug] [--docker_base_img DOCKER_BASE_IMG] [--dockerfile DOCKERFILE] [--entrypoint_exec ENTRYPOINT_EXEC] [--log_file] [--network_mode NETWORK_MODE] [--docker_out_img DOCKER_OUT_IMG] [--push_cloud] [--rm_intermediate] [--tmp_context_path TMP_CONTEXT_PATH] [--workspace_in_container WORKSPACE_IN_CONTAINER] [--workspace_on_host WORKSPACE_ON_HOST] [--path_repos_file PATH_REPOS_FILE | --volume VOLUME | --volume_build VOLUME_BUILD] 'docker build' command with 3 additional features. 1) clone arbitrary set of repos utilizing "vcstool", 2) automatically resolve dependency of the software (using "rosdep install", then 3) build and install (only catkin_tools is supported as of 2021/02). The software to be cloned and built have to be Catkin/Colcon packages. options: -h, --help show this help message and exit --debug Disabled by default. --docker_base_img DOCKER_BASE_IMG Image Dockerfile begins with. --dockerfile DOCKERFILE Dockerfile path to be used to build the Docker image with. This can be remote. Default is './Dockerfile'. --entrypoint_exec ENTRYPOINT_EXEC Docker's entrypoint that will be passed to Dockerfile. --log_file If defined, std{out, err} will be saved in a file. If not passed output will be streamed. --network_mode NETWORK_MODE Same options are available for networking mode for the 'docker run' command --docker_out_img DOCKER_OUT_IMG Entire path of the Docker image ot be built. --push_cloud If defined, not pushing the resulted Docker image to the cloud. --rm_intermediate If False, the intermediate Docker images are not removed. --tmp_context_path TMP_CONTEXT_PATH Absolute path for the temporary context path docker_vcs creates (TBD we need a specific name for that). This option can save exec time, and is primarily helpful in docker_vcs' subsequent runs after the 1st run where you don't want to keep generating the temp folder. Double-quote the value from bash console. --workspace_in_container WORKSPACE_IN_CONTAINER Workspace where the software obtained from vcs will be copied into. Also by default install space will be under this dir. --workspace_on_host WORKSPACE_ON_HOST Current dir, as Docker's context shouldn't change in order for Dockerfile to be accessible. --path_repos_file PATH_REPOS_FILE Path to .repos file to clone and build in side the container/image. --volume VOLUME Not implemented yet. Bind volume mount. Unlike '--volume_build' option, this doesn't do anything but mounting. Anything you want to happen can be defined in your 'Dockerfile'. For now this cannot be defined multiple times, as opposed to 'docker run' where multiple '-v's can be passed to.Therefore the value passed to this needs to be the ***top directory*** of all source folders to be built, e.g. 'src'. --volume_build VOLUME_BUILD The path to be bound as volume mount. Sources in this path will be targeted to build into Docker container. For now this cannot be defined multiple times, as opposed to 'docker run' where multiple '-v's can be passed to.Therefore the value passed to this needs to be the ***top directory*** of all source folders to be built, e.g. 'src'. There may be usecases to use both 'volume_build' and 'path_repos', which is not yet covered as the need is unclear. ```
130s commented 1 year ago

Wait, docker_vcs is not what I wrote, it might be auto-generated.

Log ``` # pip3 install -v -i https://test.pypi.org/simple docker_vcs==0.1.11 Using pip 23.2.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9) Looking in indexes: https://test.pypi.org/simple ERROR: Could not find a version that satisfies the requirement docker_vcs==0.1.11 (from versions: 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.1.10) ERROR: No matching distribution found for docker_vcs==0.1.11 # pip3 install -v -i https://test.pypi.org/simple docker_vcs Using pip 23.2.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9) Looking in indexes: https://test.pypi.org/simple Collecting docker_vcs Obtaining dependency information for docker_vcs from https://test-files.pythonhosted.org/packages/ed/86/0153d89814a6b7139c80d02b17edbb8a8cf1f07ada0e7afee1198a7bcc74/docker_vcs-0.1.11-py3-none-any.whl.metadata Downloading https://test-files.pythonhosted.org/packages/ed/86/0153d89814a6b7139c80d02b17edbb8a8cf1f07ada0e7afee1198a7bcc74/docker_vcs-0.1.11-py3-none-any.whl.metadata (4.6 kB) Requirement already satisfied: docker in /usr/local/lib/python3.9/site-packages (from docker_vcs) (6.1.3) Requirement already satisfied: sh in /usr/local/lib/python3.9/site-packages (from docker_vcs) (2.0.6) Requirement already satisfied: vcstool in /usr/local/lib/python3.9/site-packages (from docker_vcs) (0.3.0) Requirement already satisfied: packaging>=14.0 in /usr/local/lib/python3.9/site-packages (from docker->docker_vcs) (23.1) Requirement already satisfied: requests>=2.26.0 in /usr/local/lib/python3.9/site-packages (from docker->docker_vcs) (2.31.0) Requirement already satisfied: urllib3>=1.26.0 in /usr/local/lib/python3.9/site-packages (from docker->docker_vcs) (2.0.4) Requirement already satisfied: websocket-client>=0.32.0 in /usr/local/lib/python3.9/site-packages (from docker->docker_vcs) (1.6.3) Requirement already satisfied: PyYAML in /usr/local/lib/python3.9/site-packages (from vcstool->docker_vcs) (6.0.1) Requirement already satisfied: setuptools in /usr/local/lib/python3.9/site-packages (from vcstool->docker_vcs) (68.2.2) Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker->docker_vcs) (3.2.0) Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker->docker_vcs) (3.4) Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.9/site-packages (from requests>=2.26.0->docker->docker_vcs) (2023.7.22) Downloading https://test-files.pythonhosted.org/packages/ed/86/0153d89814a6b7139c80d02b17edbb8a8cf1f07ada0e7afee1198a7bcc74/docker_vcs-0.1.11-py3-none-any.whl (18 kB) Installing collected packages: docker_vcs changing mode of /usr/local/bin/docker_vcs to 755 Successfully installed docker_vcs-0.1.11 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 # docker_vcs --help Traceback (most recent call last): File "/usr/local/bin/docker_vcs", line 5, in from docker_vcs_lib.docker_vcs import main ImportError: cannot import name 'main' from 'docker_vcs_lib.docker_vcs' (/usr/local/lib/python3.9/site-packages/docker_vcs_lib/docker_vcs.py) # more /usr/local/bin/docker_vcs #!/usr/local/bin/python # -*- coding: utf-8 -*- import re import sys from docker_vcs_lib.docker_vcs import main if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) sys.exit(main()) ```

Managed to resolve by https://stackoverflow.com/questions/27784271/how-can-i-use-setuptools-to-generate-a-console-scripts-entry-point-which-calls