Skip to content

Commit 057e807

Browse files
committed
Renamed virtual environment from "env" to ".venv"
1 parent e6214e8 commit 057e807

File tree

22 files changed

+131
-74
lines changed

22 files changed

+131
-74
lines changed

PyWebApi.PyPI/PyWebApi.PyPI.pyproj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<SuppressCollectPythonCloudServiceFiles>true</SuppressCollectPythonCloudServiceFiles>
1919
<Name>PyWebApi.PyPI</Name>
2020
<RootNamespace>PyWebApi.PyPI</RootNamespace>
21-
<InterpreterId>MSBuild|env|$(MSBuildProjectFullPath)</InterpreterId>
21+
<InterpreterId>MSBuild|.venv|$(MSBuildProjectFullPath)</InterpreterId>
2222
</PropertyGroup>
2323
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
2424
<DebugSymbols>true</DebugSymbols>
@@ -34,17 +34,6 @@
3434
<Content Include="setup.cfg" />
3535
<Content Include="upload.bat" />
3636
</ItemGroup>
37-
<ItemGroup>
38-
<Interpreter Include="env\">
39-
<Id>env</Id>
40-
<Version>3.6</Version>
41-
<Description>env (Python 3.6 (64-bit))</Description>
42-
<InterpreterPath>Scripts\python.exe</InterpreterPath>
43-
<WindowsInterpreterPath>Scripts\pythonw.exe</WindowsInterpreterPath>
44-
<PathEnvironmentVariable>PYTHONPATH</PathEnvironmentVariable>
45-
<Architecture>X64</Architecture>
46-
</Interpreter>
47-
</ItemGroup>
4837
<ItemGroup>
4938
<Folder Include="pywebapi\" />
5039
</ItemGroup>
@@ -57,6 +46,17 @@
5746
<Compile Include="setup.py" />
5847
<Compile Include="test_app.py" />
5948
</ItemGroup>
49+
<ItemGroup>
50+
<Interpreter Include=".venv\">
51+
<Id>.venv</Id>
52+
<Version>3.6</Version>
53+
<Description>.venv (Python 3.6 (64-bit))</Description>
54+
<InterpreterPath>Scripts\python.exe</InterpreterPath>
55+
<WindowsInterpreterPath>Scripts\pythonw.exe</WindowsInterpreterPath>
56+
<PathEnvironmentVariable>PYTHONPATH</PathEnvironmentVariable>
57+
<Architecture>X64</Architecture>
58+
</Interpreter>
59+
</ItemGroup>
6060
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\Python Tools\Microsoft.PythonTools.Web.targets" />
6161
<!-- Specify pre- and post-build commands in the BeforeBuild and
6262
AfterBuild targets below. -->

PyWebApi.PyPI/pack.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@Echo off
22
CD /d "%~dp0"
3-
SET "THIS_SCRIPT_PATH=%~dp0env\Scripts\"
3+
SET "THIS_SCRIPT_PATH=%~dp0.venv\Scripts\"
44
SET EXISTS_IN_PATH=0
55
FOR /F "delims=" %%i IN ('PATH ^| Find /C /I "%THIS_SCRIPT_PATH%"') DO SET EXISTS_IN_PATH=%%i 2>NUL
66
If %EXISTS_IN_PATH%==0 SET "PATH=%THIS_SCRIPT_PATH%;%PATH%"

PyWebApi.PyPI/upload.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@Echo off
22
CD /d "%~dp0"
3-
SET "THIS_SCRIPT_PATH=%~dp0env\Scripts\"
3+
SET "THIS_SCRIPT_PATH=%~dp0.venv\Scripts\"
44
SET EXISTS_IN_PATH=0
55
FOR /F "delims=" %%i IN ('PATH ^| Find /C /I "%THIS_SCRIPT_PATH%"') DO SET EXISTS_IN_PATH=%%i 2>NUL
66
If %EXISTS_IN_PATH%==0 SET "PATH=%THIS_SCRIPT_PATH%;%PATH%"

PyWebApi.sln

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Sample", "Sample", "{F7AC17
99
ProjectSection(SolutionItems) = preProject
1010
Sample\deploy-samples.bat = Sample\deploy-samples.bat
1111
Sample\publish-samples.bat = Sample\publish-samples.bat
12+
Sample\setup-venv.bat = Sample\setup-venv.bat
1213
EndProjectSection
1314
EndProject
1415
Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "PyWebApi.IIS", "Sample\PyWebApi.IIS\PyWebApi.IIS.pyproj", "{5869E351-5ABC-4EBF-BD49-892170C0FCFD}"

README.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Sample PyWebApi Server (for IIS)
8585
<system.webServer>
8686
<handlers>
8787
<add name="PythonHandler" path="*" verb="*" modules="FastCgiModule"
88-
scriptProcessor="D:\wwwroot\PyWebApi\env\Scripts\python.exe|D:\wwwroot\PyWebApi\env\Lib\site-packages\wfastcgi.py"
88+
scriptProcessor="D:\wwwroot\PyWebApi\.venv\Scripts\python.exe|D:\wwwroot\PyWebApi\.venv\Lib\site-packages\wfastcgi.py"
8989
resourceType="Unspecified" requireAccess="Script"/>
9090
</handlers>
9191
</system.webServer>
@@ -205,11 +205,11 @@ Deploy User Modules/Scripts:
205205

206206
::
207207

208-
env\Lib\site-packages
209-
env\Lib\site-packages\win32
210-
env\Lib\site-packages\win32\lib
208+
.venv\Lib\site-packages
209+
.venv\Lib\site-packages\win32
210+
.venv\Lib\site-packages\win32\lib
211211
212-
#copy pywintypes??.dll from env\Lib\site-packages\pywin32_system32 to env\Lib\site-packages\win32\lib
212+
#copy pywintypes??.dll from .venv\Lib\site-packages\pywin32_system32 to .venv\Lib\site-packages\win32\lib
213213

214214

215215
#. **Grant Permissions**

Sample/PyWebApi.IIS/PyWebApi.IIS.pyproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<SuppressCollectPythonCloudServiceFiles>true</SuppressCollectPythonCloudServiceFiles>
1919
<Name>PyWebApi.IIS</Name>
2020
<RootNamespace>PyWebApi.IIS</RootNamespace>
21-
<InterpreterId>MSBuild|env|$(MSBuildProjectFullPath)</InterpreterId>
21+
<InterpreterId>MSBuild|.venv|$(MSBuildProjectFullPath)</InterpreterId>
2222
<Environment>USER_SCRIPT_ROOT=.\user-script-root\
2323
SERVER_DEBUG=VisualStudio
2424
</Environment>
@@ -46,10 +46,10 @@ SERVER_DEBUG=VisualStudio
4646
<Content Include="wfastcgi-enable.bat" />
4747
</ItemGroup>
4848
<ItemGroup>
49-
<Interpreter Include="env\">
50-
<Id>env</Id>
49+
<Interpreter Include=".venv\">
50+
<Id>.venv</Id>
5151
<Version>3.6</Version>
52-
<Description>env (Python 3.6 (64-bit))</Description>
52+
<Description>.venv (Python 3.6 (64-bit))</Description>
5353
<InterpreterPath>Scripts\python.exe</InterpreterPath>
5454
<WindowsInterpreterPath>Scripts\pythonw.exe</WindowsInterpreterPath>
5555
<PathEnvironmentVariable>PYTHONPATH</PathEnvironmentVariable>

Sample/PyWebApi.IIS/web.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ See https://aka.ms/PythonOnAppService for more information.
2020
<system.webServer>
2121
<handlers>
2222
<add name="PythonHandler" path="*" verb="*" modules="FastCgiModule"
23-
scriptProcessor="D:\Projects\GitHub\PyWebApi\Sample\PyWebApi.IIS\env\Scripts\python.exe|D:\Projects\GitHub\PyWebApi\Sample\PyWebApi.IIS\env\Lib\site-packages\wfastcgi.py"
23+
scriptProcessor="D:\Projects\GitHub\PyWebApi\Sample\PyWebApi.IIS\.venv\Scripts\python.exe|D:\Projects\GitHub\PyWebApi\Sample\PyWebApi.IIS\.venv\Lib\site-packages\wfastcgi.py"
2424
resourceType="Unspecified" requireAccess="Script"/>
2525
</handlers>
2626
</system.webServer>
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
@Echo off
22
CD /d "%~dp0"
3-
env\Scripts\wfastcgi-enable
3+
4+
IF "%~1"=="" (
5+
SET VENV=.venv
6+
) ELSE (
7+
SET "VENV=%~1"
8+
)
9+
10+
%VENV%\Scripts\wfastcgi-enable

Sample/UserApps/MdxEtl/MdxEtl.pyproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<OutputPath>.</OutputPath>
1313
<Name>MdxEtl</Name>
1414
<RootNamespace>MdxEtl</RootNamespace>
15-
<InterpreterId>MSBuild|env|$(MSBuildProjectFullPath)</InterpreterId>
15+
<InterpreterId>MSBuild|.venv|$(MSBuildProjectFullPath)</InterpreterId>
1616
</PropertyGroup>
1717
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
1818
<DebugSymbols>true</DebugSymbols>
@@ -32,10 +32,10 @@
3232
<Content Include="requirements.txt" />
3333
</ItemGroup>
3434
<ItemGroup>
35-
<Interpreter Include="env\">
36-
<Id>env</Id>
35+
<Interpreter Include=".venv\">
36+
<Id>.venv</Id>
3737
<Version>3.6</Version>
38-
<Description>env (Python 3.6 (64-bit))</Description>
38+
<Description>.venv (Python 3.6 (64-bit))</Description>
3939
<InterpreterPath>Scripts\python.exe</InterpreterPath>
4040
<WindowsInterpreterPath>Scripts\pythonw.exe</WindowsInterpreterPath>
4141
<PathEnvironmentVariable>PYTHONPATH</PathEnvironmentVariable>
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
env\Lib\site-packages
2-
env\Lib\site-packages\win32
3-
env\Lib\site-packages\win32\lib
1+
.venv\Lib\site-packages
2+
.venv\Lib\site-packages\win32
3+
.venv\Lib\site-packages\win32\lib
44

5-
#copy pywintypes??.dll from env\Lib\site-packages\pywin32_system32 to env\Lib\site-packages\win32\lib
5+
#copy pywintypes??.dll from .venv\Lib\site-packages\pywin32_system32 to .venv\Lib\site-packages\win32\lib

0 commit comments

Comments
 (0)