Commits

Denis Savasteev  committed b06c3c3

Migrate to distutils

  • Participants
  • Parent commits 573ac76

Comments (0)

Files changed (4)

 syntax: glob
 *.pyo
 *.pyc
+*.tar.gz
+MANIFEST
 
+
-Django Image Field with thumbnails creator
-
 - Uses django storage instead of os module
 - Have an admin widget
 - Easy access to thumb parameters in template

File eif/__init__.py

+__version__ = '1.0'
-from setuptools import setup, find_packages
-from os.path import join, dirname
+import os
+from distutils.core import setup
+
+name = 'extended-image-field'
+inner_dir = 'eif'
+
+version = __import__(inner_dir).__version__
+bitbucket_url = "http://bitbucket.org/masterzeb/%s" % name
+packages, data_files = [], []
+
+
+def read(filename):
+    return open(os.path.join(os.path.dirname(__file__), 'README')).read()
+
+
+for dirpath, dirnames, filenames in os.walk('ruadmin'):
+    # Ignore dirnames that start with '.'
+    for i, dirname in enumerate(dirnames):
+        if dirname.startswith('.'):
+            del dirnames[i]
+    if '__init__.py' in filenames:
+        pkg = dirpath.replace(os.path.sep, '.')
+        if os.path.altsep:
+            pkg = pkg.replace(os.path.altsep, '.')
+        packages.append(pkg)
+    elif filenames:
+        prefix = dirpath[(len(inner_dir) + 1):]
+        for file_name in filenames:
+            data_files.append(os.path.join(prefix, file_name))
 
 setup(
-    name='extended-image-field',
-    version='1.0',
-    packages=find_packages(),
-    long_description=open(join(dirname(__file__), 'README')).read(),
-) 
+    name=name,
+    version=version,
+    author='Denis Savasteev',
+    author_email='devmaster.zeb@gmail.com',
+    description='Django Image Field with thumbnails creator',
+    long_description=read('README'),
+    license="BSD",
+
+    packages=packages,
+    package_dir={inner_dir: inner_dir},
+    package_data={inner_dir: data_files},
+
+    url=bitbucket_url,
+    download_url='%sdownloads/%s-%s.tar.gz' % (name, bitbucket_url, version),
+
+    install_requires=['django', 'PIL'],
+)