setup.py
チーズ ショップで (まだ) リリースされていないいくつかのサード パーティ製パッケージを取り込む必要がある、現在取り組んでいるプロジェクトのファイルがあります。これらの 1 つは、この git リポジトリの「spine」および「pyguts」モジュールです。
https://github.com/terrysimons/spine-python
通常、setup.py ファイルで次の項目を指定することで、gitgub からインストールできます (わかりやすくするために、いくつかの行は省略されています)。
#! /usr/bin/python
# Encoding: UTF-8
from setuptools import setup, find_packages
setup(
# More stuff in here...
dependency_links=[
'https://github.com/bitcraft/PyTMX/archive/master.zip#egg=PyTMX',
],
install_requires=[
'PyTMX',
],
)
ただし、これは、PyTMXsetup.py
がリポジトリのルートにファイルを持っているためにのみ機能します。
spine
とのpyguts
リポジトリに対して同様のことをしようとすると、次のようになります。
#! /usr/bin/python
# Encoding: UTF-8
from setuptools import setup, find_packages
__version__ = '0.0.1'
setup(
dependency_links=[
'https://github.com/bitcraft/PyTMX/archive/master.zip#egg=PyTMX',
'https://github.com/terrysimons/spine-python/archive/master.zip#egg=spine',
],
install_requires=[
'PyTMX',
'spine',
],
)
次に、実行するとdistutilsが文句を言いますpython setup.py install
:
Searching for spine
Best match: spine [unknown version]
Downloading https://github.com/terrysimons/spine-python/archive/master.zip#egg=spine
Processing master.zip
error: Couldn't find a setup script in /tmp/easy_install-OXsH6T/master.zip
setup.py
ファイルがパッケージリポジトリのルートにない場合、distutils でパッケージをインストールするにはどうすればよいですか?