Permalink
Browse files

find scripts automatically

  • Loading branch information...
1 parent d8045da commit 475566de8a63cc19030044507c214d421529afae @stfp stfp committed Feb 8, 2011
Showing with 13 additions and 13 deletions.
  1. +13 −13 setup.py
View
@@ -4,30 +4,30 @@
import os
from setuptools import setup, find_packages
-def read_file(filename):
- """Read a file into a string"""
- path = os.path.abspath(os.path.dirname(__file__))
- filepath = os.path.join(path, filename)
- try:
- return open(filepath).read()
- except IOError:
- return ''
-
+def find_files(dirname):
+ files = []
+ for entryname in os.listdir(dirname):
+ pathname = "%s/%s" % (dirname, entryname)
+ if os.path.isfile(pathname):
+ files.append(pathname)
+ elif os.path.isdir(pathname):
+ files += find_files(pathname)
+ return files
setup(
name='Memopol',
version = '1.99.1',
author = 'The memopol project',
author_email = 'deubeulyou@gmail.com',
description = 'Memoire Politique',
- long_description = read_file('README.txt'),
+ long_description = open('README.txt').read(),
license = 'LICENSE.txt',
url = 'http://projets.lqdn.fr/projects/mempol',
packages = find_packages(),
include_package_data = True,
- scripts = ['bin/jenkins-setup-and-test.sh'],
- install_requires = read_file('requirements.txt'),
+ scripts = find_files('bin'),
+ install_requires = open('requirements.txt').read(),
extras_require = {
- 'test': read_file('requirements-test.txt')
+ 'test': open('requirements-test.txt').read()
}
)

0 comments on commit 475566d

Please sign in to comment.