From d65aa3c3c146b12548a54c894060bce9a8715ad2 Mon Sep 17 00:00:00 2001 From: Jonas Genannt Date: Sun, 15 Nov 2015 22:26:06 +0100 Subject: Imported Upstream version 0.4 --- setup.py | 96 +++++++++++++++++++++++----------------------------------------- 1 file changed, 34 insertions(+), 62 deletions(-) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 0670dfe..3e7ccf0 100644 --- a/setup.py +++ b/setup.py @@ -1,70 +1,42 @@ """ Based entirely on Django's own ``setup.py``. """ -import os -from distutils.command.install import INSTALL_SCHEMES -from distutils.core import setup +from setuptools import setup +from setuptools import find_packages import tagging - - -def fullsplit(path, result=None): - """ - Split a pathname into components (the opposite of os.path.join) in a - platform-neutral way. - """ - if result is None: - result = [] - head, tail = os.path.split(path) - if head == '': - return [tail] + result - if head == path: - return result - return fullsplit(head, [tail] + result) - -# Tell distutils to put the data_files in platform-specific installation -# locations. See here for an explanation: -# http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb -for scheme in INSTALL_SCHEMES.values(): - scheme['data'] = scheme['purelib'] - -# Compile the list of packages available, because distutils doesn't have -# an easy way to do this. -packages, data_files = [], [] -root_dir = os.path.dirname(__file__) -tagging_dir = os.path.join(root_dir, 'tagging') -pieces = fullsplit(root_dir) -if pieces[-1] == '': - len_root_dir = len(pieces) - 1 -else: - len_root_dir = len(pieces) - -for dirpath, dirnames, filenames in os.walk(tagging_dir): - # Ignore dirnames that start with '.' - for i, dirname in enumerate(dirnames): - if dirname.startswith('.'): del dirnames[i] - if '__init__.py' in filenames: - packages.append('.'.join(fullsplit(dirpath)[len_root_dir:])) - elif filenames: - data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]]) - - setup( - name = 'django-tagging', - version = tagging.get_version(), - description = 'Generic tagging application for Django', - author = 'Jonathan Buchanan', - author_email = 'jonathan.buchanan@gmail.com', - url = 'http://code.google.com/p/django-tagging/', - packages = packages, - data_files = data_files, - classifiers = ['Development Status :: 4 - Beta', - 'Environment :: Web Environment', - 'Framework :: Django', - 'Intended Audience :: Developers', - 'License :: OSI Approved :: BSD License', - 'Operating System :: OS Independent', - 'Programming Language :: Python', - 'Topic :: Utilities'], + name='django-tagging', + version=tagging.__version__, + + description='Generic tagging application for Django', + long_description='\n'.join([open('README.rst').read(), + open('CHANGELOG.txt').read()]), + keywords='django, tag, tagging', + + author=tagging.__author__, + author_email=tagging.__author_email__, + maintainer=tagging.__maintainer__, + maintainer_email=tagging.__maintainer_email__, + url=tagging.__url__, + license=tagging.__license__, + + packages=find_packages(), + include_package_data=True, + zip_safe=False, + + classifiers=[ + 'Framework :: Django', + 'Environment :: Web Environment', + 'Operating System :: OS Independent', + 'Development Status :: 5 - Production/Stable', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: BSD License', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Topic :: Utilities', + 'Topic :: Software Development :: Libraries :: Python Modules'] ) -- cgit v1.2.3