Issue description
--site-packages is not recognized without --two or --three option.
PR: #3352
Reason
site_packages argument in cli function always set to false because --site-packages flag was defined in the global state (
|
self.site_packages = False |
).
However, with --two or --three option, we can run into the block creates virtualenv (
|
if (state.python or state.three is not None) or site_packages: |
). Since
state.site_packages is used in this block, pipenv recognizes
--site-packages flag well and creates virtualenv created with
--system-site-packages.
Expected result
pipenv --site-packgages install creates virtualenv with --system-site-packages
Actual result
pipenv --site-packgages install doesn't create virtualenv that uses system packages.
However, pipenv --two --site-packages install or pipenv --three --site-packages works as expected.
UPDATE: However pipenv --two --site-packages install or pipenv --three --site-packages works as expected for the first installation, pipenv recreates virtualenv without --system-site-packages right after the first install. I think this is a different issue. (pipenv --two install also creates twice.)
Alternatively, pipenv --two --site-packages works well.
Steps to replicate
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
$ pipenv --two --site-packages install (UPDATE: or pipenv --two --site-packages)
This outputs Making site-packages available….
$ pipenv --site-packages install
This doesn't print Making site-packages available….
Issue description
--site-packagesis not recognized without--twoor--threeoption.PR: #3352
Reason
site_packagesargument inclifunction always set to false because--site-packagesflag was defined in the global state (pipenv/pipenv/cli/options.py
Line 62 in 97657b2
However, with
--twoor--threeoption, we can run into the block creates virtualenv (pipenv/pipenv/cli/command.py
Line 201 in 97657b2
state.site_packagesis used in this block, pipenv recognizes--site-packagesflag well and creates virtualenv created with--system-site-packages.Expected result
pipenv --site-packgages installcreates virtualenv with--system-site-packagesActual result
pipenv --site-packgages installdoesn't create virtualenv that uses system packages.However,pipenv --two --site-packages installorpipenv --three --site-packagesworks as expected.UPDATE: However
pipenv --two --site-packages installorpipenv --three --site-packagesworks as expected for the first installation,pipenvrecreates virtualenv without--system-site-packagesright after the first install. I think this is a different issue. (pipenv --two installalso creates twice.)Alternatively,
pipenv --two --site-packagesworks well.Steps to replicate
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
$ pipenv --two --site-packages install(UPDATE: orpipenv --two --site-packages)This outputs
Making site-packages available….$ pipenv --site-packages installThis doesn't print
Making site-packages available….