提交 584a844e 编写于 作者: P pablo

Fixed distutils packaging for all setup.py bdist formats

--HG--
rename : scrapy/bin/scrapy-admin.py => bin/scrapy-admin.py
上级 ead54669
include README
include AUTHORS
include INSTALL
include LICENSE
include MANIFEST.in
recursive-include docs *
recursive-include scripts *
recursive-include examples *
recursive-include extras *
recursive-include bin *
......@@ -3,8 +3,19 @@
# This file becomes the install section of the generated spec file.
#
python setup.py install --root=${RPM_BUILD_ROOT} --record="INSTALLED_FILES"
python2.5 setup.py install --root=${RPM_BUILD_ROOT} --record="INSTALLED_FILES"
cat << EOF >> INSTALLED_FILES
/usr/bin/*.py*
EOF
# Sort the filelist so that directories appear before files. This avoids
# duplicate filename problems on some systems.
touch DIRS
for i in `cat INSTALLED_FILES`; do
if [ -f ${RPM_BUILD_ROOT}/$i ]; then
echo $i >>FILES
fi
if [ -d ${RPM_BUILD_ROOT}/$i ]; then
echo %dir $i >>DIRS
fi
done
# Make sure we match foo.pyo and foo.pyc along with foo.py (but only once each)
sed -e "/\.py[co]$/d" -e "s/\.py$/.py*/" DIRS FILES >INSTALLED_FILES
[bdist_rpm]
doc_files = docs examples extras AUTHORS INSTALL LICENSE README
install-script = scripts/rpm-install.sh
[install]
optimize = 1
[aliases]
rpm = bdist_rpm --binary-only clean -a
......@@ -93,5 +93,5 @@ setup(
packages = packages,
cmdclass = cmdclasses,
data_files = data_files,
scripts = ['scrapy/bin/scrapy-admin.py'],
scripts = ['bin/scrapy-admin.py'],
)
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册