Skip to content

Commit

Permalink
Environments now have a default name, '.venv'.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Oct 23, 2023
1 parent 4057ccb commit b7ad660
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions jaraco/envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ class VirtualEnv:
>>> root = getfixture('tmp_path')
>>> mp.setenv('SERVICES_ROOT', str(root))
Subclass VirtualEnv and supply name and req:
Subclass VirtualEnv and supply req:
>>> class MyVirtualEnv(VirtualEnv):
... name = '.venv'
... req = 'example'
>>> env = MyVirtualEnv().create()
"""

root = Path(os.environ.get('SERVICES_ROOT', '.cache/services'))
clean_opts = ["--no-setuptools", "--no-pip", "--no-wheel"]
name = '.venv'

@property
def dir(self):
Expand Down
1 change: 1 addition & 0 deletions newsfragments/+d462d589.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Environments now have a default name, '.venv'.
4 changes: 1 addition & 3 deletions tests/test_envs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
@path_types
def test_root_pathlib(tmp_path, VEnvCls, PathCls):
venv = VEnvCls()
vars(venv).update(
root=PathCls(tmp_path), name=".venv", create_opts=VEnvCls.clean_opts
)
vars(venv).update(root=PathCls(tmp_path), create_opts=VEnvCls.clean_opts)
venv.ensure_env()

possible_bin_dirs = (tmp_path / ".venv/bin", tmp_path / ".venv/Scripts")
Expand Down

0 comments on commit b7ad660

Please sign in to comment.