2013-03-19 54 views
0

我想在我正在處理的Django項目中嘗試這個中間件:https://github.com/directeur/django-pdf。它的名稱是「django-pdf」,但與https://pypi.python.org/pypi/django-pdf/1.0.2不一樣。不幸的是,Directeur django-pdf也不是微不足道的:它沒有setup.py或requirements.txt。從github存儲庫中構建一個雞蛋

是否有一些擴展的食譜或方式將軟件包安裝到django路徑,或者我被迫fork回購並添加setup.py?

這是我目前的發展buildout.cfg:

[buildout] 
parts = 
    python 
    django 
    django-nose 
    pyflakes 
show-picked-versions = true 
develop = . 
eggs = django-core7 
versions = versions 

[python] 
recipe = zc.recipe.egg 
interpreter = python 
eggs = ${buildout:eggs} 

[django] 
recipe = djangorecipe 
project = core7 
projectegg = core7 
settings = development 
test = core7 
eggs = 
    ${buildout:eggs} 
    ${django-nose:eggs} 
    django_pdb 
extra-paths = ${buildout:sources-dir} 

[django-nose] 
recipe = zc.recipe.egg 
eggs = 
    django-nose 
    coverage 

# Make this a separate part so it doesn't get included in Django's path. 
[pyflakes] 
recipe = zc.recipe.egg 
eggs = pyflakes 

[versions] 
django = 1.5 

回答

1

據我瞭解,buidout很大程度上取決於setuptools的(或租用一個setup.py)。如果沒有這個,建立不能產生分佈(一個蛋)。幸運的是,GitHub可以讓你輕鬆地派生一個倉庫,以便你可以添加一個setup.py。 ;-)你可能想考慮提供補丁。

由於沒有配方(據我所知),可以讓你添加項目沒有setup.py。這樣的項目聽起來像是反模式,因爲這會打破需要setup.py的項目的'合同'。

第一個選項似乎更好。當你的項目在GitHub上時,你可以使用mr.develop來引入你的依賴。