Skip to content
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

Empty arguments not supported w/ python --mvirtualenv /dest/ #7322

Closed
benjaoming opened this issue Jul 27, 2020 · 2 comments · Fixed by #7330
Closed

Empty arguments not supported w/ python --mvirtualenv /dest/ #7322

benjaoming opened this issue Jul 27, 2020 · 2 comments · Fixed by #7330

Comments

@benjaoming
Copy link
Contributor

benjaoming commented Jul 27, 2020

Details

Firstly, I have a patch that's tested and works and will submit a PR soon 😇

In relation a set of specific deployment needs, I found it necessary to try out Read The Docs on a newer platform (Python 3.7), and I think it causes the following breakage:

image

  • Read the Docs project URL: n/a
  • Build URL (if applicable): n/a
  • Read the Docs username (if applicable): n/a

The issue is also reported 14 days ago here:

https://stackoverflow.com/questions/62050977/readthedocs-virtualenv-error-unrecognized-arguments-during-update-repos

It was also reported in #6915 but closed for the wrong reasons (it's not due to an environment variable or similar)

Reproducing

If there is no option --system-site-packages passed to python3 -mvirtualenv, it will be invoked like this, resulting in an error:

(venv) readthedocs@6d51bf78d765:~/git$ python3.7 -mvirtualenv "" /usr/share/readthedocs/git/user_builds/myproject/envs/latest
usage: virtualenv [--version] [--with-traceback] [-v | -q] [--app-data APP_DATA] [--clear-app-data] [--discovery {builtin}] [-p py] [--creator {builtin,cpython3-posix,venv}] [--seeder {app-data,pip}] [--no-seed]
                  [--activators comma_sep_list] [--clear] [--system-site-packages] [--symlinks | --copies] [--no-download | --download] [--extra-search-dir d [d ...]] [--pip version] [--setuptools version] [--wheel version] [--no-pip]
                  [--no-setuptools] [--no-wheel] [--symlink-app-data] [--prompt prompt] [-h]
                  dest
virtualenv: error: unrecognized arguments: /usr/share/readthedocs/git/user_builds/myproject/envs/latest

Expected Result

I'm pretty sure this is not reproducible for the core team's Docker containers. But you'll probably see it once the Python environments are updated from Python 3.6 to Python 3.7.

Actual Result

My environment fails executing because of an empty-string command line argument.

@stsewd
Copy link
Member

stsewd commented Jul 27, 2020

I think this is the same as #6893 (comment)

@benjaoming
Copy link
Contributor Author

Good point, thanks @stsewd, I'll try to address this separately from pinning virtualenv to the same version on both environments, as #6893 (comment) mentions (but sounds like a really good idea, too!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants