|
|
@@ -13,7 +13,7 @@ try: |
|
|
|
except IOError: |
|
|
|
long_description = '' |
|
|
|
|
|
|
|
################################################################################ |
|
|
|
############################################################################## |
|
|
|
# find_package_data is an Ian Bicking creation. |
|
|
|
|
|
|
|
# Provided as an attribute, so you can append to these instead |
|
|
@@ -22,12 +22,13 @@ standard_exclude = ('*.py', '*.pyc', '*~', '.*', '*.bak', '*.swp*') |
|
|
|
standard_exclude_directories = ('.*', 'CVS', '_darcs', './build', |
|
|
|
'./dist', 'EGG-INFO', '*.egg-info') |
|
|
|
|
|
|
|
|
|
|
|
def find_package_data( |
|
|
|
where='.', package='', |
|
|
|
exclude=standard_exclude, |
|
|
|
exclude_directories=standard_exclude_directories, |
|
|
|
only_in_packages=True, |
|
|
|
show_ignored=False): |
|
|
|
where='.', package='', |
|
|
|
exclude=standard_exclude, |
|
|
|
exclude_directories=standard_exclude_directories, |
|
|
|
only_in_packages=True, |
|
|
|
show_ignored=False): |
|
|
|
""" |
|
|
|
Return a dictionary suitable for use in ``package_data`` |
|
|
|
in a distutils ``setup.py`` file. |
|
|
@@ -66,8 +67,9 @@ def find_package_data( |
|
|
|
if os.path.isdir(fn): |
|
|
|
bad_name = False |
|
|
|
for pattern in exclude_directories: |
|
|
|
if (fnmatchcase(name, pattern) |
|
|
|
or fn.lower() == pattern.lower()): |
|
|
|
if fnmatchcase(name, pattern) or \ |
|
|
|
fn.lower() == pattern.lower(): |
|
|
|
|
|
|
|
bad_name = True |
|
|
|
if show_ignored: |
|
|
|
print >> sys.stderr, ( |
|
|
@@ -83,13 +85,15 @@ def find_package_data( |
|
|
|
new_package = package + '.' + name |
|
|
|
stack.append((fn, '', new_package, False)) |
|
|
|
else: |
|
|
|
stack.append((fn, prefix + name + '/', package, only_in_packages)) |
|
|
|
stack.append((fn, prefix + name + '/', package, |
|
|
|
only_in_packages)) |
|
|
|
elif package or not only_in_packages: |
|
|
|
# is a file |
|
|
|
bad_name = False |
|
|
|
for pattern in exclude: |
|
|
|
if (fnmatchcase(name, pattern) |
|
|
|
or fn.lower() == pattern.lower()): |
|
|
|
if fnmatchcase(name, pattern) \ |
|
|
|
or fn.lower() == pattern.lower(): |
|
|
|
|
|
|
|
bad_name = True |
|
|
|
if show_ignored: |
|
|
|
print >> sys.stderr, ( |
|
|
@@ -100,12 +104,13 @@ def find_package_data( |
|
|
|
continue |
|
|
|
out.setdefault(package, []).append(prefix+name) |
|
|
|
return out |
|
|
|
################################################################################ |
|
|
|
|
|
|
|
############################################################################## |
|
|
|
|
|
|
|
setup(name=PROJECT, |
|
|
|
version=__version__, |
|
|
|
description='hyde is a static website generator', |
|
|
|
long_description = long_description, |
|
|
|
long_description=long_description, |
|
|
|
author='Lakshmi Vyas', |
|
|
|
author_email='lakshmi.vyas@gmail.com', |
|
|
|
url='http://hyde.github.com', |
|
|
@@ -132,14 +137,14 @@ setup(name=PROJECT, |
|
|
|
'flake8==2.4.1' |
|
|
|
), |
|
|
|
test_suite='nose.collector', |
|
|
|
include_package_data = True, |
|
|
|
include_package_data=True, |
|
|
|
# Scan the input for package information |
|
|
|
# to grab any data files (text, images, etc.) |
|
|
|
# associated with sub-packages. |
|
|
|
package_data = find_package_data(PROJECT, |
|
|
|
|
|
|
|
package_data=find_package_data(PROJECT, |
|
|
|
package=PROJECT, |
|
|
|
only_in_packages=False, |
|
|
|
), |
|
|
|
only_in_packages=False,), |
|
|
|
entry_points={ |
|
|
|
'console_scripts': [ |
|
|
|
'hyde = hyde.main:main' |
|
|
@@ -164,5 +169,4 @@ setup(name=PROJECT, |
|
|
|
'Topic :: Internet', |
|
|
|
'Topic :: Internet :: WWW/HTTP :: Site Management', |
|
|
|
], |
|
|
|
zip_safe=False, |
|
|
|
) |
|
|
|
zip_safe=False,) |