Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

find scripts automatically

  • Loading branch information...
commit 475566de8a63cc19030044507c214d421529afae 1 parent d8045da
@stfp stfp authored
Showing with 13 additions and 13 deletions.
  1. +13 −13 setup.py
View
26 setup.py
@@ -4,15 +4,15 @@
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',
@@ -20,14 +20,14 @@ def read_file(filename):
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()
}
)
Please sign in to comment.
Something went wrong with that request. Please try again.