mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-11 17:56:18 +03:00
"Fix" INSTALL and HISTORY
This commit is contained in:
parent
b3ba59db99
commit
8f79274ca4
8
Docs/HISTORY.txt
Normal file
8
Docs/HISTORY.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
|
||||
Changelog
|
||||
=========
|
||||
|
||||
1.0 - Fri Jul 30 23:12:21 EDT 2010
|
||||
----------------------------------
|
||||
|
||||
- Forked PIL [aclark]
|
179
Docs/INSTALL.txt
Normal file
179
Docs/INSTALL.txt
Normal file
|
@ -0,0 +1,179 @@
|
|||
|
||||
Build instructions (all platforms)
|
||||
==================================
|
||||
|
||||
For a list of changes in this release, see the CHANGES document.
|
||||
|
||||
If you're in a hurry, try this::
|
||||
|
||||
$ tar xvfz Imaging-1.1.7.tar.gz
|
||||
$ cd Imaging-1.1.7
|
||||
$ python setup.py install
|
||||
|
||||
If you prefer to know what you're doing, read on.
|
||||
|
||||
|
||||
Prerequisites
|
||||
-------------
|
||||
|
||||
If you need any of the features described below, make sure you
|
||||
have the necessary libraries before building PIL::
|
||||
|
||||
feature library
|
||||
-----------------------------------------------------------------
|
||||
JPEG support libjpeg (6a or 6b)
|
||||
|
||||
http://www.ijg.org
|
||||
http://www.ijg.org/files/jpegsrc.v6b.tar.gz
|
||||
ftp://ftp.uu.net/graphics/jpeg/
|
||||
|
||||
PNG support zlib (1.2.3 or later is recommended)
|
||||
|
||||
http://www.gzip.org/zlib/
|
||||
|
||||
OpenType/TrueType freetype2 (2.3.9 or later is recommended)
|
||||
support
|
||||
http://www.freetype.org
|
||||
http://freetype.sourceforge.net
|
||||
|
||||
CMS support littleCMS (1.1.5 or later is recommended)
|
||||
support
|
||||
http://www.littlecms.com/
|
||||
|
||||
If you have a recent Linux version, the libraries provided with the
|
||||
operating system usually work just fine. If some library is
|
||||
missing, installing a prebuilt version (jpeg-devel, zlib-devel,
|
||||
etc) is usually easier than building from source. For example, for
|
||||
Ubuntu 9.10 (karmic), you can install the following libraries::
|
||||
|
||||
sudo apt-get install libjpeg62-dev
|
||||
sudo apt-get install zlib1g-dev
|
||||
sudo apt-get install libfreetype6-dev
|
||||
sudo apt-get install liblcms1-dev
|
||||
|
||||
If you're using Mac OS X, you can use the 'fink' tool to install
|
||||
missing libraries (also see the Mac OS X section below).
|
||||
|
||||
Similar tools are available for many other platforms.
|
||||
|
||||
|
||||
To build under Python 1.5.2, you need to install the stand-alone
|
||||
version of the distutils library:
|
||||
|
||||
http://www.python.org/sigs/distutils-sig/download.html
|
||||
|
||||
You can fetch distutils 1.0.2 from the Python source repository:
|
||||
|
||||
svn export http://svn.python.org/projects/python/tags/Distutils-1_0_2/Lib/distutils/
|
||||
|
||||
For newer releases, the distutils library is included in the
|
||||
Python standard library.
|
||||
|
||||
NOTE: Version 1.1.7 is not fully compatible with 1.5.2. Some
|
||||
more recent additions to the library may not work, but the core
|
||||
functionality is available.
|
||||
|
||||
|
||||
If you didn't build Python from sources, make sure you have
|
||||
Python's build support files on your machine. If you've down-
|
||||
loaded a prebuilt package (e.g. a Linux RPM), you probably
|
||||
need additional developer packages. Look for packages named
|
||||
"python-dev", "python-devel", or similar. For example, for
|
||||
Ubuntu 9.10 (karmic), use the following command:
|
||||
|
||||
sudo apt-get install python-dev
|
||||
|
||||
|
||||
When you have everything you need, unpack the PIL distribution
|
||||
(the file Imaging-1.1.7.tar.gz) in a suitable work directory:
|
||||
|
||||
$ cd MyExtensions # example
|
||||
$ gunzip Imaging-1.1.7.tar.gz
|
||||
$ tar xvf Imaging-1.1.7.tar
|
||||
|
||||
|
||||
Build the library. We recommend that you do an in-place build,
|
||||
and run the self test before installing.
|
||||
|
||||
$ cd Imaging-1.1.7
|
||||
$ python setup.py build_ext -i
|
||||
$ python selftest.py
|
||||
|
||||
During the build process, the setup.py will display a summary
|
||||
report that lists what external components it found. The self-
|
||||
test will display a similar report, with what external components
|
||||
the tests found in the actual build files::
|
||||
|
||||
----------------------------------------------------------------
|
||||
PIL 1.1.7 SETUP SUMMARY
|
||||
----------------------------------------------------------------
|
||||
*** TKINTER support not available (Tcl/Tk 8.5 libraries needed)
|
||||
--- JPEG support available
|
||||
--- ZLIB (PNG/ZIP) support available
|
||||
--- FREETYPE support available
|
||||
----------------------------------------------------------------
|
||||
|
||||
Make sure that the optional components you need are included.
|
||||
|
||||
If the build script won't find a given component, you can edit the
|
||||
setup.py file and set the appropriate ROOT variable. For details,
|
||||
see instructions in the file.
|
||||
|
||||
If the build script finds the component, but the tests cannot
|
||||
identify it, try rebuilding *all* modules:
|
||||
|
||||
$ python setup.py clean
|
||||
$ python setup.py build_ext -i
|
||||
|
||||
|
||||
If the setup.py and selftest.py commands finish without any
|
||||
errors, you're ready to install the library:
|
||||
|
||||
$ python setup.py install
|
||||
|
||||
(depending on how Python has been installed on your machine,
|
||||
you might have to log in as a superuser to run the 'install'
|
||||
command, or use the 'sudo' command to run 'install'.)
|
||||
|
||||
|
||||
--------------------------------------------------------------------
|
||||
Additional notes for Mac OS X
|
||||
--------------------------------------------------------------------
|
||||
|
||||
On Mac OS X you will usually install additional software such as
|
||||
libjpeg or freetype with the "fink" tool, and then it ends up in
|
||||
"/sw". If you have installed the libraries elsewhere, you may have
|
||||
to tweak the "setup.py" file before building.
|
||||
|
||||
|
||||
--------------------------------------------------------------------
|
||||
Additional notes for Windows
|
||||
--------------------------------------------------------------------
|
||||
|
||||
On Windows, you need to tweak the ROOT settings in the "setup.py"
|
||||
file, to make it find the external libraries. See comments in the
|
||||
file for details.
|
||||
|
||||
Make sure to build PIL and the external libraries with the same
|
||||
runtime linking options as was used for the Python interpreter
|
||||
(usually /MD, under Visual Studio).
|
||||
|
||||
|
||||
Note that most Python distributions for Windows include libraries
|
||||
compiled for Microsoft Visual Studio. You can get the free Express
|
||||
edition of Visual Studio from:
|
||||
|
||||
http://www.microsoft.com/Express/
|
||||
|
||||
To build extensions using other tool chains, see the "Using
|
||||
non-Microsoft compilers on Windows" section in the distutils handbook:
|
||||
|
||||
http://www.python.org/doc/current/inst/non-ms-compilers.html
|
||||
|
||||
For additional information on how to build extensions using the
|
||||
popular MinGW compiler, see:
|
||||
|
||||
http://mingw.org (compiler)
|
||||
http://sebsauvage.net/python/mingw.html (build instructions)
|
||||
http://sourceforge.net/projects/gnuwin32 (prebuilt libraries)
|
||||
|
477
index.html
Normal file
477
index.html
Normal file
|
@ -0,0 +1,477 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
|
||||
<title></title>
|
||||
<style type="text/css">
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 5951 2009-05-18 18:03:10Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
|
||||
See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
*/
|
||||
|
||||
/* used to remove borders from tables and images */
|
||||
.borderless, table.borderless td, table.borderless th {
|
||||
border: 0 }
|
||||
|
||||
table.borderless td, table.borderless th {
|
||||
/* Override padding for "table.docutils td" with "! important".
|
||||
The right padding separates the table cells. */
|
||||
padding: 0 0.5em 0 0 ! important }
|
||||
|
||||
.first {
|
||||
/* Override more specific margin styles with "! important". */
|
||||
margin-top: 0 ! important }
|
||||
|
||||
.last, .with-subtitle {
|
||||
margin-bottom: 0 ! important }
|
||||
|
||||
.hidden {
|
||||
display: none }
|
||||
|
||||
a.toc-backref {
|
||||
text-decoration: none ;
|
||||
color: black }
|
||||
|
||||
blockquote.epigraph {
|
||||
margin: 2em 5em ; }
|
||||
|
||||
dl.docutils dd {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
/* Uncomment (and remove this text!) to get bold-faced definition list terms
|
||||
dl.docutils dt {
|
||||
font-weight: bold }
|
||||
*/
|
||||
|
||||
div.abstract {
|
||||
margin: 2em 5em }
|
||||
|
||||
div.abstract p.topic-title {
|
||||
font-weight: bold ;
|
||||
text-align: center }
|
||||
|
||||
div.admonition, div.attention, div.caution, div.danger, div.error,
|
||||
div.hint, div.important, div.note, div.tip, div.warning {
|
||||
margin: 2em ;
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.admonition p.admonition-title, div.hint p.admonition-title,
|
||||
div.important p.admonition-title, div.note p.admonition-title,
|
||||
div.tip p.admonition-title {
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
div.attention p.admonition-title, div.caution p.admonition-title,
|
||||
div.danger p.admonition-title, div.error p.admonition-title,
|
||||
div.warning p.admonition-title {
|
||||
color: red ;
|
||||
font-weight: bold ;
|
||||
font-family: sans-serif }
|
||||
|
||||
/* Uncomment (and remove this text!) to get reduced vertical space in
|
||||
compound paragraphs.
|
||||
div.compound .compound-first, div.compound .compound-middle {
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
div.compound .compound-last, div.compound .compound-middle {
|
||||
margin-top: 0.5em }
|
||||
*/
|
||||
|
||||
div.dedication {
|
||||
margin: 2em 5em ;
|
||||
text-align: center ;
|
||||
font-style: italic }
|
||||
|
||||
div.dedication p.topic-title {
|
||||
font-weight: bold ;
|
||||
font-style: normal }
|
||||
|
||||
div.figure {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
div.footer, div.header {
|
||||
clear: both;
|
||||
font-size: smaller }
|
||||
|
||||
div.line-block {
|
||||
display: block ;
|
||||
margin-top: 1em ;
|
||||
margin-bottom: 1em }
|
||||
|
||||
div.line-block div.line-block {
|
||||
margin-top: 0 ;
|
||||
margin-bottom: 0 ;
|
||||
margin-left: 1.5em }
|
||||
|
||||
div.sidebar {
|
||||
margin: 0 0 0.5em 1em ;
|
||||
border: medium outset ;
|
||||
padding: 1em ;
|
||||
background-color: #ffffee ;
|
||||
width: 40% ;
|
||||
float: right ;
|
||||
clear: right }
|
||||
|
||||
div.sidebar p.rubric {
|
||||
font-family: sans-serif ;
|
||||
font-size: medium }
|
||||
|
||||
div.system-messages {
|
||||
margin: 5em }
|
||||
|
||||
div.system-messages h1 {
|
||||
color: red }
|
||||
|
||||
div.system-message {
|
||||
border: medium outset ;
|
||||
padding: 1em }
|
||||
|
||||
div.system-message p.system-message-title {
|
||||
color: red ;
|
||||
font-weight: bold }
|
||||
|
||||
div.topic {
|
||||
margin: 2em }
|
||||
|
||||
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
|
||||
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
|
||||
margin-top: 0.4em }
|
||||
|
||||
h1.title {
|
||||
text-align: center }
|
||||
|
||||
h2.subtitle {
|
||||
text-align: center }
|
||||
|
||||
hr.docutils {
|
||||
width: 75% }
|
||||
|
||||
img.align-left, .figure.align-left{
|
||||
clear: left ;
|
||||
float: left ;
|
||||
margin-right: 1em }
|
||||
|
||||
img.align-right, .figure.align-right {
|
||||
clear: right ;
|
||||
float: right ;
|
||||
margin-left: 1em }
|
||||
|
||||
.align-left {
|
||||
text-align: left }
|
||||
|
||||
.align-center {
|
||||
clear: both ;
|
||||
text-align: center }
|
||||
|
||||
.align-right {
|
||||
text-align: right }
|
||||
|
||||
/* reset inner alignment in figures */
|
||||
div.align-right {
|
||||
text-align: left }
|
||||
|
||||
/* div.align-center * { */
|
||||
/* text-align: left } */
|
||||
|
||||
ol.simple, ul.simple {
|
||||
margin-bottom: 1em }
|
||||
|
||||
ol.arabic {
|
||||
list-style: decimal }
|
||||
|
||||
ol.loweralpha {
|
||||
list-style: lower-alpha }
|
||||
|
||||
ol.upperalpha {
|
||||
list-style: upper-alpha }
|
||||
|
||||
ol.lowerroman {
|
||||
list-style: lower-roman }
|
||||
|
||||
ol.upperroman {
|
||||
list-style: upper-roman }
|
||||
|
||||
p.attribution {
|
||||
text-align: right ;
|
||||
margin-left: 50% }
|
||||
|
||||
p.caption {
|
||||
font-style: italic }
|
||||
|
||||
p.credits {
|
||||
font-style: italic ;
|
||||
font-size: smaller }
|
||||
|
||||
p.label {
|
||||
white-space: nowrap }
|
||||
|
||||
p.rubric {
|
||||
font-weight: bold ;
|
||||
font-size: larger ;
|
||||
color: maroon ;
|
||||
text-align: center }
|
||||
|
||||
p.sidebar-title {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold ;
|
||||
font-size: larger }
|
||||
|
||||
p.sidebar-subtitle {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
p.topic-title {
|
||||
font-weight: bold }
|
||||
|
||||
pre.address {
|
||||
margin-bottom: 0 ;
|
||||
margin-top: 0 ;
|
||||
font: inherit }
|
||||
|
||||
pre.literal-block, pre.doctest-block {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
span.classifier {
|
||||
font-family: sans-serif ;
|
||||
font-style: oblique }
|
||||
|
||||
span.classifier-delimiter {
|
||||
font-family: sans-serif ;
|
||||
font-weight: bold }
|
||||
|
||||
span.interpreted {
|
||||
font-family: sans-serif }
|
||||
|
||||
span.option {
|
||||
white-space: nowrap }
|
||||
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
/* font-size relative to parent (h1..h6 element) */
|
||||
font-size: 80% }
|
||||
|
||||
table.citation {
|
||||
border-left: solid 1px gray;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docinfo {
|
||||
margin: 2em 4em }
|
||||
|
||||
table.docutils {
|
||||
margin-top: 0.5em ;
|
||||
margin-bottom: 0.5em }
|
||||
|
||||
table.footnote {
|
||||
border-left: solid 1px black;
|
||||
margin-left: 1px }
|
||||
|
||||
table.docutils td, table.docutils th,
|
||||
table.docinfo td, table.docinfo th {
|
||||
padding-left: 0.5em ;
|
||||
padding-right: 0.5em ;
|
||||
vertical-align: top }
|
||||
|
||||
table.docutils th.field-name, table.docinfo th.docinfo-name {
|
||||
font-weight: bold ;
|
||||
text-align: left ;
|
||||
white-space: nowrap ;
|
||||
padding-left: 0 }
|
||||
|
||||
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
|
||||
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
|
||||
font-size: 100% }
|
||||
|
||||
ul.auto-toc {
|
||||
list-style-type: none }
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="document">
|
||||
|
||||
|
||||
<div class="section" id="pillow">
|
||||
<h1>Pillow</h1>
|
||||
<p>Pillow is a "friendly" fork of the Python Imaging Library. The goal is to see
|
||||
if any improvement can be made to the packaging situation(*) by opening up
|
||||
development to the "public".</p>
|
||||
<p>Please email: <a class="reference external" href="mailto:aclark@aclark.net">aclark@aclark.net</a> if you'd like to help, or complain.</p>
|
||||
<p>(*)PIL has a bad reputation for not "playing nice" with other packages. It's
|
||||
kind of a long story, and you either know it by now or you don't. A better
|
||||
explanation may come later.</p>
|
||||
<p>For PIL's README, check out PIL.txt</p>
|
||||
</div>
|
||||
<div class="section" id="build-instructions-all-platforms">
|
||||
<h1>Build instructions (all platforms)</h1>
|
||||
<p>For a list of changes in this release, see the CHANGES document.</p>
|
||||
<p>If you're in a hurry, try this:</p>
|
||||
<pre class="literal-block">
|
||||
$ tar xvfz Imaging-1.1.7.tar.gz
|
||||
$ cd Imaging-1.1.7
|
||||
$ python setup.py install
|
||||
</pre>
|
||||
<p>If you prefer to know what you're doing, read on.</p>
|
||||
<div class="section" id="prerequisites">
|
||||
<h2>Prerequisites</h2>
|
||||
<p>If you need any of the features described below, make sure you
|
||||
have the necessary libraries before building PIL:</p>
|
||||
<pre class="literal-block">
|
||||
feature library
|
||||
-----------------------------------------------------------------
|
||||
JPEG support libjpeg (6a or 6b)
|
||||
|
||||
http://www.ijg.org
|
||||
http://www.ijg.org/files/jpegsrc.v6b.tar.gz
|
||||
ftp://ftp.uu.net/graphics/jpeg/
|
||||
|
||||
PNG support zlib (1.2.3 or later is recommended)
|
||||
|
||||
http://www.gzip.org/zlib/
|
||||
|
||||
OpenType/TrueType freetype2 (2.3.9 or later is recommended)
|
||||
support
|
||||
http://www.freetype.org
|
||||
http://freetype.sourceforge.net
|
||||
|
||||
CMS support littleCMS (1.1.5 or later is recommended)
|
||||
support
|
||||
http://www.littlecms.com/
|
||||
</pre>
|
||||
<p>If you have a recent Linux version, the libraries provided with the
|
||||
operating system usually work just fine. If some library is
|
||||
missing, installing a prebuilt version (jpeg-devel, zlib-devel,
|
||||
etc) is usually easier than building from source. For example, for
|
||||
Ubuntu 9.10 (karmic), you can install the following libraries:</p>
|
||||
<pre class="literal-block">
|
||||
sudo apt-get install libjpeg62-dev
|
||||
sudo apt-get install zlib1g-dev
|
||||
sudo apt-get install libfreetype6-dev
|
||||
sudo apt-get install liblcms1-dev
|
||||
</pre>
|
||||
<p>If you're using Mac OS X, you can use the 'fink' tool to install
|
||||
missing libraries (also see the Mac OS X section below).</p>
|
||||
<p>Similar tools are available for many other platforms.</p>
|
||||
<p>To build under Python 1.5.2, you need to install the stand-alone
|
||||
version of the distutils library:</p>
|
||||
<blockquote>
|
||||
<a class="reference external" href="http://www.python.org/sigs/distutils-sig/download.html">http://www.python.org/sigs/distutils-sig/download.html</a></blockquote>
|
||||
<p>You can fetch distutils 1.0.2 from the Python source repository:</p>
|
||||
<blockquote>
|
||||
svn export <a class="reference external" href="http://svn.python.org/projects/python/tags/Distutils-1_0_2/Lib/distutils/">http://svn.python.org/projects/python/tags/Distutils-1_0_2/Lib/distutils/</a></blockquote>
|
||||
<p>For newer releases, the distutils library is included in the
|
||||
Python standard library.</p>
|
||||
<p>NOTE: Version 1.1.7 is not fully compatible with 1.5.2. Some
|
||||
more recent additions to the library may not work, but the core
|
||||
functionality is available.</p>
|
||||
<p>If you didn't build Python from sources, make sure you have
|
||||
Python's build support files on your machine. If you've down-
|
||||
loaded a prebuilt package (e.g. a Linux RPM), you probably
|
||||
need additional developer packages. Look for packages named
|
||||
"python-dev", "python-devel", or similar. For example, for
|
||||
Ubuntu 9.10 (karmic), use the following command:</p>
|
||||
<blockquote>
|
||||
sudo apt-get install python-dev</blockquote>
|
||||
<p>When you have everything you need, unpack the PIL distribution
|
||||
(the file Imaging-1.1.7.tar.gz) in a suitable work directory:</p>
|
||||
<blockquote>
|
||||
$ cd MyExtensions # example
|
||||
$ gunzip Imaging-1.1.7.tar.gz
|
||||
$ tar xvf Imaging-1.1.7.tar</blockquote>
|
||||
<p>Build the library. We recommend that you do an in-place build,
|
||||
and run the self test before installing.</p>
|
||||
<blockquote>
|
||||
$ cd Imaging-1.1.7
|
||||
$ python setup.py build_ext -i
|
||||
$ python selftest.py</blockquote>
|
||||
<p>During the build process, the setup.py will display a summary
|
||||
report that lists what external components it found. The self-
|
||||
test will display a similar report, with what external components
|
||||
the tests found in the actual build files:</p>
|
||||
<pre class="literal-block">
|
||||
----------------------------------------------------------------
|
||||
PIL 1.1.7 SETUP SUMMARY
|
||||
----------------------------------------------------------------
|
||||
*** TKINTER support not available (Tcl/Tk 8.5 libraries needed)
|
||||
--- JPEG support available
|
||||
--- ZLIB (PNG/ZIP) support available
|
||||
--- FREETYPE support available
|
||||
----------------------------------------------------------------
|
||||
</pre>
|
||||
<p>Make sure that the optional components you need are included.</p>
|
||||
<p>If the build script won't find a given component, you can edit the
|
||||
setup.py file and set the appropriate ROOT variable. For details,
|
||||
see instructions in the file.</p>
|
||||
<p>If the build script finds the component, but the tests cannot
|
||||
identify it, try rebuilding <em>all</em> modules:</p>
|
||||
<blockquote>
|
||||
$ python setup.py clean
|
||||
$ python setup.py build_ext -i</blockquote>
|
||||
<p>If the setup.py and selftest.py commands finish without any
|
||||
errors, you're ready to install the library:</p>
|
||||
<blockquote>
|
||||
$ python setup.py install</blockquote>
|
||||
<p>(depending on how Python has been installed on your machine,
|
||||
you might have to log in as a superuser to run the 'install'
|
||||
command, or use the 'sudo' command to run 'install'.)</p>
|
||||
<div class="section" id="additional-notes-for-mac-os-x">
|
||||
<h3>Additional notes for Mac OS X</h3>
|
||||
<p>On Mac OS X you will usually install additional software such as
|
||||
libjpeg or freetype with the "fink" tool, and then it ends up in
|
||||
"/sw". If you have installed the libraries elsewhere, you may have
|
||||
to tweak the "setup.py" file before building.</p>
|
||||
</div>
|
||||
<div class="section" id="additional-notes-for-windows">
|
||||
<h3>Additional notes for Windows</h3>
|
||||
<p>On Windows, you need to tweak the ROOT settings in the "setup.py"
|
||||
file, to make it find the external libraries. See comments in the
|
||||
file for details.</p>
|
||||
<p>Make sure to build PIL and the external libraries with the same
|
||||
runtime linking options as was used for the Python interpreter
|
||||
(usually /MD, under Visual Studio).</p>
|
||||
<p>Note that most Python distributions for Windows include libraries
|
||||
compiled for Microsoft Visual Studio. You can get the free Express
|
||||
edition of Visual Studio from:</p>
|
||||
<blockquote>
|
||||
<a class="reference external" href="http://www.microsoft.com/Express/">http://www.microsoft.com/Express/</a></blockquote>
|
||||
<p>To build extensions using other tool chains, see the "Using
|
||||
non-Microsoft compilers on Windows" section in the distutils handbook:</p>
|
||||
<blockquote>
|
||||
<a class="reference external" href="http://www.python.org/doc/current/inst/non-ms-compilers.html">http://www.python.org/doc/current/inst/non-ms-compilers.html</a></blockquote>
|
||||
<p>For additional information on how to build extensions using the
|
||||
popular MinGW compiler, see:</p>
|
||||
<blockquote>
|
||||
<a class="reference external" href="http://mingw.org">http://mingw.org</a> (compiler)
|
||||
<a class="reference external" href="http://sebsauvage.net/python/mingw.html">http://sebsauvage.net/python/mingw.html</a> (build instructions)
|
||||
<a class="reference external" href="http://sourceforge.net/projects/gnuwin32">http://sourceforge.net/projects/gnuwin32</a> (prebuilt libraries)</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="changelog">
|
||||
<h1>Changelog</h1>
|
||||
<div class="section" id="fri-jul-30-23-12-21-edt-2010">
|
||||
<h2>1.0 - Fri Jul 30 23:12:21 EDT 2010</h2>
|
||||
<ul class="simple">
|
||||
<li>Forked PIL [aclark]</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
5
setup.py
5
setup.py
|
@ -466,7 +466,10 @@ if __name__ == "__main__":
|
|||
ext_modules = [Extension("_imaging", ["_imaging.c"])], # dummy
|
||||
extra_path = "PIL",
|
||||
license="Python (MIT style)",
|
||||
long_description=DESCRIPTION,
|
||||
# long_description=DESCRIPTION,
|
||||
long_description=open("README.txt").read() + "\n" +
|
||||
open(os.path.join("docs", "INSTALL.txt")).read() +
|
||||
open(os.path.join("docs", "HISTORY.txt")).read(),
|
||||
name=NAME,
|
||||
packages=find_packages(),
|
||||
setup_requires=["setuptools_hg"],
|
||||
|
|
BIN
setuptools_hg-0.2-py2.4.egg/EGG-INFO/._PKG-INFO
Normal file
BIN
setuptools_hg-0.2-py2.4.egg/EGG-INFO/._PKG-INFO
Normal file
Binary file not shown.
63
setuptools_hg-0.2-py2.4.egg/EGG-INFO/PKG-INFO
Normal file
63
setuptools_hg-0.2-py2.4.egg/EGG-INFO/PKG-INFO
Normal file
|
@ -0,0 +1,63 @@
|
|||
Metadata-Version: 1.0
|
||||
Name: setuptools-hg
|
||||
Version: 0.2
|
||||
Summary: Setuptools plugin for finding files under Mercurial version control.
|
||||
Home-page: http://bitbucket.org/jezdez/setuptools_hg/
|
||||
Author: Jannis Leidel
|
||||
Author-email: jannis@leidel.info
|
||||
License: GPL2
|
||||
Download-URL: http://bitbucket.org/jezdez/setuptools_hg/downloads/
|
||||
Description:
|
||||
setuptools_hg
|
||||
=============
|
||||
|
||||
setuptools_hg is a plugin for setuptools that enables setuptools to find files
|
||||
under the Mercurial version control system.
|
||||
|
||||
It uses the Mercurial Python library by default and falls back to use the
|
||||
command line programm ``hg(1)``. That's especially useful inside virtualenvs
|
||||
that don't have access to the system wide installed Mercurial lib (e.g. when
|
||||
created with ``--no-site-packages``).
|
||||
|
||||
.. note:: The setuptools feature
|
||||
|
||||
You can read about the hooks used by setuptool_hg in the
|
||||
`setuptools documentation`_. It basically returns a list of files that are
|
||||
under Mercurial version control when running the ``setup`` function, e.g. if
|
||||
you create a source and binary distribution. It's a simple yet effective way
|
||||
of not having to define package data (non-Python files) manually in MANIFEST
|
||||
templates (``MANIFEST.in``).
|
||||
|
||||
.. _setuptools documentation: http://peak.telecommunity.com/DevCenter/setuptools#adding-support-for-other-revision-control-systems
|
||||
|
||||
Usage
|
||||
*****
|
||||
|
||||
Here's an example of a setup.py that uses setuptools_hg::
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
setup(
|
||||
name="HelloWorld",
|
||||
version="0.1",
|
||||
packages=find_packages(),
|
||||
setup_requires=["setuptools_hg"],
|
||||
)
|
||||
|
||||
If you run this setup.py setuptools will automatically download setuptools_hg
|
||||
to the directory where the setup.py is located at (and won't install it
|
||||
anywhere else) to get all package data files from the Mercurial repository.
|
||||
|
||||
Options
|
||||
*******
|
||||
|
||||
Set the ``HG_SETUPTOOLS_FORCE_CMD`` environment variable before running
|
||||
setup.py if you want to enforce the use of the hg command.
|
||||
|
||||
Platform: UNKNOWN
|
||||
Classifier: Development Status :: 4 - Beta
|
||||
Classifier: Programming Language :: Python
|
||||
Classifier: Intended Audience :: Developers
|
||||
Classifier: Operating System :: OS Independent
|
||||
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
|
||||
Classifier: Topic :: Software Development :: Version Control
|
||||
Classifier: Framework :: Setuptools Plugin
|
11
setuptools_hg-0.2-py2.4.egg/EGG-INFO/SOURCES.txt
Normal file
11
setuptools_hg-0.2-py2.4.egg/EGG-INFO/SOURCES.txt
Normal file
|
@ -0,0 +1,11 @@
|
|||
.hgtags
|
||||
LICENSE
|
||||
setup.cfg
|
||||
setup.py
|
||||
setuptools_hg.py
|
||||
setuptools_hg.egg-info/._PKG-INFO
|
||||
setuptools_hg.egg-info/PKG-INFO
|
||||
setuptools_hg.egg-info/SOURCES.txt
|
||||
setuptools_hg.egg-info/dependency_links.txt
|
||||
setuptools_hg.egg-info/entry_points.txt
|
||||
setuptools_hg.egg-info/top_level.txt
|
|
@ -0,0 +1 @@
|
|||
|
3
setuptools_hg-0.2-py2.4.egg/EGG-INFO/entry_points.txt
Normal file
3
setuptools_hg-0.2-py2.4.egg/EGG-INFO/entry_points.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
[setuptools.file_finders]
|
||||
hg = setuptools_hg:hg_file_finder
|
||||
|
1
setuptools_hg-0.2-py2.4.egg/EGG-INFO/top_level.txt
Normal file
1
setuptools_hg-0.2-py2.4.egg/EGG-INFO/top_level.txt
Normal file
|
@ -0,0 +1 @@
|
|||
setuptools_hg
|
1
setuptools_hg-0.2-py2.4.egg/EGG-INFO/zip-safe
Normal file
1
setuptools_hg-0.2-py2.4.egg/EGG-INFO/zip-safe
Normal file
|
@ -0,0 +1 @@
|
|||
|
98
setuptools_hg-0.2-py2.4.egg/setuptools_hg.py
Executable file
98
setuptools_hg-0.2-py2.4.egg/setuptools_hg.py
Executable file
|
@ -0,0 +1,98 @@
|
|||
"""
|
||||
A plugin for setuptools to find files under the Mercurial version control
|
||||
system which uses the Python library by default and falls back to use the
|
||||
command line programm hg(1).
|
||||
"""
|
||||
__version__ = '0.2'
|
||||
__author__ = 'Jannis Leidel'
|
||||
__all__ = ['hg_file_finder']
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
try:
|
||||
from mercurial.__version__ import version
|
||||
from mercurial import hg, ui, cmdutil
|
||||
except:
|
||||
hg = None
|
||||
|
||||
try:
|
||||
from mercurial.repo import RepoError
|
||||
except:
|
||||
try:
|
||||
from mercurial.error import RepoError
|
||||
except:
|
||||
pass
|
||||
|
||||
OLD_VERSIONS = ('1.0', '1.0.1', '1.0.2')
|
||||
|
||||
if os.environ.get('HG_SETUPTOOLS_FORCE_CMD', False):
|
||||
hg = None
|
||||
|
||||
def find_files_with_cmd(dirname="."):
|
||||
"""
|
||||
Use the hg command to recursively find versioned files in dirname.
|
||||
"""
|
||||
try:
|
||||
proc = subprocess.Popen(['hg', 'locate'],
|
||||
stdin=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE,
|
||||
cwd=dirname)
|
||||
stdout, stderr = proc.communicate()
|
||||
except:
|
||||
# Let's behave a bit nicer and return nothing if something fails.
|
||||
return []
|
||||
return stdout.splitlines()
|
||||
|
||||
def find_files_with_lib(dirname):
|
||||
"""
|
||||
Use the Mercurial library to recursively find versioned files in dirname.
|
||||
"""
|
||||
try:
|
||||
try:
|
||||
repo = hg.repository(ui.ui(), path=dirname)
|
||||
except RepoError:
|
||||
return
|
||||
# tuple of (modified, added, removed, deleted, unknown, ignored, clean)
|
||||
modified, added, removed, deleted, unknown = repo.status()[:5]
|
||||
|
||||
# exclude all files that hg knows about, but haven't been added,
|
||||
# or have been deleted, removed, or have an unknown status
|
||||
excluded = removed + deleted + unknown
|
||||
|
||||
if version in OLD_VERSIONS:
|
||||
from mercurial import util
|
||||
node = None
|
||||
for src, abs, rel, exact in cmdutil.walk(repo, [], {}, node=node,
|
||||
badmatch=util.always, default='relglob'):
|
||||
if src == 'b':
|
||||
continue
|
||||
if not node and abs not in repo.dirstate:
|
||||
continue
|
||||
if abs in excluded:
|
||||
continue
|
||||
yield abs
|
||||
else:
|
||||
rev = None
|
||||
match = cmdutil.match(repo, [], {}, default='relglob')
|
||||
match.bad = lambda x, y: False
|
||||
for abs in repo[rev].walk(match):
|
||||
if not rev and abs not in repo.dirstate:
|
||||
continue
|
||||
if abs in excluded:
|
||||
continue
|
||||
yield abs
|
||||
except:
|
||||
# try calling hg command as a last resort
|
||||
find_files_with_cmd(dirname)
|
||||
|
||||
def hg_file_finder(dirname="."):
|
||||
"""
|
||||
Find the files in ``dirname`` under Mercurial version control.
|
||||
"""
|
||||
if not dirname:
|
||||
dirname = "."
|
||||
if hg is None:
|
||||
return find_files_with_cmd(dirname)
|
||||
return find_files_with_lib(dirname)
|
BIN
setuptools_hg-0.2-py2.4.egg/setuptools_hg.pyc
Normal file
BIN
setuptools_hg-0.2-py2.4.egg/setuptools_hg.pyc
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user