2013-02-16 00:34:16 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*
|
|
|
|
|
|
|
|
from distutils.core import setup
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
def get_packages(package):
|
|
|
|
"""
|
|
|
|
Return root package & all sub-packages.
|
|
|
|
"""
|
|
|
|
return [dirpath
|
|
|
|
for dirpath, dirnames, filenames in os.walk(package)
|
|
|
|
if os.path.exists(os.path.join(dirpath, '__init__.py'))]
|
|
|
|
|
|
|
|
def get_package_data(package):
|
|
|
|
"""
|
|
|
|
Return all files under the root package, that are not in a
|
|
|
|
package themselves.
|
|
|
|
"""
|
|
|
|
walk = [(dirpath.replace(package + os.sep, '', 1), filenames)
|
|
|
|
for dirpath, dirnames, filenames in os.walk(package)
|
|
|
|
if not os.path.exists(os.path.join(dirpath, '__init__.py'))]
|
|
|
|
|
|
|
|
filepaths = []
|
|
|
|
for base, filenames in walk:
|
|
|
|
filepaths.extend([os.path.join(base, filename)
|
|
|
|
for filename in filenames])
|
|
|
|
return {package: filepaths}
|
|
|
|
|
|
|
|
setup(
|
|
|
|
name='mega.py',
|
2013-02-19 00:12:24 +00:00
|
|
|
version='0.8.1',
|
2013-02-16 00:34:16 +00:00
|
|
|
packages=get_packages('mega'),
|
|
|
|
package_data=get_package_data('mega'),
|
|
|
|
description='Python lib for the Mega.co.nz API',
|
|
|
|
author='Richard O\'Dwyer',
|
|
|
|
author_email='richard@richard.do',
|
|
|
|
license='Creative Commons Attribution-Noncommercial-Share Alike license',
|
|
|
|
long_description=open('README.md').read(),
|
2013-02-16 01:04:41 +00:00
|
|
|
classifiers=[
|
|
|
|
'Intended Audience :: Developers',
|
|
|
|
'Operating System :: OS Independent',
|
|
|
|
'Programming Language :: Python',
|
|
|
|
'Topic :: Internet :: WWW/HTTP'
|
|
|
|
]
|
2013-02-16 00:34:16 +00:00
|
|
|
)
|