aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorJonas Genannt <genannt@debian.org>2015-11-15 22:26:06 +0100
committerJonas Genannt <genannt@debian.org>2015-11-15 22:26:06 +0100
commitd65aa3c3c146b12548a54c894060bce9a8715ad2 (patch)
tree293607c424ec0b1d41e2aefaf26989a7adbd3e04 /setup.py
parent29425a36c920e9b54e5860429ef3e3ce639fb155 (diff)
downloadpython-django-tagging-d65aa3c3c146b12548a54c894060bce9a8715ad2.tar
python-django-tagging-d65aa3c3c146b12548a54c894060bce9a8715ad2.tar.gz
Imported Upstream version 0.4upstream/0.4
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py96
1 files changed, 34 insertions, 62 deletions
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']
)