source: mauRepo/dj_security/trunk/setup.py @ 8746

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/dj_security/trunk/setup.py@8746
Revision 8746, 2.3 KB checked in by mnagni, 7 years ago (diff)

Incomplete - # 22698: [CEDA Site Python Port] MyCEDA Login needs to be more user-friendly
 http://team.ceda.ac.uk/trac/ceda/ticket/22698

  • Property svn:mime-type set to text/plain
Line 
1# -*- coding: utf-8 -*-
2from distutils.core import setup
3from setuptools import find_packages
4import re
5import os
6
7def collect_static(root_dir, dir_name, resources):
8    for dirpath, dirnames, filenames \
9        in os.walk(os.path.join(root_dir, dir_name)):
10    # remove the 'cedatheme_mf54' part of the path
11        basepath = dirpath.split(os.path.sep, 1)[1]
12        resources.extend([os.path.join(basepath, filename)
13                 for filename in filenames])
14
15base_name='dj_security'
16
17v_file = open(os.path.join(os.path.dirname(__file__),
18                       base_name, '__init__.py'))
19VERSION = re.compile(r".*__version__ = '(.*?)'",
20                     re.S).match(v_file.read()).group(1)
21
22#This section collects the NOT PYTHON files to distribute
23resources = []
24for dirpath, dirnames, filenames in os.walk(os.path.join(base_name, base_name)):
25    # remove the 'pytz' part of the path
26    basepath = dirpath.split(os.path.sep, 1)[1]
27    resources.extend([os.path.join(basepath, filename)
28                     for filename in filenames])
29for dir_name in ['static', 'templates']:
30    collect_static(base_name, dir_name, resources)
31   
32package_data = {base_name: resources}
33
34setup(
35    name=base_name,
36    version=VERSION,
37    author=u'Maurizio Nagni',
38    author_email='maurizio.nagni@stfc.ac.uk',
39    package_dir = {base_name:base_name}, # tell distutils packages are under cedaMoles   
40    packages=find_packages(), # include all packages under this directory   
41    url='http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/dj_security', 
42    license='BSD licence, see LICENCE',
43    description='Centralizes the authentication/authorization under a django application',
44    long_description=open('README').read(),
45    zip_safe=False,
46
47    # Adds dependencies
48    # !!!! BEWARE !!!!
49    ## Do not change Django version to a newer one because the django.http
50    # will miss the str_to_unicode used by the django-authopenid module!!!
51    # !!!! BEWARE !!!!
52    install_requires = ['psycopg2',
53                        'Django==1.4.5',                       
54                        'mezzanine',
55                        'Paste==1.7.5.1',
56                        'cedatheme_mf54',
57                        'django-authopenid==1.0.1',
58                        'userdb_model',
59                        'lxml'],
60     package_data=package_data,
61)
Note: See TracBrowser for help on using the repository browser.