Commits

Jeffrey Gelens committed d1dd418

Fixed setup.py

  • Participants
  • Parent commits 8339bb4

Comments (0)

Files changed (5)

+recursive-include cookie_law/templates *
+This is a Django application that makes it easy to implement cookies compliant with Dutch law, as far as I am able
+to tell. I'm not a lawyer, so use at your own risk.
+
+
+---------------------Version History:--------------------------------------
+
+*0.1    12-11-2012 - Improved README, added setup.py, added comments
+*0.1.1  15-11-2012 - Changed reload delay to 1.5 seconds. Sometimes took too long for cookie to be set.
+*0.1.2  15-11-2012 - You can now set the text displayed in the cookie bar and the link to your cookie page.
+
+---------------------Requirements:-----------------------------------------
+
+- jQuery
+
+---------------------Usage:------------------------------------------------
+
+- Add the cookie_law app to your INSTALLED_APPS.
+- Add 'url(r'^cookies/', include('apps.cookie_law.urls')),' to your main urls.py, without the ''.
+- Run the cookie_law migrations.
+- Include {% show_cookie_bar %} under the <body> tag in your base template.
+- Make a cookie bar in the admin.
+- Surround your cookies with {% if request.COOKIES.allow_cookies == '1' %} <cookie> {% endif %}
+import os
+
+from setuptools import setup
+
+install_requires = []
+
+README_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README')
+
+description = 'Django specific cookie implementation compliant with Dutch law, use at your own risk.'
+
+if os.path.exists(README_PATH):
+    long_description = open(README_PATH).read()
+else:
+    long_description = description
+
+packages, data_files = [], []
+root_dir = os.path.dirname(__file__)
+if root_dir:
+    os.chdir(root_dir)
+
+for dirpath, dirnames, filenames in os.walk('cookie_law'):
+    # 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[11:] # Strip "cookie_law/"
+        for f in filenames:
+            data_files.append(os.path.join(prefix, f))
+
+
+
+setup(
+    name='django-cookie-law-nl',
+    version='0.1',
+    install_requires=install_requires,
+    include_package_data=True,
+    description=description,
+    long_description=long_description,
+    author='Wouter Lansu',
+    author_email='wfrlansu@gmail.com',
+    url='https://bitbucket.org/getlogic/django_cookie_law_nl',
+    packages=packages,
+)