Then I make a new venv: python3 -mvenv ~/venv
and then i do ~/venv/bin/pip download ~/osml10n/
and i get a bunch of packages downloaded in my cwd.
After that, I do ~/venv/bin/pip install --no-index --find-links . ~/osml10n/, but i get an error:
ERROR: Could not find a version that satisfies the requirement setuptools (from versions: none)
ERROR: No matching distribution found for setuptools
I could already figure out, that it helps to ~/venv/bin/pip download setuptools
Then a setuptools package gets downloaded and the previous pip install finds it.
Then the same goes for wheel, after separate pip download wheel it’s fine.
Now I’m wondering (TBH, I don’t have much experience with the details of pip or python packaging), why doesn’t pip download all packages, the following pip install needs? Is there a mistake somewhere, maybe in osml10n, maybe theses packages aren’t direct dependencies, but recursive from some other package and pip download requires a flag for recursive dependencies?
I am not sure, I have not tested this exactly in a while, but for example instead of ~/venv/bin/pip download ~/osml10n/ you could try ~/venv/bin/pip wheel ~/osml10n/. If I am not mistaken this should get you wheels (it will build them if necessary) and then you can move all those wheels to the host machine that does not have internet access.
You may also be interested in GitHub - python-wheel-build/fromager: Build your own wheels as a tool for building that wheelhouse. It does include build dependencies. It’s a new project, so the documentation is still a bit sparse. Let me know if you try it and run into issues.