Open the “ hgwebdir_wsgi.py“, find and edit the parameters below:.It is located in “ C:\hg-source\contrib\win32“. Copy the “ hgwebdir_wsgi.py” file from the Mercurial source code downloaded to “ C:\inetpub\hg“.This has to point the application pool “ Mercurial“. We assume that the directory is “ C:\inetpub\hg” and its URL is “ hg.“. Create a website on IIS for the web repository.Set “ Enable 32-Bit Applications” to “ True“, only if you have installed x86 version of Python.NET Framework Version” to “ No Managed Code“ Create an application pool called “ Mercurial” with the following configurations:.Seting up IIS for the Mercurial Web RepositoryĪs IIS doesn’t recognise Python and Hg natively, we need to setup IIS manually. Run the following command to compile the sourceĥ.We assume that the unzipped directory is “ C:\isapi-wsgi-source“. The precompiled version will not work for our setup. Download the latest version of the source code.Copy “ c:\python2x\scripts\hg.bat” to “ c:\python2x“įor better performance, we need to install ISAPI-WSGI module to build a DLL file.In order to execute to “ hg” command at anywhere, try the followings:.Mercurial will have been installed at “ C:\Python2x\Lib\site-packages\mercurial“ Run the following command to install Mercurial.build_ext -i build_mo -forceĮven if you meet a warning like “ warning: hgbuildmo: could not find msgfmt executable, no translations will be built“, just ignore it. Run the following command to build Mercurial.Open a command prompte as an administrator and move to the unzipped directory.We assume that the unzipped directory is “ C:\hg-source“. Download the source code and unzip it.So, we need to build the source with Python that we have installed into our system. Building and Installing Mercurial from the Source Code.Īs the latest version of Mercurial installer (2.2.2 at the moment of writing) is built with Python 2.6.6, the installer will not be running on our server. If you get an error “ Access is denied“, close the command prompt and open it again as an administrator.ģ.Runas /user:Admin pywin32-xxx.win32-py2.7.exe Open a command prompt as an administrator and type.Create a new account named “ Admin” and assign it to the “ Administrators” group.Go to “ System Tools” > “ Local Users and Groups” > “ Users“.Click “ Start Menu” > Right click on “ Computer” > Click “ Manage“.This is because of your administrator permission. In case of error you might face at the end of the installation process.Make sure that the installation must be conducted by an administrator permission. The filename looks like “pywin32-xxx.win32-py2.7.exe” Go to the latest build and download an appropriate one corresponding to your Python version and platform.Go to the Python for Windows Extensions download page.If the path has been correctly set, your server might need to reboot.Īgain, your choice of platform has to be consistant if you have installed Python of x86 version, this also has to be x86 version if you have installed Python of 圆4 version, this also has to be 圆4 version. If you can’t run the “ python” command on the command prompt, check the step 4.3 again.Open a command prompt and type “ python” at any directory and you will get into the python console.Make sure that the path value is delimited by semi-colons. ![]() Append “ C:\Python2x ” to the “ Path” value.Click “ Environment Variables.” and find the “ Path” variable under “ System variables” section.Open “ Control Panel” > “ System and Security” > “ System” > “ Advanced System Settings“.Add the Python path to the system environment path.During the installation process, let the installer set the default installation directory, which will be C:\Python2x. Choose the platform carefully, if to be x86 or 圆4. Download the latest 2.7.x version of Python.Installing Python.Īs Mercurial doesn’t support Python 3.x, the latest version of Python we can use is 2.7.x. In other words, if you choose Python of x86 version, all other applications have to be x86 version if you choose Python of 圆4 version, all other applications have to be 圆4 version otherwise, this will not be working for your system. Please note that if your choice of Python has to be consistent. The latest version of Mercurial: 2.2.2 (at the moment of writing).The latest version of PyWin32: Build 217 (at the moment of writing). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |