mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-30 23:47:27 +03:00 
			
		
		
		
	another pass on the docs
This commit is contained in:
		
							parent
							
								
									3a484bab09
								
							
						
					
					
						commit
						71ebbe492d
					
				|  | @ -7,7 +7,8 @@ Building Pillow on Windows | ||||||
| This page will describe a build setup to build Pillow against the | This page will describe a build setup to build Pillow against the | ||||||
| supported python versions in 32 and 64 bit modes, using freely | supported python versions in 32 and 64 bit modes, using freely | ||||||
| availble Microsoft compilers.  This has been developed and tested | availble Microsoft compilers.  This has been developed and tested | ||||||
| against a bare Windows Server 2012 64bit RTM version on Amazon EC2. | against 64bit Windows 7 Professional and a bare Windows Server 2012 | ||||||
|  | 64bit RTM version on Amazon EC2. | ||||||
| 
 | 
 | ||||||
| Prerequsites | Prerequsites | ||||||
| ------------ | ------------ | ||||||
|  | @ -15,34 +16,35 @@ Prerequsites | ||||||
| Extra Build Helpers | Extra Build Helpers | ||||||
| ^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^ | ||||||
| 
 | 
 | ||||||
| * Google Chrome (optional - for sanity) |  | ||||||
| * GPG (for checking signatures)  (UNDONE -- python signature checking) |  | ||||||
| * Powershell (available by default on Windows Server) | * Powershell (available by default on Windows Server) | ||||||
| * Github client (provides git+bash shell) | * Github client (provides git+bash shell) | ||||||
| 
 | 
 | ||||||
|  | Optional: | ||||||
|  | * GPG (for checking signatures)  (UNDONE -- python signature checking) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| Pythons | Pythons | ||||||
| ^^^^^^^ | ^^^^^^^ | ||||||
| 
 | 
 | ||||||
| Download and install Python 2.6, 2.7, 3.2, 3.3, and 3.4, both 32 and | The build routines expect Python to be installed at C:\PythonXX for 32 | ||||||
| 64 bit versions. There is a python script that will download the | bit versions or C:\PythonXXx64 for the 64 bit versions. | ||||||
| installers in `winbuild/get_pythons.py`. It requires python to run, so |  | ||||||
| download and install one of them first.  |  | ||||||
| 
 | 
 | ||||||
| :: | Download Python 3.4.0, install it, and add it to the path. This is the | ||||||
|  | Python that we will use to bootstrap the build process. (The download | ||||||
|  | routines are using 3.2+ features, and installing 3.4 gives us pip and | ||||||
|  | virtualenv as well, reducing the number of packages that we need to | ||||||
|  | install.)  | ||||||
| 
 | 
 | ||||||
|    for version in ['2.6.5', '2.7.6', '3.2.5', '3.3.5', '3.4.0']: | Download the rest of the pythons by opening a command window, changing | ||||||
|         for platform in ['', '.amd64']: | to the `winbuild` directory, and running `python | ||||||
|             for extension in ['','.asc']: | get_pythons.py`.  | ||||||
|                 fetch('https://www.python.org/ftp/python/%s/python-%s%s.msi%s' %( |  | ||||||
|                     version, version, platform, extension)) |  | ||||||
| 
 | 
 | ||||||
| UNDONE -- gpg verify the signatures (note that we can download from https) | UNDONE -- gpg verify the signatures (note that we can download from | ||||||
|  | https) | ||||||
| 
 | 
 | ||||||
| We also need virtualenv and setuptools in at least one of the pythons | Run each installer and set the proper path to the installation. Don't | ||||||
| to build testing versions.  | set any of them as the default python, or add them to the path. | ||||||
| 
 | 
 | ||||||
| Python 3.4 comes with pip. That makes it an ideal python to install |  | ||||||
| first.  |  | ||||||
| 
 | 
 | ||||||
| Compilers | Compilers | ||||||
| ^^^^^^^^^ | ^^^^^^^^^ | ||||||
|  | @ -63,26 +65,30 @@ compilers and other tools. UNDONE -- check exact wording. | ||||||
| Dependencies | Dependencies | ||||||
| ------------ | ------------ | ||||||
| 
 | 
 | ||||||
| Run `winbuild/build_dep.cmd` in a command window. There are times when | The script 'build_dep.py' downloads and builds the dependencies.  Open | ||||||
| the output clears the terminal, so it's best to run it in the | a command window, change directory into `winbuild` and run `python | ||||||
| Powershell IDE, which has a more powerful terminal than the standard | build_dep.py`.  | ||||||
| Powershell window.  |  | ||||||
| 
 | 
 | ||||||
| This will download libjpeg, libtiff, libz, and freetype. It will then | This will download libjpeg, libtiff, libz, and freetype. It will then | ||||||
| compile 32 and 64 bit versions of the libraries, with both versions of | compile 32 and 64 bit versions of the libraries, with both versions of | ||||||
| the compilers.  | the compilers.  | ||||||
| 
 | 
 | ||||||
| UNDONE -- lcms fails.  | UNDONE -- lcms fails.  | ||||||
| UNDONE -- webp not included yet.  | UNDONE -- webp, jpeg2k not recognized | ||||||
| 
 | 
 | ||||||
| Testing Builds | Building Pillow | ||||||
|  | --------------- | ||||||
|  | 
 | ||||||
|  | Once the dependencies are built, run `python build.py --clean` to | ||||||
|  | build and install Pillow in virtualenvs for each python | ||||||
|  | build. `build.py --dist` will build windows installers instead of | ||||||
|  | installing into virtualenvs.  | ||||||
|  |   | ||||||
|  | UNDONE -- suppressed output, what about failures. | ||||||
|  | 
 | ||||||
|  | Testing Pillow | ||||||
| -------------- | -------------- | ||||||
| 
 | 
 | ||||||
| Use the script UNDONE to build, install, selftest, and test Pillow in | Build and install Pillow, then run `python test.py` from the | ||||||
| virtualenvs for each Python that is installed.  | `winbuild` directory. | ||||||
| 
 | 
 | ||||||
| Installer Builds |  | ||||||
| ---------------- |  | ||||||
|   |  | ||||||
| Run `winbuild/build.cmd` in a powershell terminal to build Pillow |  | ||||||
| installers against each of the Pythons.  |  | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user