easy install - the peak developers' center

Upload: yenbao1340

Post on 06-Apr-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    1/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    EI

    E I

    E I (easy_install) setuptools ,

    , , P .

    P ! I ,

    . (N: DO NOT ;

    . T - ;

    -- .)

    (A, ' setuptools

    EI, EI- EI , '

    .)

    Table of Conen

    U "E I"

    I "E I"

    T

    W N

    D I P

    U P

    C A V

    U P

    M S

    T & TM P V

    R D --allow-hosts

    I U- M

    P O' P A E

    C P I

    P-P S

    C B O

    E V S P

    D I C

    C IR M

    C F

    C-L O

    C I L

    A I

    M OS X "U" I

    C "V" P

    "T" PYTHONPATH- I

    P I "API"

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    2/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    B C

    R N/C H

    F P

    U "E I"

    I "E I"

    P PPI .

    Y P 2.3.5, 64- , P 2.4. A easy_install

    P .

    N PPI P'

    site-packages . I , C I

    L . (A, W, .exe

    .)

    N easy_install . I NTLM-

    P , APS

    , () .

    (A, _ ,

    --allow-hosts ; --- -

    .)

    T

    I EI/ , easy_install ImportError, site-packages,

    C I L . P

    . T -.

    S, easy_install, , ' ,

    EI -

    ' . A, C I L .

    W N

    O W, easy_install.exe , easy_install

    ' PATH. I easy_install ' ,

    PATH C:\\Python2X\\Scripts . O W,

    PATH - "M C", "P" "A" ,

    "E V" . PATH "S V" ,

    (., ., , ) . B

    ; PATH .

    N PATH P ,

    ' PATH. F

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    3/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    C-L O C F. Y ( --script-dir)

    ez_setup.py easy_install.exe .

    D I P

    F easy_install, URL .

    (P E).

    Eample 1. I , PPI , ,, :

    easy_install SQLObject

    Eample 2. I " ":

    easy_install -f http://pythonpaste.org/package_index.html SQLObject

    Eample 3. D URL, :

    easy_install http://example.com/path/to/MyPackage-1.2.3.tgz

    Eample 4. I - . :

    easy_install /my_downloads/OtherPackage-3.2.1-py2.3.egg

    Eample 5. U - PPI:

    easy_install --upgrade PyProtocols

    Eample 6. I ' (N

    0.59):

    easy_install .

    Eample 7. (N 0.61) F S URL ,

    /projects/sqlobject ( -),

    . (T , easy_install

    /projects/sqlobject. S E V S P .):

    easy_install --editable --build-directory /projects SQLObject

    E I URL, , PPI (.., distutils "" ),

    + . I , .

    W , E I

    ., ., .., ..2, .. A - .

    .win32.exe .

    B , P ' site-packages ,

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    4/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    -d --install-dir ,

    . (S C F, .)

    B , P '

    . H, ,

    ,

    . Y -s --script-dir .

    I easy-install.pth , P -- . I ,

    -m --multi-version .

    U P

    Y ' : ,

    , ..:

    easy_install "SomePackage==2.0"

    :

    easy_install "SomePackage>2.0"

    , PPI:

    easy_install --upgrade SomePackage

    , URL, :

    easy_install -f http://example.com/downloads ExamplePackage

    easy_install http://example.com/downloads/ExamplePackage-2.0-py2.4.egg

    easy_install my_downloads/ExamplePackage-2.0.tgz

    I ' -m --multi-version , require()

    . S,

    .

    I ' PYTHONPATH, "" ( -m),

    easy-install.pth , P - . S, , .

    I ' ( --exclude-scripts -x), '

    , require() ,

    - .

    easy_install ( '

    ), , U

    P, .

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    5/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    C A V

    I ' , - , :

    easy_install PackageName==1.2.3

    W 1.2.3 . I

    sys.path, PPI .

    I ' PackageName, :

    easy_install PackageName

    T . (N: find_links ,

    ,

    .)

    N ' ,

    --exclude-scripts -x .

    U P

    I , () '

    PN-. ( ).

    I ( ), :

    easy_install -mxN PackageName

    T P ' ' . A '

    , . , .

    M S

    W , , , EI

    , -x --exclude-scripts. I

    , .

    T, ,

    . H, , .

    EI' . I

    , , --multi-version -m

    , EI . T EI

    require() ,

    .

    F , rst2html . Y

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    6/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    :

    easy_install -m docutils==0.3.9

    rst2html.py r2h_039, :

    easy_install -m docutils==0.3.10

    T rst2html.py , 0.3.10 0.3.9. Y , . (N -m ,

    P ' - .)

    T & T

    M P V

    A 0.611, EI : easy_install easy_install-N.N,

    N.N P . T, EI P 2.3 2.4,

    easy_install-2.3 easy_install-2.4 P 2.3 2.4, .

    A, ' P 2.4 , P -m easy_install

    P ' easy_install .

    R D --a-h

    Y --allow-hosts (-H) EI

    . --allow-hosts=None . Y ,

    . S C-L O

    --allow-hosts .

    B , ,

    :

    [easy_install]allow_hosts = *.myintranet.example.com,*.python.org

    T python.org

    myintranet.example.com , .

    I U- M

    J , -f

    --find-links ' . F :

    easy_install -H None -f somedir SomePackage

    SP somedir

    . Y SP' .

    I ( ' -

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    7/28

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    8/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    A , URL , (

    .

    I , PPI . S

    --index-url C-L O, , P I "API".

    P-P S

    I - HTTP "B" , URL, :

    http://some_userid:[email protected]/some_path/

    Y URL URL. A HTML

    _ relative , ID

    .

    C B O

    EI C F,

    . F , W MGW ,

    :

    [build]compiler = mingw32

    . I , ,

    , EI. F , distutils.cfg

    distutils , all . S C

    F , .

    E V S P

    S ' , , , .,

    . I , --editable

    EI, EI S URL ,

    --build-directory . I

    , EI .

    N --editable EI ; , ,

    . T ,

    setup.py develop ( , ), easy_install

    projectdir ( projectdir EI .

    I --editable (-e ), must --build-directory (-b ). T

    . T

    , -. I , EI

    .

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    9/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    A, --editable, URL . Y must

    ( ) EI () . I

    EI URL , --find-links (-f ),

    , ..:

    easy_install -eb /projects \-fhttp://prdownloads.sourceforge.net/ctypes/ctypes-0.9.6.tar.gz?download \ctypes==0.9.6

    D I C

    (NOTE: A 0.611, ;

    EI . A 0.611,

    - , . I,

    sys.path easy-install.pth . S, 0.611

    , , .)

    EI "" ,

    sys.path. H, EI "",

    .

    A , EI ,

    , EI . (T setup.py install,

    distutils ,

    .)

    B , EI , "" ,

    ' . I

    . Y

    - EI,

    --delete-conflicting --ignore-conflicts-at-my-risk , C-L

    O, .

    O , ' "" EI,

    ' !

    C I

    EI , . Z P'

    ' --multi-version , P

    sys.path .

    A 0.59, EI ,

    . (P --zip-ok

    .)

    T ; :

    A __file__ __path__ (

    pkg_resources API )

    P inspect (..

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    10/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    inspect.getsource())

    T- python -m (P 2.4)

    I , EI

    , . Y -zip-ok ,

    EI . O, --always-unzip ,

    EI , .

    N, , EI , . I EI' ,

    EI ,

    .

    (N: I setuptools ,

    zip_safe setup(). I

    , EI ' . H,

    - , , ' .)

    R MC F

    (N 0.42)

    Y EI ,

    easy_install. EI setup.cfg ,

    /.pydistutils.cfg $HOME\\pydistutils.cfg ( U- OS W, ),

    distutils.cfg distutils . H' :

    [easy_install]

    # set the default location to install packagesinstall_dir = /home/me/lib/python

    # Notice that indentation can be used to continue an option# value; this is especially useful for the "--find-links"# option, which tells easy_install to use download links on# these pages before consulting PyPI:#find_links = http://sqlobject.org/

    http://peak.telecommunity.com/dist/

    I [easy_install], EI

    . F , ' install_dir [easy_install],

    have install_lib [install] , EI' .

    T, , , ., EI

    [easy_install] .

    F , P

    .

    C-L O

    --i-, -

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    11/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    I , . T

    EI' - ,

    . (C 0.59;

    .)

    --aa-i, -Z

    D' , . T

    , EI . EI' , , '

    , after '

    EI .

    (N: -z/-Z -

    ;

    , ' , - EI.)

    --i-ei, -

    "M-" . S easy_install easy-install.pth

    , ,

    . I - ,

    , pkg_resources.require() sys.path. T :

    from pkg_resources import requirerequire("SomePackage", "OtherPackage", "MyPackage")

    sys.path . (F

    , , pkg_resources API .)

    C 0.610: -PYTHONPATH, -

    "" . Y .

    --gade, -U (Ne in 0.5a4)

    B , EI / '

    . . H, --upgrade -U ,

    EI --find-links URL .

    I , EI (

    ).

    --ia-di=DIR, -d DIR

    S . I sys.path ,

    pkg_resources.require() () .

    (N 0.42) I ,

    . N, site-packages ,

    , prefix install_lib,

    , --prefix .

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    12/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    --ci-di=DIR, - DIR

    S . I ' ( ),

    have --install-dir ( ),

    , . O,

    ,

    .

    --ecde-ci, -

    D' . T , .

    --aa-c, -a (Ne in 0.5a4)

    C ,

    .. I EI, , .

    B , EI .

    , ' .

    N 0.610, "" "" ' . T EI

    , '

    . Y EI ,

    .

    --fid-i=URLS_OR_FILENAMES, -f URLS_OR_FILENAMES

    S " " . A

    URL EI' ,

    URL ( ' )

    . A EI (

    ' , --upgrade -U ), URL

    .

    E --find-links

    ; .

    I , P P I

    --upgrade -U .

    (N: HTML , file: URL, , , .)

    Y URL / , . N

    , URL ,

    . Y URL ; C F, .

    C 0.610: URL

    , 0.610 , ; URL

    ,

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    13/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    --update -U .

    --deee-cficig, -D (Remoed in 0.6a11)

    (A 0.611, ; !)

    I without EI,

    sys.path EI. EI

    , . I , , EI ,

    .

    --ige-cfic-a--i (Remoed in 0.6a11)

    (A 0.611, ; !)

    I ,

    ' . I ' ,

    , , PYTHONPATH sys.path .

    --ide-=URL, -i URL (Ne in 0.4a1; defal changed in 0.6c7)

    S URL P P I. T ://../

    . W --find-links

    , ,

    .

    --ediabe, -e (Ne in 0.6a1)

    O ,

    --build-directory. EI

    ; . S E V S P

    .

    --bid-diec=DIR, -b DIR (UPDATED in 0.6a1)

    S . I ,

    . T

    ' , -. I

    , ,

    .

    T --editable , EI onl

    ( ) . S E V S P, ,

    .

    --ebe, -, --ie, - (Ne in 0.4a4)

    C EI' . T "",

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    14/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    - , ,

    URL. U -q --quiet "",

    , , . U -v --verbose -

    , , . I

    -v , ,

    .

    --d-, - (Ne in 0.4a4)

    D' . T ,

    . T not ,

    / .

    --iie=LEVEL, -O LEVEL (Ne in 0.4a4)

    I , not --zip-ok ,

    .py .pyo . I

    .egg , .egg . T 0, 1, 2;

    0 ( ' install install_lib ).

    --ecd=FILENAME (Ne in 0.5a4)

    W FILENAME. T

    "" ,

    ". ".

    --ie-di=DIRLIST, -S DIRLIST (Ne in 0.6a1)

    S "" ( ). "S"

    .pth , P site-packages . A 0.610, EI

    .pth ( ), . I EI'

    .pth .

    (I make -PYTHONPATH .pth , A

    I .)

    ---de, -N (Ne in 0.6a6)

    D' . T -

    . (W ' .)

    --a-h=PATTERNS, -H PATTERNS (Ne in 0.6a6)

    R . E.. -H *.python.org

    python.org

    . T entire // URL(). F ,

    *.python.org NOT URL http://python.org/foo

    http://www.python.org:8080/ . M . T

    *, .

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    15/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    I , EI' (.. -Hlocalhost),

    . EI

    , ' . EI

    URL, --allow-hosts . S

    ,

    .

    --efi=DIR (Ne in 0.6a10)

    U . O W,

    prefix\\Lib\\site-packages prefix\\Scripts,

    prefix/lib/python2.X/site-packages (

    ) prefix/bin .

    N --prefix default ,

    .

    --ca-ah-, - (Ne in 0.6c6)

    N, EI released , - ,

    - . S,

    setup.py .

    H, , - setup.py

    develop , , "-"

    . N, --always-copy

    .

    N , ( SVN ) - , EI

    "" .

    C I L

    EI P .pth , P'

    site-packages . O ( M OS X), site-packages

    ,

    .

    T , ,

    site-packages . F , . Y

    ' -. A .

    T ;

    .

    Adminiao Inallaion

    T site-packages ( .pth

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    16/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    ), ' . T

    EI .

    Mac OS X "Ue" Inallaion

    T

    , M OS X . T

    M OS X .

    Ceaing a "Vial" Phon

    T ' "" site-packages ,

    " " . T

    P , P

    . (O P ;

    P.)

    I ' PYTHONPATH , '

    , .

    "Tadiional" PYTHONPATH-baed Inallaion

    I PYTHONPATH, / , '

    , . (I ' .pth

    , , A I .pth

    , .)

    A I

    I , P EI.

    F, altinstall.pth P' site-packages ,

    ( P ):

    import os, site; site.addsitedir(os.path.expanduser('/lib/python2.3'))

    T ' /lib/python2.X sys.path ( ), and

    .pth -- EI.

    T distutils.cfg distutils P . T /usr/lib/python2.X/distutils P

    C:\\Python2X\Lib\distutils W . A ,

    P :

    [install]install_lib = /lib/python2.3

    # This next line is optional but often quite useful; it directs EasyInstall# and the distutils to install scripts in the user's "bin" directory. For# Mac OS X framework Python builds, you should use /usr/local/bin instead,# because neither /bin nor the default script installation location are on

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    17/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    # the system PATH.#install_scripts = /bin

    T EI ' .

    O , ' /lib/python2.X . Y

    . Y /.pydistutils.cfg (/pydistutils.cfg W)

    distutils.cfg . T :

    1. sys.path site.addsitedir()

    .pth sitecustomize.py.

    2. T () easy_install

    --site-dirs , EI .pth . (T

    P ' .pth ,

    EI .)

    A , .

    M OS X "U" I

    I M OS X , /Library/Python/2.x/site-packages

    , .pth , EI

    .

    B EI/, /.pydistutils.cfg (

    ):

    [install]install_lib = /Library/Python/$py_version_short/site-packagesinstall_scripts = /bin

    T EI site-packages ,

    /bin. (N: not $py_version_short P !

    T ,

    P , .)

    O , easy_install

    .

    (N, , /bin PATH, . Y

    ( .bashrc .profile) /.MacOSX/environment.plist /bin PATH.

    C "V" P

    I L, BSD, C, U- , ' ,

    "" P , -

    P.

    I , P /lib/python2.x, /include/python2.x,

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    18/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    /bin . J -. - P. I

    , --prefix . (U

    --help .)

    W ' , ' /bin/python ' P

    , . S P

    - ,

    P. Y' EI,

    /bin/python P.

    N PYTHONPATH /

    /.pydistutils.cfg, before virtual-python.py. T

    P an EI;

    /lib /bin .

    Y , , bin (.. /bin)

    PATH, EI P .

    "T"PYTHONPATH

    - I

    T "" ,

    P .pth '. W

    , , P . H,

    ' ' , ' .

    A /py-lib, /bin, '

    :

    F, /.pydistutils.cfg , ' :

    [install]install_lib = /py-libinstall_scripts = /bin

    B before ez_setup.py . T,

    , /py-lib PYTHONPATH .

    Y must PYTHONPATH,

    EI, EI. Y

    /.profile () , '

    .

    P I "API"

    C ( PPI) EI

    :

    1. E , "" HTML XHTML, "" href .

    2. I ' URL base/projectname/version, base

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    19/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    ' URL.

    3. O /version ' URL ( /)

    :

    . T , , OR

    . A .

    4. I . I ' "_" URL,

    HTML , EI

    - ' .

    5. W , MD5 URL

    #md5=..., ... 32- MD5 . EI

    ' MD5 .

    6. I "" "" URL rel="homepage"

    rel="download" HTML URL. U

    EI ,

    . I , ,

    HTML, . T not "" ""

    , .

    7. T URL , /, all'

    .

    (N: T - safe_name()

    URL . I (.. PPI , _,

    ), - .)

    8. I file:// URL, EI index.html ,

    , / URL.

    B C

    P 0.64 :

    H "Home Page" "Download URL",

    ( ) rel="" . T

    , , ! F ,

    :

    Home Page:http://sqlobject.org

    E HTML , EI ""

    ' URL.

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    20/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    T 3() must "Index of

    Packages" . T HTML , ,

    . (N: MUST NOT ,

    2 3()!)

    I , PPI #md5= ID, EI

    PPI' MD5 ( ):

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    21/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    0.6c6

    EI URL ' ,

    URL . I, .

    F - W

    .

    A --local-snapshots-ok , setup.py

    develop.

    F HTML- URL

    0.6c5

    F .dll C .

    0.6c4

    A HTTP "B" http://user:pass@host URL. I

    - ( ),

    .

    R S , S'

    - .F win32.exe .

    F os.open() , - (..

    /dev/urandom , os.urandom() ).

    F .pth W sys.executable (..,

    P Program Files ).

    0.6c3

    Y " - _" P 2.4 .

    P 2.5 .

    0.6c2

    W . (P

    J F.)

    T ez_setup.py .egg

    .

    A sys.path

    --editable.

    G -x #! sys.executable -ASCII ,

    .

    0.6c1

    EI User-Agent

    .

    0.6b4

    F P -P

    F ftp:// URL "H " "D

    URL" PPI.

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    22/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    F sys.path_importer_cache

    /.

    F HTML 404 .

    A file:// URL . URL

    - index.html .

    A rel="homepage" rel="download",

    PPI- .

    S - ,

    .

    0.6b3

    F --find-links --always-copy.

    F "" .

    F setuptools , ez_setup

    easy_install , ' .

    0.6b2

    D' site.py PYTHONPATH --multi-version, easy-install.pth .

    C .pth import '

    .

    F ' 0.5 .

    0.6b1

    B : #egg /

    - , .egg -, P .egg

    ( S ').

    S file:// --find-links, _ .

    A S . T

    .., IP , . T

    IP .

    I _ URL.

    0.6a11

    P dependency_links.txt , URL .

    U .pth .pth . T

    .

    A easy_install-N.N () P .

    A . E .,

    , EI -

    .

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    23/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    T --delete-conflicting --ignore-conflicts-at-my-risk

    , .

    D' --find-links.

    0.6a10

    A , .pth ,

    / . T

    --site-dirs.

    A --prefix --I-- RTFM-. :)

    E PYTHONPATH ' .

    --multi-version ; -

    PYTHONPATH, -"" .

    E $variables --site-dirs, --build-directory, --install-dir,

    --script-dir , .

    I SF HTML

    SF.

    PPI '

    install_requires. P, ,

    - ' (_) .

    EI .py ,

    #egg=name-version URL, .py "D URL"

    ' PPI . T "" P

    (.. PPI ).

    T --always-copy "" "" '

    . N EI

    , ' .

    T --find-links URL ,

    . URL

    ,

    --update -U .

    F --help-commands .

    0.6a9

    F .pth (.. "") '

    .pth .

    I URL , . T

    " " CGI URL ..Q . ( ' ) P ( )

    W.

    S bdist_wininst . R

    bdist_wininst - .

    (.., - ), easy_install .

    .egg .

    0.6a8

    U SF

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    24/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    F S

    F --always-copy

    .

    F W, S -

    F P , P 2.4 /

    SWIG.

    0.6a7

    F W P 2.3

    0.6a6

    A "" PYTHONPATH- - ,

    virtual-python.py , I B. T

    site PYTHONPATH- . ,

    EI .

    A --no-deps --allow-hosts .

    I W .exe P.

    C ' -, '

    , ,

    . A, / '

    , .

    0.6a3

    I easy_install. R

    python -m easy_install.py; easy_install

    .I VC '

    .

    F #egg= .

    0.6a2

    EI "_" setuptools

    . O W, .exe

    . O , .

    U python -m easy_install easy_install.py DEPRECATED,

    easy_install .

    0.6a1

    EI MD5 PPI, "#5=..."

    32- 5 .

    EI ,

    ' . T P "" (

    N-R I ).

    A MOS .egg ,

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    25/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    K D. Y ""

    "P_M", OS X

    ( 10.4.1 10.4.2) OS

    .

    _' . W --always-copy,

    . W --always-copy,

    , .

    F .pyc .pyo .py .

    A --site-dirs "" . M easy-install.pth

    - (.. /Library/Python/2.x/site-packages

    M OS X).

    I , EI

    easy-install.pth .

    EI URL #egg=project_name ID

    ' . S URL

    , '

    , --editable . T #egg '

    #egg=proj-ver, proj , ver . Y

    must bdist_egg ; .., -

    .

    A --editable ; E V S P . A,

    --build-directory .

    F -

    .

    0.5a12

    F python -m easy_install . U

    python -m .M. 32. , P 2.4' bdist_wininst

    .

    0.5a10

    P easy_install , ' python -m !

    A --find-links/-f URL.

    0.5a9

    EI ""

    sys.path ' ,

    . B , ,

    (--delete-conflicting --ignore-conflicts-at-my-risk)

    . (N: ' setuptools

    , .)

    T easy_install DistutilsError

    .

    EI ,

    .

    EI

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    26/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    ,

    .

    A --always-unzip/-Z ,

    , --zip-ok/-z "

    ".

    0.5a8

    T ; ' EI .

    0.5a5

    M easy_install setuptools , easy_install

    setuptools.command.easy_install . N ,

    . easy_install.py ,

    .

    0.5a4

    A --always-copy/-a , ' .. (I , ,

    .)

    A --upgrade/-U PPI ()

    , .

    A . T

    ' EGG-INFO ,

    . I ' , '

    . (E.., EI .)

    A --record easy_install setup.py install

    --record=filename .)

    0.5a3

    F .

    I (.. )

    .

    0.5a2

    F ---- . :(

    0.5a1

    A .win32.exe . EI

    .

    F "" ( ,

    )

    0.4a4

    A "/" "-" , "" .

    S PPI ( ,

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    27/28

    /03/2012 EasInstall - The PEAK Developers' Center

    ak.telecommunit.com/DevCenter/EasInstall?action=print

    / ).

    0.4a3

    A / URL '

    . (H, --

    , ' ' .)

    0.4a2A

    A , '

    EI' .

    R --scan-url/-s --find-links/-f -s

    .

    U urllib2 urllib, https: URL P SSL .

    0.4a1

    A --scan-url --index-url , PPI

    .

    0.3a4

    R --build-directory=DIR/-b DIR URL ,

    ..

    0.3a3

    A --build-directory=DIR/-b DIR .

    A " " '()'

    .A SF - (C I B)

    A ""

    A install_data

    0.3a2

    A svn: svn+ URL,

    HTTP URL (C I B)

    M.

    0.3a1

    I .

    F P

    A //

    S ? SSL? A PPI ?

    D ?

    R / _?

  • 8/2/2019 Easy Install - The PEAK Developers' Center

    28/28

    /03/2012 EasInstall - The PEAK Developers' Center