leocornus.recipe.distribute.

ZC.BUILDOUT ÆÐÅ°Áö ¹× ÆÄÀÏ, ¸ðµâ, libs, ¾ÆÄ«ÀÌºê µîÀ»À§ÇÑ ·¹½ÃÇÇ
Áö±Ý ´Ù¿î·Îµå

leocornus.recipe.distribute. ¼øÀ§ ¹× ¿ä¾à

±¤°í

  • Rating:
  • ƯÇã:
  • GPL
  • °¡°Ý:
  • FREE
  • °Ô½ÃÀÚ À̸§:
  • Sean Chen
  • °Ô½ÃÀÚ À¥»çÀÌÆ®:
  • http://plonexp.leocorn.com/

leocornus.recipe.distribute. ű×


leocornus.recipe.distribute. ¼³¸í

leocornus.recipe.distribute´Â lib, ¸ðµâ, ¾ÆÄ«À̺ê, ÆÄÀÏÀ» ÆÐŰ¡ÇÏ°í ¹èÆ÷ÇÏ´Â ºôµå ¾Æ¿ô ·¡¼­ ÇÇÀÔ´Ï´Ù. viewview let rect. >>> Àμâ 'hello'hellooptionssource-root ÆÐÅ°ÁöÀÇ ¼Ò½º ÆÄÀÏÀ» ãÀº ·çÆ® µð·ºÅ丮ÀÔ´Ï´Ù. ÆÐÅ°ÁöÀÇ À̸§ µÚ¿¡´Â PackagesÀÇ À̸§ ¸ñ·Ï : Zip, Tar, Gztar, Bztar. ±âº» Çü½ÄÀº ZIP.OUTPUT-·çÆ® ¾ÆÄ«ÀÌºê µÈ ÆÄÀÏÀÌ ÀúÀåµÈ Ãâ·Â ·çÆ® µð·ºÅÍÀÔ´Ï´Ù. ±âº»°ªÀº Parts Directory.Samplessamples ¿©±â¿¡ zc.buildoutÀÇ Å×½ºÆ® Áö¿øÀ» ±â¹ÝÀ¸·ÎÇÕ´Ï´Ù. ÀÚ¼¼ÇÑ ³»¿ëÀº http://pypi.python.org/pypi/zc.buildout/1.5.2#testing-support¸¦ È®ÀÎÇϽʽÿÀ. Some Áغñ. >>> °¡Á® ¿À±â >>> srcroot = tmpdir ( 'src-root') >>> distridoot = tmpdir ( 'dist-root') Å×½ºÆ® ÆÑ Ä«Áö¸¦ ¹Ì¸® ÁغñÇϽʽÿÀ : ÀϺΠÆú´õ¸¦ ¸¸µé°í ÀϺΠÅ×½ºÆ® ÆÄÀÏÀ» ÀÛ¼ºÇϽʽÿÀ. >>> PackageOne = os.path.join (srcroot, 'test-package-one') >>> mkdir (ÆÐÅ°Áö) >>> mkdir (os.path.join ')) >>> mkdir (OS.PATH.JOIN (ÆÐÅ°Áö, 'FolderTwo')) >>> mkdir (os.path.join (ÆÐÅ°Áö, 'foldertwo', 'foldertwo2', 'foldertwo2')) >>> ¾²±â (ÆÐÅ°Áö, 'readme.txt', " Readme ÄÜÅÙÃ÷ ") >>> ¾²±â (ÆÐÅ°Áö, 'FolderOne', 'fileOne.txt', 'ÆÄÀÏ ÇϳªÀÇ ÄÜÅÙÃ÷') >>> ¾²±â (ÆÐÅ°Áö, 'foldertwo', 'filetwo.txt', 'µÎ ¹ø° ÄÜÅÙÃ÷') >>> ¾²±â (ÆÐÅ°Áö, 'foldertwo', 'foldertwo2', 'filetwo2.txt', 'ÆÄÀÏ 2 ÄÜÅÙÃ÷) >>> Packagetwo = os.path.join (srcroot,'test-package-two ')> >> MKDIR (Packagetwo) >>> mkdir (os.path.join (packagetwo, 'folder2one')) >>> mkdir (os.path.join (packagetwo, folder2two ')) >>> mkdir (os.path) injoin (packagetwo, 'folder2two', 'folder2two2')) >>> ¾²±â (packagetwo, 'readme.txt', "readme content") >>> ¾²±â (packagetwo, 'folder2one', 'fileone.txt', ' ÆÄÀÏ ÇÑ ÄÜÅÙÃ÷ ') >>> ¾²±â (packagetwo,'folder2two ','folder2two2 ','filetwo2.txt ','ÆÄÀÏ 2 ÄÜÅÙÃ÷ 2)) »ùÇà buildou t ±¸¼º ÆÄÀÏ. sample_buildoutÀº Å×½ºÆ®¸¦À§ÇÑ Temp Æú´õÀÔ´Ï´Ù. >>> ¾²±â (sample_buildout, 'buildout.cfg', ... "" "... ... ºÎÇ° = ... TEST-SOURCE-DIST ... ... ] ... recipe = leocornus.recipe.distribute ... source-root = % (srcroot) s ... ÆÐÅ°Áö = ... Å×½ºÆ® ÆÐÅ°Áö - 1 = 1.0 ... Å×½ºÆ® ÆÐÅ°Áö - 2 = 2.0 .. dist-format = zip ... Ãâ·Â - ·çÆ® = % (Undroot) s ... ""% dict (srcroot = srcroot, distroot = himphoot)) ºôµå ¾Æ¿ô >>> Àμ⠽ýºÅÛ (ºôµå ¾Æ¿ô) ¼³Ä¡ Å×½ºÆ® - ¼Ò½º - dist. Test-Source-Dist : ÆÐÅ°Áö ¸¸µé±â : ... / dist-root / test-package-one.1.0.zip Å×½ºÆ® - source-dist : ÆÐÅ°Áö ¸¸µé±â : ... / dist-root / test-package-2.2.0 .ZipRead Dist ÆÄÀÏÀ» È®ÀÎÇÏ¿© °á°ú¸¦ È®ÀÎÇϽʽÿÀ. >>> Import ZipFile >>> thezip = zipfile.zipfile (os.path.join (Usidoot, 'test-package-one.1.0.zip'), "r") >>> ÆÄÀÏ = thezip.namelist ()> >> Len (ÆÄÀÏ) 4 >>> 'Å×½ºÆ® ÆÐÅ°Áö - ÆÄÀÏÀÇ / readme.txt'ÆÄÀÏ true >>> 'Test-Package-one / folderone / fileOne.txt'ÆÄÀÏ¿¡¼­ true >>> 'Å×½ºÆ® ÆÐÅ°Áö - ÆÄÀÏ¿¡¼­ / foldertwo / filetwo.txt 'ÆÄÀÏ true >>>'Å×½ºÆ® ÆÐÅ°Áö - ÇϳªÀÇ / foldertwo2 / filetwo / foldertwo2 / filetwo2.txt 'ÆÄÀÏ truePackage thezip = zipfile.zipfile (os.path.join) , 'test-package-two.2.0.zip'), "r") >>> ÆÄÀÏ = thezip.namelist () >>> len (ÆÄÀÏ) 3 >>> Å×½ºÆ® ÆÐÅ°Áö - 2 / readme.txt ' ÆÄÀÏ¿¡¼­ true >>> 'Å×½ºÆ® ÆÐÅ°Áö - 2 / folder2one / fileOne.txt'ÆÄÀÏ true >>> 'Å×½ºÆ® ÆÐÅ°Áö - 2 / folder2two / folder2two2 / filetwo2.txt'ÆÄÀÏÀÇ TrueProductÀÇ È¨ÆäÀÌÁö


leocornus.recipe.distribute. °ü·Ã ¼ÒÇÁÆ®¿þ¾î