in the way of setuptooling

--HG--
extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40251
This commit is contained in:
eduardo 2008-09-18 14:58:43 +00:00
parent 93c313853d
commit a85e53053d
3 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,11 @@
#! /bin/sh
#
# This file becomes the install section of the generated spec file.
#
# This is what dist.py normally does.
python2.5 setup.py install --root=${RPM_BUILD_ROOT} --record="INSTALLED_FILES"
cat << EOF >> INSTALLED_FILES
/usr/bin/*.py*
EOF

10
scrapy/trunk/setup.cfg Normal file
View File

@ -0,0 +1,10 @@
[bdist_rpm]
release = 1
python = python2.5
install-script = scripts/rpm-install.sh
[install]
optimize = 1
[aliases]
rpm = bdist_rpm --binary-only clean -a

29
scrapy/trunk/setup.py Normal file
View File

@ -0,0 +1,29 @@
from setuptools import setup, find_packages
import os, os.path, glob
def findfiles(pattern, base='.'):
matches = []
for root, _, _ in os.walk(base):
matches.extend(glob.glob(os.path.join(root, pattern)))
return matches
name = 'scrapy'
setup (
name = name,
version = '0.1',
description = '',
long_description = '',
author = '',
author_email = '',
license = '',
url = 'http://scrapy.org',
packages = [name] + ['%s.%s' % (name,p) for p in find_packages('scrapy')],
package_data = {name:
findfiles('*.tmpl', 'scrapy/templates')
},
data_files = [],
scripts = ['scrapy/bin/scrapy-admin.py'],
)