Commit d9ec1a48 authored by Aurelien Campeas's avatar Aurelien Campeas
Browse files

a newer setup.py

parent 138906d00726
......@@ -31,10 +31,6 @@ try:
from __pkginfo__ import distname
except ImportError:
distname = modname
try:
from __pkginfo__ import classifiers
except ImportError:
classifiers = []
try:
from __pkginfo__ import scripts
except ImportError:
......@@ -97,7 +93,8 @@ def get_packages(directory, prefix):
def export(from_dir, to_dir,
blacklist=STD_BLACKLIST,
ignore_ext=IGNORED_EXTENSIONS):
ignore_ext=IGNORED_EXTENSIONS,
verbose=True):
"""make a mirror of from_dir in to_dir, omitting directories and files
listed in the black list
"""
......@@ -114,9 +111,10 @@ def export(from_dir, to_dir,
continue
if filename[-1] == '~':
continue
src = '%s/%s' % (directory, filename)
src = join(directory, filename)
dest = to_dir + src[len(from_dir):]
print >> sys.stderr, src, '->', dest
if verbose:
print >> sys.stderr, src, '->', dest
if os.path.isdir(src):
if not exists(dest):
os.mkdir(dest)
......@@ -164,10 +162,15 @@ class MyInstallLib(install_lib.install_lib):
base = modname
for directory in include_dirs:
dest = join(self.install_dir, base, directory)
export(directory, dest)
export(directory, dest, verbose=False)
def install(**kwargs):
"""setup entry point"""
try:
if USE_SETUPTOOLS:
sys.argv.remove('--force-manifest')
except:
pass
if subpackage_of:
package = subpackage_of + '.' + modname
kwargs['package_dir'] = {package : '.'}
......@@ -188,7 +191,6 @@ def install(**kwargs):
author = author,
author_email = author_email,
url = web,
classifiers = classifiers,
scripts = ensure_scripts(scripts),
data_files = data_files,
ext_modules = ext_modules,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment