diff options
| -rw-r--r-- | MANIFEST.in | 3 | ||||
| -rwxr-xr-x | setup.py | 30 |
2 files changed, 2 insertions, 31 deletions
diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index a308077..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,3 +0,0 @@ -include LICENSE -include README.rst -include requirements.txt @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -from setuptools import setup +from setuptools import setup, find_packages import re import os import sys @@ -41,31 +41,6 @@ def get_version(package): return re.search("^__version__ = ['\"]([^'\"]+)['\"]", init_py, re.MULTILINE).group(1) -def get_packages(package): - """ - Return root package and 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} - - if sys.argv[-1] == 'publish': os.system("python setup.py sdist upload") args = {'version': get_version(package)} @@ -82,8 +57,7 @@ setup( description=description, author=author, author_email=author_email, - packages=get_packages(package), - package_data=get_package_data(package), + packages=find_packages(), install_requires=install_requires, classifiers=classifiers, entry_points={'console_scripts': ['slugify=slugify.slugify:main']}, |
